Messin' round in GM (generating worlds)

Posted by death on May 13, 2012, 4:52 p.m.

sooooo i got kinda bored working on my comp entry and decided to mess around with Game Maker's 3D abilities once more. This time going for a minecraft-world-generation style. it only features grass, water, stone and trees right now. (outdated screenshot above lulz)

The window caption contains a lot of numbers, the first one being the FPS (limit is 40) and the second being the number of columns being drawn. this system originally used blocks like minecraft but it was far too slow in Game Maker to get a decent size render distance; so i instead generated columns instead. you can't notice the difference visually either. it made things incredibly faster.

People at the YYGF were arguing with me about using instances to draw the shapes, telling me it was much slower than using ds_grid, however i tested both methods and found that there was no difference at all (if using columns - and if using blocks, grids is much slower).

i concluded that the only thing that slows GM down at all is calling functions. the more functions your calling per-step, the slower it will be. killing all instances in a room and using ds_grids instead isn't any faster as you'll still need to call the drawing functions an equal amount of time.

anyway about the project itself: i don't have any real plans for this but i do have some ideas. it might even replace my current comp entry. if it does, it will use all the same concepts and ideas as my current entry just in 3D instead and with generating worlds (so i don't have to design any damn rooms - too lazy for that) but we'll see.

Comments

McFluffeh 12 years, 7 months ago

Me gusta.

Alert Games 12 years, 7 months ago

I think a grid would be easier to manage and might take less memory because the objects are bloated with default variables. But I havent used grid for anything yet, if I ever do.

Looks really cool though.

death 12 years, 7 months ago

memory isn't too big an issue. though generating 200x200*16 does consume about 40mb in memory but that's not that much. iTunes takes more than that so no worry there.

previously i used a method were all the blocks were added to one large model and drawn with one function call. it's super fast rendering but took up 1.2 gb of memory lol. it kept crashing Game Maker as well, saying "out of memory" even though i had plenty of RAM left. saving all those primitives into one model seems to cost a lot of memory for GM to do so that method is useless. instances are slower but don't take up nearly that much memory.

Cesque 12 years, 7 months ago

Quote:
and with generating worlds (so i don't have to design any damn rooms - too lazy for that)

First you can complain about me using random generation, then you rip me off :P

death 12 years, 7 months ago

Quote:

First you can complain about me using random generation, then you rip me off :P
lol i haven't decided on it yet and if i do use it, only the landscape will be generated, everything else will be manually designed. (dungeons, towns, etc) i dont think i could make a challenging dungeon with generation.

Gordy 12 years, 7 months ago

looking nice, are you just using the built in d3d_draw functions?

i ask because i made a similar block based terrain system, and learned drawing custom primitives as model, or one giant model, was a lot faster.

Astryl 12 years, 7 months ago

What Gordy means is adding everything to a model list (AKA a Vertex Buffer, or Display List if you're working with OpenGL). It is much faster, but modifiying it on the fly is too slow.

You know death, you're using an old technique that was mislabeled "Voxel Rendering" back in the 90's, just that you're using larger than normal columns and DirectX to render them :P

And IMHO that screenshot of yours looks much nicer than those old Comanche games.

Good job, good framerate.

death 12 years, 7 months ago

Quote:
i ask because i made a similar block based terrain system, and learned drawing custom primitives as model, or one giant model, was a lot faster.
yeah i'm not using the d3d_draw_block function at all. i'm drawing my own models, it's much faster.

also i mentioned earlier about drawing on large model, it IS the fastest method but it also consumes a ridiculous amount of memory so i wouldn't attempt that again.

Quote:
And IMHO that screenshot of yours looks much nicer than those old Comanche games.

Good job, good framerate.
thanks =3

though i could make better textures, that we're kinda slapped together just for the sake of testing this stuff lol.

Iasper 12 years, 7 months ago

Challenge: Reconstruct Minecraft in GM including all Multiplayer functions.

Toast 12 years, 7 months ago

That would be a completely unprofitable demake.