A podcast & sources for (romantic) game polish and feel – DAG pod 22

In this podcast Daniele Giardini and Pietro Polsinelli (myself) discuss the notions of game polish and feel.

Here is the podcast:

There is also a video of the podcast here:

References

Game Feel: the book.

The game Goscurry.

football drama prototype

The Football Drama site.

DOTween

DOTween tweening component site. Easings http://easings.net/en.

Finally, Vlambeer talk on game feel.

Follow me on Twitter where I post about game design, game development, Unity3d 2D, HTML5, applied games.

Social Share Toolbar

Making a sport game in Unity: model & prototype

I just published a video where I describe how to start modelling and developing a sport game, specifically football (soccer) in my case:

In the following notes some motivation for the work and references from the video.

What am I trying to do?

I am creating a game on football (not American Football), called Football Drama: this game is supposedly the story of the coach in the context of a Football Manager like game. The latest version of Football Manager for smartphones has a cool game play:

FM 15 on smartphone

One of the first thing I did in Unity is search for a plugin that would handle the match play part. Given the number of plugins available in the Asset Store and the popularity of football, I was pretty sure that my only problem would be picking the best plugin. Wrong.

I didn’t want to do thisimage

The only decent looking component I found is Soccer Project by “Astute Games”, which is ok but actually does nothing useful in my perspective, as it provides passive 3D models of players and little more.

The are simply no plugins covering modelling, movement and AI for football games in the Asset Store.

Maybe because “The barrier of entry on making a decent team sports game is really high.”, as they say in one of the few discussion of the theme indie & sports available online.

The Simple Soccer examplehttp://ecx.images-amazon.com/images/I/51jAoX1id6L.jpg

In chapter 4 of the book Programming Game AI by Example the author provides a nice implementation of a simple soccer game.

I’ve downloaded the Java sources and made the sample run in my IDE.

simpleSoccer

Here are some of the Java classes of this example:

image

Movements are regulated by physics:

image

Complete Java source code is here.

Not what I want for a sport game

This material is useful but what it is modelling is not football. seems more snooker to me Sorriso. I want a simple grid with squares as players and a state handling framework, where the (hierarchical) state machine can easily be extended. Movement is not determined by physics – the right metaphor is not snooker.

If you actually watch a football game, its a highly fractioned game of control and tactics, my reference for this development has been Cameroon vs. England (World Cup 1990):

Physics plays a role on long shots, but I will model that using tweening (the wonderful DOTween library by Daniele Giardini). I will call the model I need Football Grid.

Football Grid: The model

imageThe example is also using heavily inheritance to model all aspects of play. I instead will be happily mixing inheritance and composition, reducing inheritance to a minimum and modelling state with classes only when strictly necessary. A great book to learn about basic game programming patterns, if you are new to the topic is Game Programming Patterns.

The three states of game play: paused, preparing play, in play: this is simply an enum.

I used object hierarchy and modelling of states with class instances only when it is strictly useful, so e.g. in the case of a player state.

Here are the classes of my model:

image

2015-04-05 16_11_46-UnityVS.footballDrama - Microsoft Visual Studio

2015-04-05 16_20_15-UnityVS.footballDrama - Microsoft Visual Studio

Curve ball effects

2015-04-05 16_29_08-PowerPoint Slide Show - [MasterSlides.ppt [Compatibility Mode]]

To get these effects you can simply tween (I use DOTween) the ball differently along the X and Y axis:

DOTween curse transform

More?

Follow me on Twitter – I study game design, development (2D), applied games, and I post about progress on Football Drama.

Football Drama game design

Unity components used

DOTween tweening component

Game Logic Grids http://gamelogic.co.za/grids/

DOTween http://dotween.demigiant.com/

Thank you!

Image references

“Association football 4-4-2 formation” by MaxDZ8, based on work from Mario Ortegon – self-made, original file from Mario Ortegon. Licensed under CC BY 2.5 via Wikimedia Commons – http://commons.wikimedia.org/wiki/File:Association_football_4-4-2_formation.svg#/media/File:Association_football_4-4-2_formation.svg

