Archived

This topic is now archived and is closed to further replies.

Dark Star

How do I make 2d racers which look 3d

Recommended Posts

Hi everyone, I am interested in making a game like F-Zero and Mario Kart, you know, a 2D racer which uses clever scaling techniques to look like it''s 3d just like F-Zero and had a few questions for you to help me on my journey 1) I need a good web-site for that kinda information. Where can I go to? 2) Does anyone have any idea how to represent a 2D 2x2 map of a level in perspective like in mario kart so that as you look at the road ahead it appears to be converging into the centre of the screen (I hope you know what I mean..you know, perspective view) 3) About artificial intelligence and making other racers follow the track. How would YOU go about coding the AI so that CPU racers appear to be racing and following the track but with a few behavioural differences, so they don''t always take the same path as each. 4) Scaling sprites so that they look like the are infront like in the distance like in Mario Kart of F-Zero when vehicles get smaller as they advance into the distance. 5) Designing the level in a 2D editor and then including racing track attributes like bumps and ramps, which make the car jump up abit. How will I give the illusion of a car bumping up on a ramp or bump. 6) How would you suggest I design a level editor so that it''s very easy to make good race tracks 7) If I use a 2x2 matrix to represent the track and level, then how to I get curved roads as the player turns if all level entities will be orthahonal (that''s the first time I am using that would and I am assuming it means that objects are 90 degrees to each other. Correct me if I am wrong please). F-Zero has curved roads which leads me to wonder how their levels are stored. 8) About spacing with all the race entities and collision detection. The track I create in the track editor may have each road segment or racer spaced by 1 block in the map, but when it comes to translating the spacing when it comes to rendering the screen and all racers. That''s about it.... I have never made a trick 3d type game like doom or Wolfenstien and I know the involve raycasting or ''tracing techniques and I am not too sure about them but my game specific ignores walls and trees and rocks I just wanna know how to translate a 3d map into perspective and make it look kinda 3d well the race track anyway. --CELEBRATE GOOD TIMES --------------------------------------------- I just want every to know that I have finished college and am totally happy that I am free !!!!! (Just like MYA Lol) and I am starting unoversity this September doing a Comnputer Science course in graphics and games I am so happy. I have got a whole holiday of 3 months to begin on this new game YEAAAAAAAAAAH !!!! WHO''S BAD ???!!!!!! ---------------------------------------------------------------------- Sorry enough of that... I sure asked a lot of questions but you don''t need to answer then all just as many as u can or u want to. If you have any helpful source code can I have it. If you know of any interesting sites with this kinda game production please can you tell me? Any help is good help !!! Thanks in (Gameboy) advance Dark Star UK

Share this post


Link to post
Share on other sites
Hey Dark Star,

I wrote (am writing) a game like this for the gameboy advance. You can check out a preview version at www.gbadev.org or my website. Now onto the questions.

1. For gameboy advance development gbadev.org is good and so is www.devrs.com/gba. For pc development right here is great ! But unfortunately there are no sites telling you how to code a racer step by step, you are pretty much on your own.

2. This is tough, but the general idea involves changing your beginning and offset values on each scanline. You will want to have a field of view starting from your position and moving out at a 45 degree angle on both sides from "straight ahead". This really depends on if you are coding for pc or a console.

3. I''ve made the cpu race by having a few target blocks along the track area. The racer will adjust their speed and heading towards the next block along a spline based path to make their motion look smooth. This also allows for them to hit the edge and other cars and recover gracefully.

4. All you do to make the car look smaller is get the distance between your current position and the car position and get a scaling value from that. Your equation should be something like 1/distance^2 to produce a nice nonlinear scale out.

5. Just have another layer called the collision layer. This layer might have 255 for the tile if it is impassable, 254 for dirt, etc. Then just check which tile it is on top of and adjust accordingly (ie. bounce back, drop speed).

6. I made a windows mfc program that allows you to import tilesets and then you can create a new map and place the tiles down using the mouse. The ability to lay a solid block of tiles is good also, but you really don''t need a huge editor for a racing game.

7. F-Zero uses tile''s to store it''s levels, so does mariokart and just about any other mode7 style game you use. If you look at the tiles that f-zero uses there are a lot of half/part edges of the road which allow them to create the illusion of no tiles.

8. Just have all the entities have a greater precision that one tile. So use fixed point with the decimal portion the tile area and the fractional portion the area within the tile where you are.

Hope this helps somewhat.

Premandrake

Share this post


Link to post
Share on other sites