Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / sprite vs image RTS game

Author
Message
hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 15th Jan 2012 17:46
So im making a RTS game in GDK and im not sure if i should use sprites or just plain images

the problem with sprites is i need to offset all the sprites with the rest of the map when the screen moves.

For most of the objects in my game I position them based on where my grid is and my grid is moved by the screen to create the illusion of the screen moving. Any ideas anyone?

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 15th Jan 2012 18:53
You are using 2.5D?

RTS is coller when it's 3d ..

C++ Medium 3.5/5
www.oryzhon.com <-- My company's website (W.I.P)
hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 15th Jan 2012 19:13
no just plain 2d I may make my next game in 3d

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
vitinho444
13
Years of Service
User Offline
Joined: 12th Oct 2010
Location:
Posted: 15th Jan 2012 20:00
Well.. so it will be like just a control panel? or what? xD

Maybe like dark orbit? xD

C++ Medium 3.5/5
www.oryzhon.com <-- My company's website (W.I.P)
hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 15th Jan 2012 20:17
what do u mean. its just 2D top down RTS

there is bar down the bottom for building and stuff. hehe or there will be

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 15th Jan 2012 20:34 Edited at: 15th Jan 2012 20:35
Use Sprites. In fact, I would go as far as to recommend using Quad `Mesh` Objects. Once the Offset is known you shouldn't have to recalculate it.

hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 15th Jan 2012 20:46
how would i go about using quad mesh objects

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 15th Jan 2012 21:28 Edited at: 15th Jan 2012 21:29
Quote: "how would i go about using quad mesh objects"

Quads will be more challenging to setup to obtain the proper scale and resolution in true 3D space, but, I think its worth the trouble. Consider using the following DGDK Construction Commands:

Reference: DGDK Wiki

hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 16th Jan 2012 09:57
i may do that for a second game. I'm trying to keep this as basic as i can. As im not to amazing at this yet

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 16th Jan 2012 11:09 Edited at: 16th Jan 2012 11:11


Using 3D like 2D is easier than what it appears. You do most of your work with 2 coords (X,Y) or (X,Z). I would recommend X,Z if your RTS board is on land. If its in space use X,Y.

Once you decide what Coords will represent your 2D board, Set your camera above the board and rotate it downward towards it. Once you have the scale and distance offsets calculated for pixel perfect resolution you can treat like the Quad Objects like basic 2D images/sprites with all the 3D graphics features available.

hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 16th Jan 2012 12:20
Well i reckon i may have to switch to that then. Looks like its worth it

2.0Gh AM2 Processor, 9800GT, 2Gb Ram
_Pauli_
AGK Developer
14
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 16th Jan 2012 13:43 Edited at: 16th Jan 2012 13:45
Just in case you decide to stick to strictly 2D graphics, I would advice you to use sprites and draw them just as images using dbPasteSprite(). Then you have all the extra features that the sprite command set offers but can still draw them to the screen like simple images. When I was using this technique I was first creating all sprites during initialization, then hiding them using dbHideAllSprites() and pasting them when needed each loop.

But as TechLord said, using 3D objects/quads offers a lot more features. For example you wouldn't have to deal with different sizes on different screen resolutions, you could use shaders on them, etc...

hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 16th Jan 2012 14:46 Edited at: 17th Jan 2012 01:03
you make a good point. but 2d is just easier for my head at the moment once ive finished this game i should be able to do a 3d one

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 16th Jan 2012 15:00
Quote: "but 2d is just easier for my head at the moment"

In a 2.5D game, the only difference is that you are using 3D objects in a 2D plane. The math is done the same, except that you have to tell the camera to be above the player (ship/person/whatever). In fact, with 2.5D you don't have to worry about screen space. You just place the objects in 3D space (on the Y-axis==0), make your camera stay above the player, and *poof* you have yourself a huge play area without having to move all the pieces around the screen.

It's ultimately your call, and loads of people will be happy to lend you a hand if you get stuck. Just have fun making whatever universe you see fit.

The fastest code is the code never written.
TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 17th Jan 2012 01:42
Alpha Fading, Coloring, Rotating are easier and faster to do in 3D. Collision Detection is easier, like using dbPickObject to select units. Lots of reasons to use it, very few not too. You will not regret using 3D if you go that route.

hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 17th Jan 2012 02:10
do u mean regret using 2D

and im convinced ill probably use 2.5d

cause i don't particularly have to change much in my engine

Hawkblood
14
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 17th Jan 2012 03:06
It's all up to you. It's your game.

The fastest code is the code never written.
hookkshot
17
Years of Service
User Offline
Joined: 12th Apr 2007
Location: Adelaide, Aus
Posted: 17th Jan 2012 10:38
so true but i reckon it will be worth it and prob make my game run better.

Login to post a reply

Server time is: 2024-05-14 18:10:56
Your offset time is: 2024-05-14 18:10:56