“Association football 4-3-3 formation” by Threner. Licensed under CC BY-SA 3.0 via Wikimedia Commons – http://commons.wikimedia.org/wiki/File:Association_football_4-3-3_formation.svg#/media/File:Association_football_4-3-3_formation.svg

Social Share Toolbar

Unity3d: Using A* and grids for entering a football field

Just played with the A* algorithm and a grid to make players enter a field and assume the initial 4-4-2 classical formation. Notice there are dumb and smart teams A bocca aperta [Read more…]

Social Share Toolbar

Games we loved in 2014 – DAG pod 21

In this podcast I chat with We Are Muesli about (some of) the games we liked in 2014. We each put together a list of games and we sort of interviewed each other. [Read more…]

Social Share Toolbar

Beyond mechanics: games with depth – DAG pod 20

InMinimax this dreamy podcast Daniele Giardini and Pietro Polsinelli (myself) discuss the notion of depth in games. We don’t reach any definitive conclusion, but we have fun Sorriso [Read more…]

Social Share Toolbar

Unity3d: Giving runtime prefab instances meaningful names

This is a short note about a minor issue you may meet in Unity3d when you are creating scene objects in code, say from prefabs.

In my case I am creating a soccer field borders on the base of a grid that may resize, so I want to create everything in code.

Unity3d object instance with meaningless nameI am as always giving meaningful names to variables (and you should too) and so it would be nice to get the instance to be named as the variable, without duplications and without – oh horror – writing the instance name as string, breaking code esthetic and refactorings. In the pic on the side you see what you get by default – not cool.

Actually in the rich and hackable C# universe as managed in current Unity3d this is possible: just this way:

image

Thanks to this post here. I used it this way:

image

imagegetting good names on the instances Sorriso

 

Note that this relies on unspecified behaviour and while it does work in Microsoft’s current C# and VB compilers, and in Mono’s C# compiler, there’s no guarantee that this won’t stop working in future versions. See the discussions here:

Getting names of local variables (and parameters) at run-time through lambda expressions

Finding the Variable Name passed to a Function in C#

Update: It seems like this might no longer be an issue from C# 6, which will introduce the nameof operator to address such scenarios.

If you have suggestions on how to automate getting good instance names at runtime (maybe with cleaner / lesser code) let me know!

Follow me on Twitter where I post about game design, game development, Unity3d 2D, HTML5, serious games.

Social Share Toolbar

Game Development with Unity 2D – part 6: Pixel Perfect

Here we have a nice chat with the sinful Daniele Giardini about pixel perfect in 2D games, as a form of holy perfection.

We are continuing our voyage in Unity 2D development; previous trips: Part 0, Part 1, Part 2, Part 3, Part 4, Part 5.

We didn’t find a satisfactory definition of pixel perfect online, so this is Daniele’s: [Read more…]

Social Share Toolbar

Paper Game Jam entry: Autumn Sprint

In this game a group of players has to build a tree and its ecological environment in autumn, through a series of one minute drawing sessions.

This is a really simple game that is playable with just papers, colors and a timer (in any form, analogical, smartphone, whatever can count a minute).

It has been designed for the first Paper Game Jam, held in the weekend of October 4th, 2014. The jam theme was “Autumn”.

Aim of the game is to build a five year old tree, representing autumn in the meantime. Game play is really simple: in turns (called “sprints”) of one minute, the players must create a minimal set of complete colored drawings so to grow the tree by one annual growth ring, four leaves and one special entity, typically a wood animal. If they make it in time, the tree can grow of one ring, otherwise it remains as it it. The game ends when the tree gets to five years old i.e. has five rings.

AutumnTree

The crucial point in Autumn Sprint is being accurate and strict with the time and the drawing rules, so that you can make it in a minute but just so: this way I grant you that is great fun.

You will soon fin that a minute is really short, so you with your team must work in team efficiently (one of the several interesting feedback you get from this game).

