• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

3D Topdown 3D Game - Questions about building the world and shadows

M

mysticjim

Guest
Hi,

I'm experimenting with making a topdown GTA1-esque game in GMS1.4 with 2d sprites for characters and very basic 3D textured models for the buildings, etc. Wanted a bit of advice before I start in earnest as I could come unstuck further down the line if I get these bits wrong!

So firstly, the whole game world itself, which will be looking down onto the player. If I was doing the game purely in 2d topdown I'd probably use one big static background image (or utilise tiles) and put building and feature objects on top of those. Obviously, neither tiles nor backgrounds work properly in 3d. If I was doing a first person game I'd utilise a big floor with a repeating texture, but in my game it's going to be a city with roads, grass, etc. So what's the best way to go about this? Here are the first solutions that came to me, are these practical? Bear in mind that I don't quite know exactly how big the overall map will actually be but my player character is going to fit inside a 32x 32 mask so the environment and buildings will be scaled proportionally to that. I think my initial proof of concept will only be a 2048x2048 square, but I'm sure a much bigger world will be required if I get seriously into it, so while I suspect these might work on the small scale, I'm worried they may not scale up in terms of game performance.

First thing I thought of was creating all of the static features, roads, pavements (sidewalks), grass, etc, as a single big image and using that as a texture on a single floor that fills the entire room. Don't know how practical that is.

So that led me to consider effectively making a tileset out of floors. maybe 128x128 squares? Would that be better?

Finally, I did wonder if another option might be using surfaces, although I've never really experimented with those in any great detail before.

The other thing I'm wondering about is shadows - specifically shadows from buildings. At this stage I'm not really looking at using GM's lighting system at all as it seems really cumbersome. I like the way GTA1 dealt with it, it that as far as I can tell they cheated by simply shading the dark side of buildings dark in the texture, which is quite easy for me to achieve. Shadows on the other hand are causing me headaches. In keeping with GTA-style cheating, I like the little 45 degree shadows that you see in the game, as you can see here;



Again, I was wondering how best to approximate that.

I assume I could simply build them into the model and texture them semi-translucent, but that sounds labour intensive.

I've also thought about generating them as a semi-tranparent 2d shapes at the foot of model. It would all be generated with code based on the relevant dimensions of object I was shadowing.

Again, I've also wondered if surfaces could/should be used for this?

Be very grateful for any thoughts on the above. :)
 
Top