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.

2D All the way! / A 2D RTS *gasp*

Author
Message
Shadowed Lightning
21
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 20th Jan 2006 03:53
OK, so I\'ve decided to help someone on a project to make a 2D RTS with sprites, I\'ve never used sprites before in my life, hes never used Darkbasic before in his life, ive been programming for 4 years, but very lightly on and off. Here is the current little piece of crap code that we have managed to get off of Phaelix\'s RTS tutorial:

the images are just a box and a circle so you can make em urself real quick, 100X100 pixels
its not working though, not crashing out or anything, and it even selects the units right, but i can\'t get them to move...
anyone help?

AMD Athlon 64 3200 - GeForce 6800 GT - 320GB Hard Drive
1024MB RAM
The end is near
21
Years of Service
User Offline
Joined: 19th Jun 2005
Location: USA
Posted: 16th Mar 2006 07:27
use move sprite spritenum,speed
and rotate sprite spritenum,angle
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Mar 2006 10:37
I ran your code. Remember when selecting to include the boundaries of the sprite, not just its location. Otherwise, you'll only be able to select a sprite by selecting its upper left corner.

I started work on a 2d RTS back in 2004. (according to my computer)
Never finished it, got bored messing around with all the 2D stuff. I've attached the project, it's only 82.9kb

Should get you started on simple movement and a scrolling map. (hit the edges of the screen with mouse to scroll)


sadsack
22
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 28th Mar 2006 23:03
Thanks phaelax
Ooska
21
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 27th Apr 2006 02:41
Yeah, a RTS in Darkbasic (classic) is hard! I made 4 units and got sick of it! Since there is no rotate sprite command you have to manage 4 images per unit.

Read Ender's Game. And all its sequals.
indi
23
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 27th Apr 2006 06:15
if tho, you take db classic and make a 3d game with 3d plains and point the camera directly down, you will have a 2d looking game in 3d and you can then.


[1] gain all the 3d comamnds including rotate plus rotate Z not just X and Y
[2]improve speed for graphic card users.
[3]tap into special effects in 3d etc..

If no-one gives your an answer to a question you have asked, consider:- Is your question clear.- Did you ask nicely.- Are you showing any effort to solve the problem yourself 

Login to post a reply

Server time is: 2026-07-04 13:25:58
Your offset time is: 2026-07-04 13:25:58