This game is a constructive non directly competitive gam – but it’s actually a frantic race with time. Its get set up in minutes and a full game lasts about 10-15 minutes: the right time span for kids age 5-10 attention Sorriso. And in the end you also get a nice composition.

The game

Players

Players: the game can be played by 2 to 5 players, one needs to be an adult. We tested one adult

Setting up

Setting up is very simple: you need to create some cards with just animals names that live in the woods (which may depend on the region you live in). We had porcupines, foxes, wild boards, generic“bird”, snails, squirrels; then you also need a set of color cards (like black green yellow orange brown).

You also need plenty of rectangular pieces of paper for the drawings and a set of 10 rectangular pieces of paper 10cm x 2 cm that will constitute the tree trunk.

Playing

You play in one minute sprints. Before starting the timer, the players must have their pieces of paper and colors ready.

Timer is started, and immediately one animal is picked at random and also one color; say “fox” and “yellow”.

In 1 minute the team must colour at least:
– two paper stripes (that will be used to thicken the tree ring, colours either yellow brown orange or black)
– four leaves
– the yellow fox
All drawings must have a completed outline and be fully colored inside.

If the team makes it, all drawings are added to the main composition: the stripes on the trunk sides (representing the yearly growth ring), some leaves on top, others on the ground, and the animal in the appropriate place., It the team didn’t make it, what has been produced in the minute is set aside, and a new turn begins.

In particular the rectangles are added to the tree trunk making it thicker, as in the picture.

You will get frantic, exciting one minutes, and the resulting drawings are really great at times.

In out testing we had an external judge to validate the correctness of the drawings.

Thanks

I thank Matteo Nesci (9 year old) and Maia Polsinelli (9 year old) for enthusiastically testing the game.

Follow me on Twitter where I post about game design, game development, Unity3d 2D, HTML5, serious games.

Social Share Toolbar

Urban life and happiness: People in Love

People in Love is a game about building cities where people can fall in love. Cities that are not inhabited highways, nor tools for economical and racial segregation.

We hope that by playing this game some beliefs and doubts will start inhabiting the wonderful mental life of our players:

Our cities are malleable. They can change. And all of us can play a part in that change. (From The Happy City)

People in Love concept art

People in Love is a kind of Sim City where you are the people living in the city instead of the architect. Nobody up to now asked the Sim City inhabitants what they thought about their own city planning, and about the planners: its time to do that! It is a game that tries to indirectly talk about a quite serious matter, while being structured as pure mobile entertainment.

People in Love is produced by Daniele Giardini and myself (Pietro Polsinelli), and will be first played on smart-phones. Here I present the project idea and current status; playable alphas here (currently only for desktop browsers).

Inspiration

The game idea came to my mind walking around Rome a warm spring evening. I was there just for two days for the Codemotion conference (where I talked about games & storytelling), and when I reached a wide street with Roman ruins (yes, not uncommon in Rome…), the ruins where inhabited by people talking, kissing, smoking, embracing in the warmth of the evening. Happy people.

At about the same time I started reading The Happy City, a book loaded with ideas about  understanding and improving our own communities. The author was initially inspired by two Colombian politicians Antanas Mockus and Enrique Peñalosa, who did so much to improve their town, Bogotà.

“An advanced city is not one where even the poor use cars, but rather one where even the rich use public transport,”  Enrique Peñalosa

The majority of cities will be built in the next decades in developing countries, so what we set now as standards will have a great impact on the future. So why not use games to express in an accessible way this complex problem? Town planning and building is so common in games!

But we didn’t want to simply play as the God / architect: as Antanas Mockus showed so well, quality of life means quality of life for all, not just for a happy few. Consider the beautiful and participative architecture of Bjarke Ingels:

Turn surreal dreams into inhabitable space

To me the core problem of brilliant innovative architecture like that of Bjarke Ingels’ BIG group is limited reach. The hope there could be the power of examples?

