• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
cronocr

Mass simulation with statistical maps

9 posts in this topic

I haven't played the last SimCity, but I remember from the old games (i.e. SimCity 2000) that you had these maps showing pollution, wealth, energy, water, etc. And I guess other games like GTA used the same technique. Now from a first person perspective, the entities that the player finds in the city will reflect the conditions given by these statistical maps. For example in a polluted zone there will be more garbage or fog in the streets, and a wealthy zone will have more luxury houses and cars. I'm exploring ways to use this concept to simulate a massive ecosystem. If there is a river and mountains in a map, the influence of water on vegetation could be mapped so that there will be higher tree densities. Then vegetation levels will influence density of herbivores. Now, resources are static and rather easy to map, but then vegetation could be harvested or catch fire, then it will be dynamic. And animals could migrate and increase/reduce population due to mating seasons and plagues. It's like a complex version of Conway's Game of Life, and not all "masses" have the same pattern. What techniques exist to process such system? What optimizations could be performed, having in mind that the system could have no constrains?

0

Share this post


Link to post
Share on other sites


What optimizations could be performed, having in mind that the system could have no constrains?

 

You could simulate every object, aka a squirrel eats a nut and there is one less nut  in the forest, maybe a bird dies of starvations that would otherwise have eaten the nut.

In such a system it would be very easy to implement player-interaction thus making it a game.

If you want a better answer you 'll have to explain what you're trying to make, and where you get into trouble.

1

Share this post


Link to post
Share on other sites


You could simulate every object

 

Actually what I want to achieve is the contrary to simulating entities, that is simulating a mass as a whole, and giving the player samples from that mass to fake entities. While in GTA this information is static, I still think the same technique can be applied dynamically. What you find in the city are samples of the conditions in a given zone.
 
When writing the original post I was thinking on pixel "clouds", that could for example represent the density of members in a flock in the map. In order to move the flock from one place to another, pixels could be moved from back to front of the cloud, which is determined by the direction That way the area/volume of the flock will be constant. Physics could be solved this way, for example if the flock enters a city, it could move thru the streets. Probably this is mostly related to fluid simulation. At the moment I'm not sure if it would be better to make it using pixels or using polygons. Pixel operations are easier to design and program but might be slower, while polygons could be more powerful to solve the simulation but the math could be quite challenging.
1

Share this post


Link to post
Share on other sites

Looks like SimEarth, which is probably a graphically crude by computationally interesting version of what you're describing is up for download with a quick google search.  Also, things like dwarf fortress sound right up your alley.

0

Share this post


Link to post
Share on other sites

This is my second attempt to simulate masses, in Unity :) I started creating something similar to a Game of Life with different rules. But now I have to tweak the code to perform calculations on population densities, instead of two-state cells. The GoL is a cellular automation, but this will be a population automaton. Also, there will be map layers, and population will interact with other maps.

 

http://gamelix.com/demos/simulation/MassSim.unitypackage

 

MassSim.jpg

0

Share this post


Link to post
Share on other sites
I have transformed the code to process on population densities. Previously it worked as a cellular automaton with two states, but now it's actually a calculating on float values as a population automaton. Also enhanced the grouping algorithm that defines the preference of a species to move together or individually. The patterns formed are pretty interesting. Here is a totally individual migration (grouping = 0f):
 
MassSim1.jpg
 
And here a grupal migration (grouping = 1f):
 
MassSim2.jpg
 
If someone is interested here is the new source code:
 
 
The grouping value can be changed at runtime (0..1) to see how the behavior of the population changes. This could help when simulating a situation in which a herd detects a predator, for example.
0

Share this post


Link to post
Share on other sites

hey cronocr,

 

I really like where you're going with your project. I myself have been interested in the concept of employing a comprehensive simulation to manage NPC interaction, world population, and physical modelling, but the Math involved is way beyond me. 

 

Do you have any links to to video game research relating to statistical maps, because most of the links found by Google are related to neuroscience?

0

Share this post


Link to post
Share on other sites

Hi BarefootPhilosopher, cool name, I actually do philosophy myself :)

 

Well, in the past I have read a few artificial intelligence and robotics articles/books, and implemented my own algorithm finding ordered paths to wire protoboards with electronic components in place. Now I quickly searched for mass simulation algorithms too but couldn't find anything useful, just like you did. So I'm just programming everything that I need, learning and creating tools from this experience. This resulted to be similar to image processing, on which I experimented several years ago (from CGA/EGA days to DX/OGL).

 

My inspiration is based on how "species" are controlled in a game like GTA, which is static, and trying to make it as massive and dynamic as a sim game. I have this moving image of how water, garbage, vegetation, herbivores, predators, people, transit, clouds, etc. interact in realtime... living in a third world city surrounded by jungle this isn't difficult biggrin.png When the player navigates this world, the game instantiates agents of each "species" for his first person interaction. If the player follows an agent it will behave individually, and once he gets out of view the instance will disappear.

 

Feel free to tweak the code or come with your own methods. I would love to share ideas with others on how to achieve this simulation. I'll take my algorithm to the point that it roughly controls most behaviors and interactions, then I'll put it on hold for several months. My actual goal is not this system, since it is just a part of the communication layer, but I need to develop it because it will be a foundation for several mechanics of the option layer:

 

http://forum.unity3d.com/threads/181564-Gamelix-Advanced-Mechanics-Online-(GAMO)

0

Share this post


Link to post
Share on other sites

Also, there will be map layers, and population will interact with other maps.

This provokes in my mind the idea of heat maps and hill climbing. There was a college paper on crowd movement modelling that used a score system for possible destinations. That score system was a three layer heat map of Distance, Time and Discomfort.

1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0