Help with player and ai(solved)

The Partridge Family were neither partridges nor a family. Discuss.
Post Reply
cameron
Posts: 794
Joined: June 26th, 2012, 5:38 pm
Location: USA

Help with player and ai(solved)

Post by cameron » January 13th, 2013, 4:42 pm

Im trying to make my income wars game. I cant figure out a way( a good way ) to easily choose between spawning an ai marine and a player marine. Is there any good way to do this?
Last edited by cameron on January 13th, 2013, 10:53 pm, edited 1 time in total.
Computer too slow? Consider running a VM on your toaster.

cameron
Posts: 794
Joined: June 26th, 2012, 5:38 pm
Location: USA

Re: Help with player and ai.

Post by cameron » January 13th, 2013, 10:52 pm

I figured out a good way after 5 hours of coding.
Computer too slow? Consider running a VM on your toaster.

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Help with player and ai(solved)

Post by LuX » January 14th, 2013, 3:24 pm

Alright... From your first post I would have had no idea what you were trying to do, so just out of curiosity, what did you try to do?

You have talked about your income wars game for some time now but not really told what it's about. Seems like something interesting.
ʕ •ᴥ•ʔ

cameron
Posts: 794
Joined: June 26th, 2012, 5:38 pm
Location: USA

Re: Help with player and ai(solved)

Post by cameron » January 14th, 2013, 4:33 pm

What I was trying to do was not have to make a spawn function for every unit. So i did the polymeriphism thing. I just made one spawn class that can spawn any unit in the game.


I stopped working on that game until 2 days ago when I remade the whole thing. My other one was very disorganized and I couldnt even read my own code.

The game:
2 bases.
the player sends units based on the amount on money in his bank (each unit varies in price )
there will be meele units, ranged, and AOE units.
every unit you send the players income increases
the income is sent to your bank
same thing with the comp
you try to destroy the enemys base first one to do that wins.
There will be more that one unit once I get the the game made Im just starting it with one to test it out.

Right now I am trying to make a targeting system for my units, to target enemy units based on their distance from my unit. I have no idea what soever on how to do that.
Last edited by cameron on January 14th, 2013, 4:41 pm, edited 1 time in total.
Computer too slow? Consider running a VM on your toaster.

cameron
Posts: 794
Joined: June 26th, 2012, 5:38 pm
Location: USA

Re: Help with player and ai(solved)

Post by cameron » January 14th, 2013, 4:39 pm

I also need to put vectors into this game soon.
Computer too slow? Consider running a VM on your toaster.

Post Reply