Another different danger is the idea of urban intervention as building a smart city, a set of ideas pushed by corporations for grabbing public money; ideas not chosen by people, and benefiting (if anyone) a thin layer of the population.

http://www.amazon.com/Against-smart-city-here-Book-ebook/dp/B00FHQ5DBS

As I’ve been experimenting recently, videogames are so entrenched in the life of young people that videogames can flip their role from way of isolating yourself to way to socialize and communicate, specifically in my experience to get to talk about experiences of psychological or physical violence.  Games with their immense reach can and should be used as media for new ideas.

What you do in People in Love is not playing the part of the architect god: you manage a protest movement concerned about urban space usage. There are today no taboos to what we let cars and concrete do to our urban lives: maybe its time to build some. Let’s start reclaiming space and changing its usage!

The game support changing existing urban structure, not just creating new “perfect” space. One should also consider that in all urban interventions there is always the danger that the newly qualified zones become valuable and hence inaccessible to those these were supposed to benefit.


From Sprawl Repair.

http://2.bp.blogspot.com/_u0Qoa-WYD1Q/TU8drSTo4HI/AAAAAAAAAGk/qGJklK19F3I/s1600/09_Alameda+El+Porvenir+_resize.jpg

The city should be an inclusive space, not a transit area for cars.

In a fair city, 8 and 80 year old can go around safely and independently.

Something strange in this image: pedestrians and bicycles in a proper road and cars in the dust?

The game

pil_splash

This kind of game should reach the widest possible audience. So we want it first to be available on smartphones, and to be playable by all. It should somehow fascinate and adapt to non hard core players habits. It should also be compatible with our non existent budget, so be technically simple and with minimalistic graphics.

From these requirements we did a game design that is based on a single kind of input – tapping – which does everything: send demonstrators to buildings, make them more excited, send them to different buildings. The graphic style is a quite refined pixel art, with two families of buildings, the bad and the good. The very simple model should also hint to our being aware of its limits.

These requirements made us put together simple atoms, but the resulting universe is combinatorially rich and resulting game play is complex; the towns are procedurally generated and hence every play is different, the actors involved – town council, the evil builders and the activists – generate many actions and counter actions.

People in Love is in development, and very rough prototypes are already available.

Here is alpha 3, here is alpha 4: play them! (Currently only for desktop browsers.)

alphas

People in Love Alpha 5Next alpha is going to bring some deep revisions: activists will be introduced as characters, news will be animated, and the game will start with a first very simple city block to be improved in order to introduce ways to play.

The plan for the final game has a few stable features, and many floating ideas. Levels will model diverse city structures, in order to make people familiar with different cases. We will also build models of existing town zones; one surely will be Pyongyang.


Enter Pyongyang from JT Singh.

Game Over

Follow me on Twitter where I post about game design, game development, Unity3d 2D, HTML5, serious games.

Social Share Toolbar

Prototypes and practice vs. theory

People in Love gameFollowing my own preaching about the importance of prototypes, I’ve put together a quick and dirty prototype of People in Love, a game about urban design and quality of life. Or about love. The prototype is here and I got some interesting feedback.

Now what happens? Well, I throw away the prototype and build a new one. Based on user feedback? Well, not exactly.

This first prototype (actually n-th, first shared with more than 2 people) got me to find a way to include graphical narrative and hence give depth to play, which will be my next prototype. No tester asked for this in clear words, but it is what puts together the feedback I had.

This on the background of my testing many creative games and extensive readings on games and narrative. The critique of your prototype is non trivial and requires a background theory.

User will provide a refined usage feedback in action, but likely a rough and maybe misleading theory about it (Jeff Atwood wrote a beautiful post on this). You have to know the context and put the puzzle together.

So prototyping is a productive tool if in the context of an intense research; it lives by research, it is a form of research, not a replacement of it.

Feeling better now I said it clearly :-)

Follow me on Twitter where I post about game design, game development, Unity3d 2D, HTML5, serious games.

Social Share Toolbar