Extrarius-
Have you looked at Python at all? I''m browsing through the online docs whenever I have a chance (although I really should be concentrating on C++ since I''m still trying to nail down alot of the basics of that language) but it seems to be born to do scripting interfaces. Also, from what I understand it can easily be hooked into C++ classes, and you can extend Python objects through C++ as well.
It''ll probably be a good couple of months before I work on the script interface system since there''s so much I have to learn. Realistically, it''ll take me years to try to develop my game on my own especially since I''m still learning C++ as I go, but I''m gearing up on putting all my thoughts down on my homepage including all my source code that I ever come up with. For me, I''m going to create an open-source engine for everyone to take a look at, and who knows, maybe one day I''ll put up a CVS server where people can submit ideas (I''m not good at writing my own code, but I can grasp other people''s code better than writing my own).
For me, I want the engine to be open-source, but if I ever want to make money on my game, it''ll be through the storyline. Getting back to game design, I strongly believe that background and story must come first, and the game design and gameplay logically follows the game setting. That being said, I''m trying to make my engine as generic as possible to suit different time periods and genre''s, but there''s something to be said for knowing how your game world works. For example, since my game universe is so varied and diverse, that''s why I wanted a unit creation system as well as a unit organization system. I didn''t come up with these ideas solely as a "gimmick" for people to be more interested in them. In some ways, I think game design reverses the adage, "Form follows function"....indeed, I think "function follows form" in that the game functions (game design and gameplay) must be considered around the context of the setting...which is its form.
RTS where Players create custom units
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
I looked at python all of two minutes - up until the intro said whitespace matters. I couldn''t inflict that upon any scripters and I definitely wouldn''t want to deal with it myself.
I''ve also looked over many other languages, like lua and java. Lua seemed much like basic and didn''t seem to be very object oriented at all. I didn''t see any examples with any kind of class or struct at all.
While java would probably work, I''ve bad experience with every program(expluding web applets) written in java that I''ve ever used (they are always very slow, buggy, and crash often). While it may not directly be java''s fault, it has to do something wrong to have so many poor programs written in it.
I''ve also looked over many other languages, like lua and java. Lua seemed much like basic and didn''t seem to be very object oriented at all. I didn''t see any examples with any kind of class or struct at all.
While java would probably work, I''ve bad experience with every program(expluding web applets) written in java that I''ve ever used (they are always very slow, buggy, and crash often). While it may not directly be java''s fault, it has to do something wrong to have so many poor programs written in it.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
One thing that just came to mind which may or may not be a problem is the coding/scripting of the AI. If all of the gameplay is scripted, how will the enemy AI be created. The enemy AI will need to be able to make good decisions based on the rules of gameplay, which are scripted. How will the enemy AI know what kinds of units it needs, what to research, if the rules are scripted? Will it have to learn them on their own (NN/GA) will it have to read the script? I thought that enemy AI would be hard with hard-coded rules let-alone scripted ones!
I''d love to hear a solution!
Tazzel3d ~ Dwiel
P.S. This might be to technical... we are in the game design forum, but I guess I''m just asking for some general ideas on how it would be designed not specific code it''s ok.
I''d love to hear a solution!
Tazzel3d ~ Dwiel
P.S. This might be to technical... we are in the game design forum, but I guess I''m just asking for some general ideas on how it would be designed not specific code it''s ok.
Well, for me, that isn''t a problem - I don''t plan on having any AI at first. If I decide to create some AI, I''ll probably try to make some kind of system to record what players do (with ''context'' information) so the AI will mimic players. The hardest part would be keeping context information on everything so the AI ''knows'' why in that one game the player made a sniper and put it on a hill. If all the AI learned was that making a single sniper could turn the game, then it wouldn''t have learned anything really.
----------
crAzy
----------
crAzy
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
Eric Raymond thought the same way about Python when he heard of the white space limitations and he immediately discredited the language. However, he was forced to take another look at it when some Perl script he was trying to manage became unbearable. After he gave Python a chance, he says it''s his favorite language. Bruce Eckel (who has written some good introductory books on Java and C++) also seems to be advocating Python very strongly. You''re right though, trying to get used to having identation and whitepacing matter is very hard.
Tazzel-
Good point about the AI having to adapt to the script and the custom built units. I hadn''t really thought of it myself until you brought it up. The AI would somehow have to understand the inherent strengths and weaknesses of each weapon, hull type, mobility, etc. I think what a player could do is assign fitness numbers to certain traits that he thinks is more important (maybe the player believes a good defense is a good offense) so he assigns more weight to nodes (or fitness tests for GA) that involve offensive capacities. Then, once initial values are given, run some simulation tests and let the AI machines duke it out to learn what works. The player through the scripting interface can tweak the settings if necessary too.
I''m not too familiar with AI at all, but this would be a good question to ask in the AI forum.
Tazzel-
Good point about the AI having to adapt to the script and the custom built units. I hadn''t really thought of it myself until you brought it up. The AI would somehow have to understand the inherent strengths and weaknesses of each weapon, hull type, mobility, etc. I think what a player could do is assign fitness numbers to certain traits that he thinks is more important (maybe the player believes a good defense is a good offense) so he assigns more weight to nodes (or fitness tests for GA) that involve offensive capacities. Then, once initial values are given, run some simulation tests and let the AI machines duke it out to learn what works. The player through the scripting interface can tweak the settings if necessary too.
I''m not too familiar with AI at all, but this would be a good question to ask in the AI forum.
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
February 02, 2003 12:54 AM
quote:
Original post by Dauntless
...
If I give an order to the Cluster to attack another Cluster that is composed entirely of armor...there''s a problem. The OffenseModule of the attacking Cluster''s tanks won''t have any problem attacking...i.e. ClusterPlatoonA->Tank.Attack(Target* TargetedCluster) is perfectly legal, since its Attack() allows it to attack other armor units (it''s penetration stat and damage class are high enough). However, the infantry won''t be able to attack since the ClusterPlatoonA->Infantry.Attack(Target* TargetedCluster) function capability won''t let it attack other armored targets.
I''m not sure I get the problem, just make sure the infantry either use shoulder-launched anti-tank missiles or else make sure they don''t waste their ammo. Isn''t that always the problem and purpose of mixed units, some won''t have the necessary weapons for defeating certain targets while others will.
February 02, 2003 02:40 PM
Anonymous-
Not all infantry units will have AT weapons. In my game, the atomic unit for infantry will be "squads". Each squad (just like different vehicle unit types) will have different capabilities. For example, you can create the following infantry squad types:
Rifle Squad
Rifle Squad with SAW (Squad automatic weapon)
Rifle Squad w/disposable AT weapon
Support Team w/Light machine gun
Support Team w/Anti-Tank Guided Weapon
Support Team w/Light mortar
Support Team w/Anti-Air Missle
EW team
Communications Team
Combat Engineering Group
Forward Observer Team
Sniper Team
Irregular Warfare Unit (i.e. SEAL''s, Force Recon, Green Berets)
From here you can also have infantry designations that will reflect certain skills. For example:
Airborne (dropped out of aircraft)
Air Mobile (transported by aircraft usually helicopters)
Spaceborne (paratroopers that are dropped from orbitting warships)
Marines/Naval Infantry
Mechanized
Motorized
Armored Cav
Light Infantry
Notice how I don''t have classes like, Assault Infantry, Scouts, Light Infantry, etc which pre-define the capabilities of a unit. Take airborne troops for example. Generally speaking they are the same as Light Infantry in that they have to carry their gear on their backs, and as a consequence aren''t as well equipped. However, this does not mean that they can not attack armored targets. The reason my system works this way compared to others is that my units aren''t "generic". Yes, some infantry units do carry anti-tank weapons, but not all of them....and some unit designations have a greater portion of heavy weapons than others. Airborne troops have a lower proportion of troops equipped with support weapons (and also have less ammo and food) than their infantry cousins in say the Mechanized or Motorized unit types.
So the way this works out is that when you create your Cluster container objects for an Airborne company, only say 10% of the squads might carry anti-tank weapons versus maybe 20% compared to a mechanized company.
Not all infantry units will have AT weapons. In my game, the atomic unit for infantry will be "squads". Each squad (just like different vehicle unit types) will have different capabilities. For example, you can create the following infantry squad types:
Rifle Squad
Rifle Squad with SAW (Squad automatic weapon)
Rifle Squad w/disposable AT weapon
Support Team w/Light machine gun
Support Team w/Anti-Tank Guided Weapon
Support Team w/Light mortar
Support Team w/Anti-Air Missle
EW team
Communications Team
Combat Engineering Group
Forward Observer Team
Sniper Team
Irregular Warfare Unit (i.e. SEAL''s, Force Recon, Green Berets)
From here you can also have infantry designations that will reflect certain skills. For example:
Airborne (dropped out of aircraft)
Air Mobile (transported by aircraft usually helicopters)
Spaceborne (paratroopers that are dropped from orbitting warships)
Marines/Naval Infantry
Mechanized
Motorized
Armored Cav
Light Infantry
Notice how I don''t have classes like, Assault Infantry, Scouts, Light Infantry, etc which pre-define the capabilities of a unit. Take airborne troops for example. Generally speaking they are the same as Light Infantry in that they have to carry their gear on their backs, and as a consequence aren''t as well equipped. However, this does not mean that they can not attack armored targets. The reason my system works this way compared to others is that my units aren''t "generic". Yes, some infantry units do carry anti-tank weapons, but not all of them....and some unit designations have a greater portion of heavy weapons than others. Airborne troops have a lower proportion of troops equipped with support weapons (and also have less ammo and food) than their infantry cousins in say the Mechanized or Motorized unit types.
So the way this works out is that when you create your Cluster container objects for an Airborne company, only say 10% of the squads might carry anti-tank weapons versus maybe 20% compared to a mechanized company.
arrghh, stupid Opera7 doesn't save the cookie information for some reason...that was me posting again.
I just thought it'd probably be better for the Cluster to have pointers to the unit objects themselves, so in the example I had above, you can build an Airborne battalion like this:
--------------BattleGroupA---------------------
|AirbornePlatoonAlpha-----|
|RifleSquad x3------------|ClusterA
|RifleSquad w/SAW---------|
|
|AirbornePlatoonBravo--------------|
|RifleSquad x2---------------------|ClusterB
|RifleSquad w/Grenade Launcher-----|
|RifleSquad w/LightMachineGun------|
|
|AirbornePlatoonCharlie-------|
|RifleSquad x4----------------|ClusterC
|Anti-Tank Team---------------|
------------------------------------------------
Each of the Platoons = 1 Cluster, and furthermore, you can put the Clusters into another kind of container called a BattleGroup. Now, if I gave an order to ClusterA and told it to attack an armored unit, it couldn't. BUT, if I gave an order to ClusterC or to BattleGroupA, it could. Now imagine the complexities if you have mixed Clusters of units with differing capabilities. That's why I'm trying to figure this out, but I'll see if Extrarius suggestion works.
[edited by - dauntless on February 2, 2003 4:09:19 PM]
I just thought it'd probably be better for the Cluster to have pointers to the unit objects themselves, so in the example I had above, you can build an Airborne battalion like this:
--------------BattleGroupA---------------------
|AirbornePlatoonAlpha-----|
|RifleSquad x3------------|ClusterA
|RifleSquad w/SAW---------|
|
|AirbornePlatoonBravo--------------|
|RifleSquad x2---------------------|ClusterB
|RifleSquad w/Grenade Launcher-----|
|RifleSquad w/LightMachineGun------|
|
|AirbornePlatoonCharlie-------|
|RifleSquad x4----------------|ClusterC
|Anti-Tank Team---------------|
------------------------------------------------
Each of the Platoons = 1 Cluster, and furthermore, you can put the Clusters into another kind of container called a BattleGroup. Now, if I gave an order to ClusterA and told it to attack an armored unit, it couldn't. BUT, if I gave an order to ClusterC or to BattleGroupA, it could. Now imagine the complexities if you have mixed Clusters of units with differing capabilities. That's why I'm trying to figure this out, but I'll see if Extrarius suggestion works.
[edited by - dauntless on February 2, 2003 4:09:19 PM]
The world has achieved brilliance without wisdom, power without conscience. Ours is a world of nuclear giants and ethical infants. We know more about war than we know about peace, more about killing than we know about living. We have grasped the mystery of the atom and rejected the Sermon on the Mount." - General Omar Bradley
[code][/code] tags are your friend =-)
[edited by - Extrarius on February 2, 2003 4:51:39 PM]
--------------BattleGroupA---------------------|AirbornePlatoonAlpha-----||RifleSquad x3------------|ClusterA|RifleSquad w/SAW---------|||AirbornePlatoonBravo--------------||RifleSquad x2---------------------|ClusterB|RifleSquad w/Grenade Launcher-----||RifleSquad w/LightMachineGun------|||AirbornePlatoonCharlie-------||RifleSquad x4----------------|ClusterC|Anti-Tank Team---------------|------------------------------------------------
[edited by - Extrarius on February 2, 2003 4:51:39 PM]
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
Another question which I have encountered involves the method Units/Buildings/objects interact wtih eachother.
how do you have your units interacting with eachother? It obviously isn''t good OOP practice to alloe units to access the health data in other units... One method I have thought of includes having units creating damageobjects whenever they use a weapon. In this case, other objects are still accessing other objects'' data which I don''t like. Should there be a function similar to GetHitByLaser([fill with all of the attributes of the laser])? this seems like it would get very messy very quickly though.
I guess it would be fairly easy to just have explosives modify unit''s members... but not really
This situation must come up in about every game, so what is normally done?
What do you guys think?
Tazzel3d ~ Dwiel
how do you have your units interacting with eachother? It obviously isn''t good OOP practice to alloe units to access the health data in other units... One method I have thought of includes having units creating damageobjects whenever they use a weapon. In this case, other objects are still accessing other objects'' data which I don''t like. Should there be a function similar to GetHitByLaser([fill with all of the attributes of the laser])? this seems like it would get very messy very quickly though.
I guess it would be fairly easy to just have explosives modify unit''s members... but not really
This situation must come up in about every game, so what is normally done?
What do you guys think?
Tazzel3d ~ Dwiel
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement