Recommended Posts

Currently I'm working on an open-source web game, which uses php and mysql as its base. It's a war game, with 8 different units you can have. However, I'm having trouble thinking of a rather flexible attack system. I've gone through 3 different attack systems; none of them seem to work.
The current version of attack I've implemented has unit1 of playerA attack unit5 of playerB, unit2 of playerA attack unit4 of playerB, and so on so forth (see, i want it to be flexible in relation to who each unit attacks, since I want this to be more of a moddable engine). In the end, any leftover "firepower" will determine how much land is gained in the end. However, this barely seems real...
So the point is, I need some sort of schematic that is both real, AND flexible to include different types of units.
below is a copy of my config.php, which is where admins set the basic configurations for units:

as you can see, it's supposed to be truly moddable. In other words, I need a system that will seem real despite any minor changes to the stats.
Many thanks!
evolutional - Please use source tags when posting code!
[Edited by - evolutional on September 12, 2004 3:19:41 PM]

0

Share this post

Link to post

Share on other sites

Give us a little more info. For example, how many men can you send to battle at once? Can you assign specific units to specific enemy units? How does the battle play out? How do you know which units the other guy has?

I think a simple rock-paper-scissors type of scheme would work well though.

Share this post

Link to post

Share on other sites

Original post by visageGive us a little more info. For example, how many men can you send to battle at once? Can you assign specific units to specific enemy units? How does the battle play out? How do you know which units the other guy has?

I think a simple rock-paper-scissors type of scheme would work well though.

Thank kind of thing. But you could have many more...like airplanes, etc.

As to knowing your opponent's stats, you can only find out how many units in total he has (ie combined units), not of each individual unit. The admin presets what each unit attacks, but the players cannot specify what to send to what.

I think I see what you're getting at with rock-paper-scissors...however, I was thinking more like having a weakness/resistence point value (preset in config) that each unit has with each other unit...