Neo Generation Games

Blog

Falling Sand in Game Maker

Posted by neogenerationgames on August 2, 2011 at 1:32 PM

I was to enter in a "Falling Sand" game in the GMC Jam #3, but I am late due to some technical difficulties(I  may put it up anyways at a later time). To those who don't know what a "Falling Sand" game is, it's essentially a two dimensional interactive sandbox game world. You can create sand, water, and other elements by painting them on the screen. It's really cool to see those particles interacting. Some "Falling Sand" games have special elements like zombies, bee hives, growing plants, and circuitry complete with electricity and machines.

Particles and anything that can number to the thousands are handled notoriously slow by the Game Maker interpreter. At first this prevented me from starting one before. It required a bit of foresight to solve the problem.

Instead of using the obvious object as a single particle, I opted to use database grids instead. Objects contain multiple variables, which will be unnecessary for this endeavor. Besides, "Falling Sand" games are simplistic in graphics and gameplay.

The method I chose created a grid the size of the playing field. Each coordinate contained a number that identified the particle in that coordinate it was in. This was the easy part.

The hard part is parsing and executing the grid. My first attempt was to parse the grid from top to bottom. This created a problem where a falling particle fell all the way down in one step. I then made it parse from bottom to top. Problem solved.

However, later when I was creating fire particles, the opposite became true. Fire floated up in the air, and so I found the fire particles get to the top of the screen in one step.

I solved this problem by making the parser parse every other line in one step and parse the remaining lines in the next.

Currently, my game has about 25 elements you can create and interact with. I'm going to release it soon, so stay tuned!

Categories: Games, Design

Post a Comment

Oops!

Oops, you forgot something.

Oops!

The words you entered did not match the given text. Please try again.

Already a member? Sign In

0 Comments

Recent Blog Entries

by neogenerationgames | 0 comments
by neogenerationgames | 0 comments

Donate

Facebook Page

Like

Google +1

Twitter