2d Gta Style Game (any Ver./map)


I agree. It just seems much more efficient to pre-render the township and then just put the collision map in triangles on top of it (like in PS1 games). For my GTA clone, I used tiles for the buildings and streets, and triangle collisions for the rotated cars.

I dunno, that's just how I'd do it (if I didn't just use tiles out of pure laziness). I've yet to try a mask-based game (mind, your PC was probably very powerful) simply because the polygonal collision seems to work so well.
 
Like I said before, I haven't really started, just throwing around ideas on the concept. But my idea for computeing it is as follows.

The town is divided into several images a few screens big. The section you are on is loaded up. You are placed on a predefined location in that section as a starting point. (when you move on to the end of that section, you are "teleported" to another, in the same manner)

When you move around, it checks to see if the point you are on is white or black on the monochrome "road mask". If it is white, you are bounced back to the nearest black part (road). If it is black, it leaves you alone.

The "trees mask" decides whether to draw all, part, or none of your sprite (and other sprites) in the same manner, so that you are not shown as driving on top of trees and similar objects but rather "under" them. Thats pretty much how far I've thought out the engine.

@ Ravuya: I don't get what you mean by doing it in triangles, would you explain?
 
Okay, I tried doing a visual demo of what I mean:

aerial3zt.jpg


As you can see, triangles can handle very complicated curves (just throw more at the problem!) and they can also handle straight edges. The important thing about this is that you can also add more polygons for a difficult section, or remove polygons to increase performance at the cost of some minor accuracy (that's not quite as easy with masks). For example, I used 10 polygons on the right turn there, but you could easily reduce that to four or so at the cost of some minor accuracy.

The best part is that storing the collision map is really small: you would only have to store a file full of groups of three vertices (as well as maybe a "material type", like road, or house). Also, triangle-collision is relatively easy to compute, and doesn't require extensive memory lookup (like the mask method) or any floating point calculation.
 
I see.

But then of course I'd need a level editor (meaning I'd have to learn a bit more on programming for the PC), and if somebody said "but I have a [linux/mac] machine", all I'd be able to say is "I can't help you, here's the source go make one yourself". Also, the other way would be easier to program, but this way is faster to run and easier than drawing the masks. I'd have to read up some more on the matter of collison detection. Hmm....
 
Actually, this way would probably be easier to program. Working based on masks is suicide. :)

This way, you can use a lossy compression format like JPEG and not lose any kind of collision quality.

Writing the editor wouldn't be too bad (hell, if you're worried about Linux and/or Mac, just write it in SDL with C and I'll port it for you). In fact, aside from implementing the triangle-collision routine, I'd expect it to be the easiest part of this project (remember, I've tried GTA clones before. They ain't trivial. Collision & physics, particularly if you have multiple cars, sucks).

I recommend you at least look into triangle-mesh collision, it's how I'd do it. The primary benefits are that it's scalable and a lot easier to build than the mask (also, about 1000x faster).
 
Seems to me that the easiest way to go about this would be to do a 2D sprite based system, instead of trying to use real world images.

You could also just use square-based collision detection with a tile system. The city would have a fairly grid-like look, but that could be overcome (at least in part) by some talented artists.

I developed an engine that used these principles on a 386SX in QBasic, and got very good performance.

The game could also be completely "skinable" like you want, with replaceable tiles and maps, just as mine was.

However, car collision detection is still going to be one of the hardest parts of the game.
 
Yeah, I think the prerendered shots are the weakest link in this plan. It doesn't seem to be worth the considerable difficulty it would add to the engine.

In fact, it seems they would cut down on the flexibility and artistic input from users.
 
Moreover, I forgot to mention the colors. Reducing colors to 256 doesnt make the photo too nice and if you also want some sprites, you have to reduce even more, maybe 192 colors and that wont look like a photo any more.
Last summer I was thinking about making a game based on photos taken outside in the nature, but in the 8bit mode the limited number of colors would be a problem and the 16bit mode...well, I dont like it for some reasons (speed, size of the gfx...)
 
I think tiles are the best way to go. Using a photograph has so many negatives. The file size, LOTS of work making it usable with collisions etc, plus the rest of the artwork would have to match the standard else it would look utter crap. I made a GTA clone in Fenix for a competition some time ago, never finished it but it was quite fun driving around skidding people while they were running away. Got some shots of it too:

screen300404.png

screen100504.png

screen1005042.png

screen3004042.png

screen20704.png


It wouldn't be fast enough for the GP32, but it sure is possible in Fenix :)
 
If I ever get around to working on it, I will make techdemos and test the possible concepts and how well they work in real life. But for now, I haven't done anything really in that direction...I need to learn more C...
 
ravuya posted on Mar 23 2005 at 03:59 AM said:
Damn, that spanks the hell out of my PC GTA clone. Want a job doing sprites? :)

Believe me, you don't want to see me draw, I got a pretty complete sprite package from a more capable friend :)
 
Last edited by a moderator:
Moogle posted on Mar 23 2005 at 03:49 AM said:
ravuya posted on Mar 23 2005 at 03:59 AM said:
Damn, that spanks the hell out of my PC GTA clone. Want a job doing sprites? :)

Believe me, you don't want to see me draw, I got a pretty complete sprite package from a more capable friend :)

Damn! :) Good work, though. Looks great.
 
Last edited by a moderator:
If more development went into it, I'm sure it would rock. Drive circles around anything that anyone else could come out with. Some cop and other AI and stuff would round it out. I'm floored just by the screenshots alone, honestly.
 
Back
Top