Public Group

# what type of games?

This topic is 4546 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

In2d games directx/c++ it seems you can create games which can go scroll from right to left eg mario, or games which can scroll up to down eg space invader , plane shoot em'up, or games which go into the screen. Games into the screen are like car race or in space game. RPG games as well in 2D. q)Have I missed anything and what is the hardest to do? q)I can do scrolling games I am betting but games that go into the screen what things do you need to do to do these? eg To create a space game into the screen, how do you do the space background, and do it when the spaceship moves so you can see the stars in space move. A car racing game with 2d seesm difficult to keep track of the position of the car on the track.

##### Share on other sites
The older car racing games like Outrun used to use scaled 2D sprites to represent the cars and trees and so on, but still had to do some kind of 3D calculations to work out how big and where on the screen to draw them.

I believe the tracks in games like this were drawn as a series of 2D horizontal strips across the screen. Again though, regardless of the tricks used to generate the graphics, I would still consider these 3D games.

##### Share on other sites
Quote:
 q)I can do scrolling games I am betting but games that go into the screen what things do you need to do to do these? eg To create a space game into the screen, how do you do the space background, and do it when the spaceship moves so you can see the stars in space move. A car racing game with 2d seesm difficult to keep track of the position of the car on the track.
As for space games how do they move the stars separate from everything else? I believe this is done with layers, for example, you have a layer of far away stars, a layer of close up stars, and even closer stars. Then when the screen moves you move the stars that are most close faster then the ones that are far away; using arrays for each stars location.

Just draw the stars onto the screen by having an array of coordinates that each star is at. This might get a bit slow depending on how many stars you want, but I am sure you can simplify it by simply repeating the same stars on the screen rather then having a huge amount of them.

##### Share on other sites
Quote:
 Original post by EasilyConfusedThe older car racing games like Outrun used to use scaled 2D sprites to represent the cars and trees and so on, but still had to do some kind of 3D calculations to work out how big and where on the screen to draw them.I believe the tracks in games like this were drawn as a series of 2D horizontal strips across the screen. Again though, regardless of the tricks used to generate the graphics, I would still consider these 3D games.

the idxsprite has a 3d position, so this can make it 3d like but the sprites themselves are just 2d. This seem more like 2d game play with a 3d component, but anyway I guess I will just need to do it.

q) any tips on how to do a in the screen car race?

##### Share on other sites
Quote:
Original post by DevLiquidKnight
Quote:
 q)I can do scrolling games I am betting but games that go into the screen what things do you need to do to do these? eg To create a space game into the screen, how do you do the space background, and do it when the spaceship moves so you can see the stars in space move. A car racing game with 2d seesm difficult to keep track of the position of the car on the track.
As for space games how do they move the stars separate from everything else? I believe this is done with layers, for example, you have a layer of far away stars, a layer of close up stars, and even closer stars. Then when the screen moves you move the stars that are most close faster then the ones that are far away; using arrays for each stars location.

Just draw the stars onto the screen by having an array of coordinates that each star is at. This might get a bit slow depending on how many stars you want, but I am sure you can simplify it by simply repeating the same stars on the screen rather then having a huge amount of them.

How to distinguish back kayer of stars between the front, is it larger stars which will be white circles?

##### Share on other sites
If it's implemented as layers, then the larger stars are the ones in the layer intended to be closest to the viewer. If it's implemented such that each star has an x, y, and z point, then the size of the star would be a function of its distance (or its z value).

-Auron

##### Share on other sites
Quote:
 Original post by AuronIf it's implemented as layers, then the larger stars are the ones in the layer intended to be closest to the viewer. If it's implemented such that each star has an x, y, and z point, then the size of the star would be a function of its distance (or its z value).-Auron

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 15
• 11
• 9
• 9
• 41
• ### Forum Statistics

• Total Topics
634131
• Total Posts
3015709
×