View Full Version : A small game I started as a hobby project...
mazex
04-04-2012, 10:44 PM
Thanks to the C# thread here lately I just had to start a small hobby project in Unity3D / C#
Look at the attached image (ingame of course ;)). I have two thoughts. One is to connect this small slow paced strategy game to the C# server side code of a CloD server so all the plane groups move as they do in the game, and when the "Fighter Commander" using this game issues an order it gets into the CloD server as a text message to the pilots you try to control... And you naturally should be able to spawn new AI flights etc...
Another thought is a standalone BoB strategy game like the ones from the 80:es and 90:ies where you control squadrons that you launch, with pilot experience, fatigue etc to take care of for RAF. Which squadrons to put on patrol, which on 5 minute standby? Maybe recon flights and sea rescue? How many reserves for each squadron, who gets the new Spits? For the Luftwaffe you naturally have to hit radars, airfields, convoys and factories that will influence the RAF player... Maybe London if you are stupid? And if the german player gets X victory conditions like number of serviceable RAF fighters below 200 and functional radar installation below 25% he can launch Seelöve - and then you have to protect the barges with your fighter cover
And then there should naturally be mod support so you can create new maps and scenarios like Malta, Guadalcanal etc
For this test project I have used the awesome map IvanK did some time ago from the CloD terrain and some free spit 3D models from the net... And yes - you don't have to worry that invasion striped Mk IX Spits will make it into the final game ;)
Integrate it with CoD, /end thread :D
Seriously though, CoD is crying out loud and begging for some sort of graphical interface for commanders with the ability to assign flights and orders, it'd make online servers better by orders of magnitude.
tools4fools
04-05-2012, 02:59 AM
Another thought is a standalone BoB strategy game like
Not stand alone, please!
Commander does all the planning in your game, then thew resulting action is fought in CoD...
Integrated with pilot careers.
Human player can take over controls of any (flyable) plane during action or his 'career pilot'.
Now that would be prefect.
Flanker35M
04-05-2012, 05:43 AM
S!
Looks good. Having something like that would make CoD closer to BoBII :)
PS! Glad påsk :)
mazex
04-05-2012, 06:37 AM
Integrate it with CoD, /end thread :D
Seriously though, CoD is crying out loud and begging for some sort of graphical interface for commanders with the ability to assign flights and orders, it'd make online servers better by orders of magnitude.
Well, having slept over it I think it would be interesting to code AFC (Air Force Commander - working title ;)) to be able to do both from scratch ;)
When playing the "single player strategy game" the AFC AI has to spawn the flights and give them orders, set up rendezvous points and to direct them to the target etc. If integrating with CloD it would actually be about the same thing - the difference is just that the AFC would not have complete control. This is all based on the assumption that it will be possible to build a bridging API between them. The though is to build some kind of simple RESTful Web Service API where you have a number of methods like SpawnFlight(), GetFlightInfo(), ChangeFlightOrders(), GetListOfSquadronsAtAirBase() etc. These would then have to get the data through the server side scripting. As there are no such API:s open in CloD I guess one would have to do some hybrid solution where the server side script looks into some async Redis key/value command handler storage structure for new commands, and then stores data with some kind of interval in some hashtable with all flights/aircraft other objects to track. Then the bridge API would for many of the queries get an answer directly from Redis (like GetAircraftPosition), but for some like SpawnFlight the API layer would "create" the flight structure in Redis and return the ID for it, then on the serverside the scripts will see that it has a SpawnFlight request and do it... In a while the Redis structs with ActiveFlights will "show it" to the AFC GUI that is driven by drawing what it gets there...
An interesting dream would be that it could be possible to create third channel integrating via the bridge API.... Do a web lobby where players log in and select a squadron they want to join looking at the plan that the AFC gamer has put up. There all the current missions should be possible to show as well as the current battle situation based on the web page reading data the same way as AFC from Redis (or maybe make the whole AFC game web based - but that would hamper the GUI). When the user selects his squadron/mission/available plane - it gets into the Redis structure that AFC is "watching". The CloD server side scripts picks that up so when "Player X" logs into CloD they are moved to the correct location and plane, that has already been warmed up by AFC via the bridge API into CloD. The interesting coding part is that all objects, both the "AI" and player objects will have a life of their own and may disobey orders / crash into mountains etc...
But - all in all the stand alone strategy game would work exactly the same way, the difference is just that SpawnFlight() etc would have to be handled by the AFC AI instead of CloD. For the commander API in AFC it would be the same thing. Every loop get the list of flights/aircraft/movable object positions ("what - have they not gotten off the ground yet?") and update the game map. When the AFC player clicks a unit it calls GetFlightInformation that returns a datastructure with the flight/planes/pilots/orders chain/etc.. So if dividing the code into a GameWorld AI part that actually moves the planes and act in dogfights it really does not matter for the AFC GUI if it's a real player in CloD that did it, AI in Clod or the standalone AFC AI...
And finally, the dream++ is naturally to not have to do the pseudo bridge but get an API directly into a CloD server "from the outside" ;)
mazex
04-05-2012, 06:42 AM
S!
Looks good. Having something like that would make CoD closer to BoBII :)
PS! Glad påsk :)
Detsamma :)
BGs_Ricky
04-05-2012, 06:50 AM
A stand-alone version would be nice too, I still play Achtung Spitfire and Over the Reich from time to time, but I'd like to have a game of that kind with some nice up to date graphics :cool:
salmo
04-05-2012, 07:09 AM
Similar to the old IL2 Bellum code. See http://www.il2war.com
Log into squadrons, battle objectives, move squadrons around the bases, capure territory (if appropriate), suply bases with ammo/bombs/planes.
mazex
04-06-2012, 09:53 AM
A stand-alone version would be nice too, I still play Achtung Spitfire and Over the Reich from time to time, but I'd like to have a game of that kind with some nice up to date graphics :cool:
I do that too - so that's exactly why I started this ;) Bit of a different concept here though as I don't plan on the tactical level (directing the actual dogfighting). But maybe later... I think I will concentrate on trying to make an abstraction layer so the tactical AI can be either CloD or built in. I guess I must do some "spike" first to test that both work... The problem is all the time it takes :)
Right now I know that Unity gives me the graphics and basic concepts needed so that was why I did the test gameworld from the picture. Now I'm back to the drawing board and this is the current state of my concept document (incomplete, I know - I just wrote what is there sitting on the train on my way home from work yesterday ;)):
Air Force Commander - Design ideas
Game concept ideas
A slow paced strategic real time game where you command either RAF or Luftwaffe during the Battle of Britain in the base game. You control squadron sized air units, both bombers, fighters, recon and search/rescue missions. Maybe naval units in the future? Nahh...
The idea is to be able to play the game both as a standalone and connected to Cliffs of Dover by Maddox Games so that the tactical part is done in that game via a bridge API using a Redis db for storing the object structures and then having the server side C# scripting handle spawning flights in CloD and returning information to the game engine via Web Services - or some raw socket API if needed for performance. If playing standalone there should be a server component that does what CloD does so the game calls the same methods (but not via WS calls in that case). That hopefully simplifes multiplayer too...
There should before the game coding starts for real be a ready object model for the OOB:s for different sides (initially RAF and Luftwaffe) so players can edit that data themselves down to individual planes with correct markings and pilot names... And the aggregate those planes into squadrons, wings, Sector commands etc. This should be stored in XML-files that are open for manual edit too - but there should be a standalone OOB editor as well.
All units, objects and air bases etc should be stored with map grid positions and assigned squadrons etc in the OOB so the game can load all “startup data” from the XML-files. ie, start by loading the air bases, then find which squadrons are assigned to that, which planes/pilots are assigned to that squadron etc... Load
The goal of each side is to win by achieving different victory conditions. Maybe some specific goal if you just play a “scenario” like “destroy 50% of all the radar installations i southern England”, “Achieve aerial supremacy over Southern England by lowering the number of combat ready RAF aircraft to 200 AC” etc. In the “Grand Campaign” you can maybe have the goal to launch “Operation Sea Löve” that needs a list of victory conditions matched? Then an invasion fleet could be launched and you must protect it so at least 75% of the ships survive?
It should be possible to extend the game by adding new maps/scenarios that should be possible to create or download as “mod packages” where you can have a new custom set of game objects that get loaded with new plane types, stats, unit names, OOB etc.
Basic functionality
The game starts with a menu with these options:
- New Campaign:
* “Grand Campaign”. The goal is to invade England as LW after getting the RAF down to 200 AC, Industrial capacity to 50% and just 25% of radars left or similar. There should be a time based “end condition” - launch Sea Löve until 30 of october or similar? For RAF it’s naturally about denying that to the germans ;)
* Different sub-campaigns like “Attack on coastal shipping”, “Attack on airfields and radar” etc. Maybe some “Sector/Luftflotte commander” campaign for smaller scale?
* New Mission - you get only one target that should be completed - ie destroy the radar installations at Dover.
- Options (realism, graphics etc)
The map:
The map depicted in 3D should cover southern England and NW France. About the same size as the map in the PC simulator “Cliffs of Dover”...
Minimap:
In the bottom right corner there should be a minimap with different filters.
3D Objects:
The units should be 3D objects, three small fighters etc? Or maybe “counters”? There should be a small number next to each with the number of subunits and maybe some bars for relevant information?
When a friendly movable object is left clicked it should be selected and it should get a ring around it. An object information box should be shown in the bottom left corner of the GUI with context sensitive information for the obejct, and an orders/actions box in the middle GUI.
When you right click an object a menu should appear to the left with different options depending on the object type selected.
Game objects
Air Formations
Generic Information:
Air formations are naturally the “beef” of the game. It should be possible to have Air formations with just a single aircraft as well as a “Big Wing” formation with multiple squadrons...
Bottom left information field with with:
* Unit type
* Fuel level
* Ammo level
* Number of original ac / current ac.
*Unit commander - name, rank, experience, number of kills, fatigue
* Button to view list of sub-units in the formation. It should be hierarchical with Wing/Gruppe->Squadron/Staffel->Flight/Schwarm/Rotte->indivudual planes with different information depending on the level.
Bottom orders menu with:
- Move to (which is also the default right click option when an object is selected and you click on empty ground, an airport or a friendly air formation. If you click some friendly object a context sensitive meny should appear with commands like “Land”, “Escort”, “Merge with formation” etc...)
* If shift is pressed a chain move order should be possible
- Set up patrol pattern
Put up point A and then point B and the plane will patrol this line
- Set up “searchbox”
Put up a box that should be patroled. The box should be possible to rotate to put up a suiting box over the south coast of England for example.
- Attack/Intercept (which is also the default right click option when an object is selected and you click on an enemy obect)
* After selecting a target a sub-menu should appear with different alternatives depending on the target... For example when attaing a formation of bomber with fighter cover the alternative to “Attack bomber ignoring fighters”, “Only attack figher escort” etc. There should also be a some checkboxes with options like “Just one pass”, “Minimize risk”, “All out attack” etc..
Air Bases
Generic ideas
Air bases are your home, and all squadrons must have a home base. It should be possible to relocate the squadron home base.
Depending on the size and damage level of the base there should be a maximum number of squadrons/aircraft that can use a base. You should not be able to put all you Spits at Manston ;)
If a base has been attacked by the enemy and damaged there should be damage recorded into some different categories that will influence the player in different ways, when attacking a base it should be possible to select which of the following targets to focus on the follwing “subsystems”:
* Runways - If damaged it will take longer time to get your squadrons into the air or land, and the more damage the more impact. And if the damage level is above a certain level there should be a risk that aircrafts crash when taking off / landing.
* Hangars - If damaged the current planes that are on the ground in that base may be destroyed. The permanent effect should also be that repairs of damaged aircraft increase by %damage * X.
* Barracks - Direct effect if pilots are there is that they may be killed. The permanent effect shoud be that pilot fatigue “heals” slower by the damage level * X.
* Air defenses - If damaged there will be less risk for attacking enemy planes until repaired.
Bottom left information field with with:
Bottom left information field with with:
* Information (Base name, generic information)
* Status - damage to different “subsystems”
* Squadrons / units assigned to this base
...
Bottom orders menu with:
* Create mission / flight
* Repair orders (select what to focus on repairing)
* Reinforcements - click to assign new planes/pilots from the “generic reserve” pool to this base. This button should be green/orange/red depending on the current need for reinforcements. There should also be a map overlay to display this for the whole map with all bases.
Ship Convoys
Generic information:
Convoys will come from different directions and follow a number of predefined paths
Convoys will have a number of ships and for each a cargo load of the different supplies needed.
Radar Installations
The radar installation should be rather simple. Some status and current efficiency level based on the damages.
Aircraft Factories
Hmm, how much to put into this layer. The idea is not to have some silly RTS style handling where you “build” units - but it would be nice to select the desired production of which aircraft type maybe. There should be different production times and a time to switch production. Hurricanes should be cheaper than Spitfires, but there should be no “research tree etc”...
Each factory should have a current production capacity of number of aircraft of type X that gets into the reserve each day. Should be a float number as the total amount produced by all factories each days is what counts and should be an int ;)
Damage should reduce production by X percent and it should maybe be possible to assign how much focus there should be on repairing individual factories vs air bases vs radar installations?
salmo
04-06-2012, 10:35 AM
Ideas:
SUPPLY
Based on the amount of oil a side has.
Increase supplies
1. Ships arriving at a port increase oil supply. Truck convoys arriving at airfields increase oil supply at airfield (oil is anaogist for fuel)
2. Amount of oil held by the side infuences aircraft production rate (at factory objects) & amount of fuel for planes (fuel storage object) at each airbase.
Decrease supplies
1. Destroying factory objects reduces aircraft production rate. Destroying fuel objects at airfields reduces available fuel at that field.
Aircraft
Production rate
1. Affected by number of factory objects & amount of oil side has supplied.
2. Factory production consumes X amount of oil to produce a product (aircrfat/ship/tank).
2. Need a methodology to distribute new aircraft to airfields. (a) AI fly from rear airfield to operational airfield? (b) some type of truck convoy delivers them to operational airfields? (c) they just 'automatically' appear at operation airfields?
3. Do factories produce new ships as well as aircraft? remember in time we'll have the Russian front, so do factories produce tanks as well (future option)?
Fuel
1. Fuel objects at airfields resupplied by truck convoys. Affects how much fuel aircraft can take. Fuel loadouts reduce fuel at that airfield.
2. Fuel tank objects could regenate over time, maybe at a rate proportional to amount of oil the side has &/ number of workshop objects at the airfield?
Damage/wear
1. 'Persistent' aircraft states. Aircraft spawn in previously worn state from previous missions. Workshop objects at airfields affect the rate of 'repair' of worn aircraft?
2. Crash landed aircraft, with minimal damage, returned to game after a short period of being repaired.
3. Aircraft assigned to an airfield, but not on a mission, appear as static (or Ai aircraft with no fuel) at that airfield & thus can be destroyed.
4. Damaged (crash landed) aircraft appear as static (or Ai aircraft with no fuel) at home airfield until repair by the workshop.
Aircraft losses
1. Both static/stationary aircraft at an airfield & airborn AI or player aircraft destroyed count as lost aircraft.
5./JG27.Farber
04-06-2012, 11:19 AM
This is very interesting. I wonder if this could be used to enhance a multiplayer campaign. How accurate would the data the commander from one side sees be? Would there be a fog of war? Also would the battle area grid be shown in the commander GUI?
mazex
04-06-2012, 01:46 PM
This is very interesting. I wonder if this could be used to enhance a multiplayer campaign.
Thats the thought :)
How accurate would the data the commander from one side sees be?
The problem is that I have not done any server side scripting in CloD so I'm only guessing... From what I understand you have access to a collection of all aircraft in the C# script. The though is that the server side script then saves them every second or so to a Redis key/value storage (very fast). Then the ACF Server component exposes methods that the AFC client reads from via the Redis structures...
So the answer is that the AFC game should have updated positions of all planes every second if that does not load the server too much. Then AFC can depending on the Radar coverage, ground WAF:s in watch towers etc decide what to show to the commander! So it's up to AFC to do the fog of war which is a very important success factor for the game...
lso would the battle area grid be shown in the commander GUI?
Should be no problem...
5./JG27.Farber
04-06-2012, 01:51 PM
Wow sounds great. 5./JG27 would be pleased to help you with this if you need it, we have a dedi server and missions etc... How far away do you think you are from releasing something stable?
We are planning a 7 part multisquad campaign after the "grail patch" much of it is done. However we are really unsure how to coordinate each team (red/blue). Something like this could solve this problem. It sounds great.
mazex
04-06-2012, 03:22 PM
Wow sounds great. 5./JG27 would be pleased to help you with this if you need it, we have a dedi server and missions etc... How far away do you think you are from releasing something stable?
Unfortunately I think that it's a long path to a stable version... I work full time as a development manager with a team about the same size as Maddox games and have two kids etc at home so it's not that much time over ;) This is more to get to program some stuff myself and not only manage others doing fun programming :)
So - as it is now I just have the map with some 3D objects to move around. Now I have stepped back and focus on getting the design ready "on the drawing table", and I will not start developing until all the think work is ready - then I will plan some sprints of work that gradually will get me somewhere... But I also have to become acquainted with Unity 3D while thinking so I can have a proof of concept that it can do all I want it to do - and that part seems positive, it's very easy to work with!
mazex
04-06-2012, 03:29 PM
Another interesting thought is that if the server side AFC component is flexible enough there could be multiple commanders for each side. One for each sector, one only responsible for naval units etc. It would really be no problem if many AFC clients connect to the same server session if one is the master that splits the responsibility at startup. I someone logs out it would be nice to be able to let another commander join an in progress game... To be able to have an "ongoing war server" that is naturally a must...
mazex
04-07-2012, 09:54 PM
Ideas:
SUPPLY
Based on the amount of oil a side has.
Increase supplies
1. Ships arriving at a port increase oil supply. Truck convoys arriving at airfields increase oil supply at airfield (oil is anaogist for fuel)
2. Amount of oil held by the side infuences aircraft production rate (at factory objects) & amount of fuel for planes (fuel storage object) at each airbase.
Decrease supplies
1. Destroying factory objects reduces aircraft production rate. Destroying fuel objects at airfields reduces available fuel at that field.
Aircraft
Production rate
1. Affected by number of factory objects & amount of oil side has supplied.
2. Factory production consumes X amount of oil to produce a product (aircrfat/ship/tank).
2. Need a methodology to distribute new aircraft to airfields. (a) AI fly from rear airfield to operational airfield? (b) some type of truck convoy delivers them to operational airfields? (c) they just 'automatically' appear at operation airfields?
3. Do factories produce new ships as well as aircraft? remember in time we'll have the Russian front, so do factories produce tanks as well (future option)?
Fuel
1. Fuel objects at airfields resupplied by truck convoys. Affects how much fuel aircraft can take. Fuel loadouts reduce fuel at that airfield.
2. Fuel tank objects could regenate over time, maybe at a rate proportional to amount of oil the side has &/ number of workshop objects at the airfield?
Damage/wear
1. 'Persistent' aircraft states. Aircraft spawn in previously worn state from previous missions. Workshop objects at airfields affect the rate of 'repair' of worn aircraft?
2. Crash landed aircraft, with minimal damage, returned to game after a short period of being repaired.
3. Aircraft assigned to an airfield, but not on a mission, appear as static (or Ai aircraft with no fuel) at that airfield & thus can be destroyed.
4. Damaged (crash landed) aircraft appear as static (or Ai aircraft with no fuel) at home airfield until repair by the workshop.
Aircraft losses
1. Both static/stationary aircraft at an airfield & airborn AI or player aircraft destroyed count as lost aircraft.
Thanks for the ideas!
I like almost all of them and will add them to the wishlist, even though I think the more advanced "economic" stuff may have to wait for version 2.0 ;) I was thinking in the way that the supplies delivered by ships would be used to sustain production, but maybe in a rather crude way - like that you need x amount of oil and steel each week to maintain 100% production with some generic formula how it decreases if you can not accomplish that?
And regarding the distribution of new planes I thought about some overall menu listing all squadron at the end of a day where you see red numbers behind the squadrons thar need replacements of both planes and pilots. Then a total of produced planes that day and two buttons behind each squadron in need with "fully resupply", and just a plus to "add one plane to this squadron". It should naturally automatically add the type of plane type the squadron uses. That way it would only be one screen to handle this part.
I really like the damage/wear section as that was an important supply of repaired planes that the german intelligence did not realize the importance of! Maybe as a summary in top of the resupply page with the number of new planes and the number of planes repaired at central facilities that the base mechanics could not fix?
It's so much one could add, and really not that hard for many of those ideas if the game is designed with it from start...
/mazex
Osprey
04-08-2012, 12:12 PM
Depends if you want it historical or to win a war as blue. Only about 5% of oil was lost to ship sinking and the fuel supply increased throughout the BoB rather than decreased. Oil was also supplied by pipelines to airfields (much like later after the invasion with the pipelines laid through the channel).
In terms of accuracy the real pressure for both sides was on lost pilots, not equipment.
salmo
04-08-2012, 12:47 PM
Depends if you want it historical or to win a war as blue. Only about 5% of oil was lost to ship sinking and the fuel supply increased throughout the BoB rather than decreased. Oil was also supplied by pipelines to airfields (much like later after the invasion with the pipelines laid through the channel).
In terms of accuracy the real pressure for both sides was on lost pilots, not equipment.
My ideas were not to create a historically accurate representation of the war, but rather based around creating equal gameplay where both sides could target "resources" to win the war. Those resources being pilots, planes, suply & production. That way, there is gameplay for fighter jocks & mud-movers :)
5./JG27.Farber
04-23-2012, 09:28 PM
So, any movement on this? Sounds good either way.
mazex
04-24-2012, 10:43 AM
So, any movement on this? Sounds good either way.
I have it on the shelf for while now - gardening work on my spare time now unfortunately accept for a silly app I wrote last week to poll for CloD patches ;)
Anyway - you offer for help is appreciated and when I get down to business I will post the progress and help needed requests!
My plan is to get the design document and object model all done before I begin, so I don't end up with stuff like "o crap, it's not possible to save while in a mission" etc ;)
vBulletin® v3.8.4, Copyright ©2000-2025, Jelsoft Enterprises Ltd.