
-----------------------------------
Homer_simpson
Tue Feb 10, 2009 4:46 pm

3d Strategy style game
-----------------------------------
I got kinda bored with my space game so i started working on this thing i'll get back to that one eventually.

controls :
camera: wsad and arrow keys

use mouse to select the models and click on the ground surface to tell them to move there(like starcraft)

i haven't really thought of what kind of game i want to make with this, so suggestions on the topic are welcome =)

-----------------------------------
SNIPERDUDE
Tue Feb 10, 2009 9:44 pm

RE:3d Strategy style game
-----------------------------------
Animations are a little sketchy, but certainly a great start.  Lighting was a little harsh though.  But then I'm on a really old machine, so it may actually look good at a better speed.

-----------------------------------
Homer_simpson
Wed Feb 11, 2009 1:43 am

Re: RE:3d Strategy style game
-----------------------------------
Animations are a little sketchy
here i've improved the code it should be much faster now even on an old computer.

-----------------------------------
CodeMonkey2000
Wed Feb 11, 2009 10:39 am

RE:3d Strategy style game
-----------------------------------
Why is it so slow?

-----------------------------------
Homer_simpson
Wed Feb 11, 2009 11:37 am

Re: 3d Strategy style game
-----------------------------------
i'm not sure why it would be slow :( i get 115 frames per second and i got a crappy old ati graphic card with 32 mb memory =/
what frame rate are you getting? and what kind of computer u have?

-----------------------------------
wtd
Wed Feb 11, 2009 2:45 pm

RE:3d Strategy style game
-----------------------------------
Just as a suggestion, since this is a site intended to help people learn, you may wish to submit source code as well.

-----------------------------------
SNIPERDUDE
Wed Feb 11, 2009 7:47 pm

RE:3d Strategy style game
-----------------------------------
Oh yes, that's much better.  Whatever you did improved the speed extraordinarily.  One problem I have though is selecting characters:
1) sometimes I find it hard to find the spot where I'm supposed to click.  Make it so I can click anywhere on the character no matter the angle.
2) maybe a drag select might be an idea to run with...
3) I find the fact that it deselects everytime you move the character(s) annoying.


Keep up the awesome work

-----------------------------------
Homer_simpson
Wed Feb 11, 2009 9:24 pm

Re: 3d Strategy style game
-----------------------------------
i'll develop better controls thanx for suggestions.




Just as a suggestion, since this is a site intended to help people learn, you may wish to submit source code as well.


I intend to. the reason i haven't done it yet because the code is a mess i'll have to clean it up a bit.

-----------------------------------
wtd
Thu Feb 12, 2009 12:42 am

RE:3d Strategy style game
-----------------------------------
You'll get suggestions for cleaning up the code if you show off your messy code.  ;-)

-----------------------------------
Homer_simpson
Thu Feb 12, 2009 1:50 am

Re: 3d Strategy style game
-----------------------------------
:D 

alright so i've improved the controls and fixed the light glitch;

controls are exactly like starcraft for picking and moving the units u can also drag the mouse to select more than one at once.
the camera controls are the same as before arrow keys and wasd.

i still have to do collision between the bots and avoiding. but i haven't though of anything past that yet =)

-----------------------------------
Homer_simpson
Fri Feb 13, 2009 3:17 pm

Re: 3d Strategy style game
-----------------------------------
added movement AI and collisions, i didn't spend much time debugging so report bugs plz

-----------------------------------
CodeMonkey2000
Fri Feb 13, 2009 9:40 pm

RE:3d Strategy style game
-----------------------------------
Are you path finding?

-----------------------------------
Homer_simpson
Sat Feb 14, 2009 1:44 am

Re: 3d Strategy style game
-----------------------------------
not exactly, since there can be more than 1 unit moving at the same time i check for collisions in the next frame and if there's a collision i set a temporary target point at a 90 degree angle to the original target which results in the unit moving around the obstacles.if there's a collision when moving towards the temporary taget point, the temporary target points will get recalculated.

#############################
##unit ______  obstacle _____--->target##
#########|##### /#############
#########|______/##############
#############################

it seems to work well. 
I'll comment the ai code and post it.

-----------------------------------
Homer_simpson
Sat Feb 14, 2009 1:35 pm

Re: 3d Strategy style game
-----------------------------------

void moveunit(unit_type &unitp)
{
    double arbx,arby,arbz;
    ///////////////////////////////action 1////////////////////////////////

    if(unitp.action==1)// if unit is in motion
    {
        for(int ucounter = 0;ucounter