game programming in .net

Apr 11, 2007 17:33

So I had this really great idea for a video game based off of the Falling Sand Game. I think this game has a really awesome concept, but is lacking in the, uh, game department, seeing as it's completely aimless.

My idea was that you start with an empty field and a bit of dirt, water, a sun, and a few seeds. You place your dirt and water to start your empty world. Then you plop down your sun and ignite it. It starts shooting out photons, which hit your dirt and water, but don't really do much yet. Then you plop down a seed, and depending on where you put it, it grows into different organisms. Put it on the ground and it grows into a tree or a bush, or maybe moss to start. Put it in the water and it turns into algae, or maybe kelp or some such. It grows when water and sun hits it. Each time a photon hits it it causes some radiation damage, which has a chance of causing it to mutate into another organism. Eventually you get a variety of organisms interacting and growing in your little fish tank, and then who knows?

The game part comes in with a currency system based on your life essence. The more organisms you have, the more essence you get, and you can "buy" things with essence, like water, dirt, more seeds, photon bursts, tools to move existing dirt or water, new object types like rock, oil, metal, etc.

So I started working on it using Visual Studio 2005, with VB .NET as my coding language, mainly because it's spectacularly easy to code in and I just read the graphics chapter in my exam study book. I got the beginning of it coded, I made it so there are random specks of dirt all over the screen right when you start, then they fall to the ground, ala the falling sands game. And... it runs so slow it's completely unplayable. I had it running with an 800x500 "fish tank", so I dropped it down to a quarter of the size, 400x250, and it still ran slow as molasses. ugh. So I completely recoded based on an array instead of a matrix, decreasing the time from n^2 to n, which should have increased its speed drastically, since it was only doing calculations on the 16,000 specks of dust instead of the whole 400*250 = 100,000 spec playing field. I ran it again, but it still sucked the big one. So then I reduced the number of specks to 1000 and it ran great, but I can't really do much of anything with 1000 specks, so poo. I'm not sure if I want to use a different language that doesn't do things REALLY slow, but is alot harder to code in, or try to figure out some ingenious way to keep the number of specks moved per frame down to less than 1000.

Phooey.
Previous post Next post
Up