Showing posts with label networking. Show all posts
Showing posts with label networking. Show all posts

Saturday, 31 August 2024

Anniversary 10 Years On Steam

  

Airship Dragoon has been on Steam for 10 whole years. Even Albert Spier only got 30 years in Spandau ...

To celebrate this monumental event I put the game on discount of a whoppinh 95% ... but Steam only allowed a 94% discount due to transaction charges converting into US dollars. So 94% it was, slightly odd number that it is.

One of the interesting things that I found was that the Far East of Korea, Japan and China did make the top 10 for sales. This was especially gratifying as I knew there were plenty of pirated copies in the early days floating around China due to the amount of traffic my website got to download the additional map pack.

In other news, August draws to a close. A month of scorchio sunshine, sitting out by the veg patch, absorbing vitamin D in non-capsule form and sewing myself a medieval bag hag (summer pattern), going to make a winter one with felt to ward of hypothermia later. 

Alas the baking sun meant that the veg patch was going bone-dry, especially as the water barrels had been emptied. Roll on some rain, in fact after the utter soaking for the first half of the year, if it could just have kept a bit back for mid-August instead of swinging from "I need to build an Ark" to "I need a Thumper to distract the sandworms", it would have been appreciated.

Behold my mighty carrot crop! That was it ...

 When it finally did rain it did at 3.30am, so I was outside changing water barrels over with a coat over my jim-jams. If anyone has a working weather control machine who is not CIA, please could I have some more rain.

I also updated the demo for Monsters Loot Swag, to the most modern working build of the game. The old version of the demo had been removed due it being built with Ye Olde game engine version which predated Torque3D 4.0 and the fancy asset system and PBR (Physical Based Rendering) materials.

In other indie game dev news, I finally fixed all the networking jitter I had previously been fighting ... by simply ripping out the custom player class code I had written and using an actual seperate camera system. I had always had a sneaking suspicion that trying to go through the player class and directly use the player object's own cam/eye node might not be the best way of doing things, and in the end, said sneaking suspicion was more jumping up and down suspicion with total loss of stealth abilities.

I decided to use the Open Source 3D Action Adventure Kit camera system as a base, and after a bit of modding I got it to work with my existing lock-on target system. Behold - moving AI who have been locked on by both hosting client and remote client - now without any jitter!

So that was August, and now we will be onto September, named after the Greek "sept" meaning seven, because it's the seventh month ... or at least was until two despots added new months after the sixth one, and conveniently named said months after themselves ...

Anyway, next up on the dev frontier, Monsters Loot Swag only needs 1 more level with enemy boss, and 2 more unlockable players making, before a bit of tidying up to finish it off. I am not in a rush however, as I would rather ship in early to mid 2025, and thus give myself time to get the next game concept furthered more, hopefully to the point of having some real gameplay and a store page available for coming soon™.

As my previous attempt to drum up interest with the Monsters Loot Swag early access release didn't achieve any support, I might try an open beta next time.

Wednesday, 31 January 2024

Space Year 2024 Is Go

 

DIY gambeson, with padded arming cap (not visible) to stop sallet wobbling on head - it's everything you need to keep warm on a cold winter's night ... or possible prepare for the GREAT HAPPENING when modernity crumbles and all is returned to the ashes ... 

Monsters Loot Swag has received it's 24th Early Access Update, available here.

Speaking of which, I ran some of the game engine's internal debugging tools - which I have previously been unfamiliar with - to see what was happening with networking. Alas these debugging options were not as helpful as I had hoped ... 

TORQUE_DEBUG_NET for NetConnection packet logging, DebugChecksum guards to detect mismatched pack/unpacks, and Detection of invalid destination ghosts. Link to PacketDataChecksum disagree code.

TORQUE_DEBUG_NET_MOVES for detailed console logging of net moves. Link to moveChecksum disagree code.

What I got was kind of annoying and much less useful than I had hoped ...

Test1:

Spawning into a loaded level, with the randomized gameplay assets unbuilt (the Swag), I got 6 packetData and 17 moveChecksum disagrees, all from loading the level to the client and then spawning the player object.

Shooting 6 times gave me 3 packetData and 3 moveChecksum calls.

Moving around in a small circle had no effect.

Test 2:

Spawning into a loaded level which had then been populated with the randomized gameplay assets (the Swag), gave 4 packetData and 38 moveChecksum calls.

Shooting 6 times have the same 3 calls for each.

Moving around in a small circle for a few seconds gave 57 calls for both packetData and moveChecksum.

Conclusion; everything that gets loaded AFTER the level has been loaded is going to throw checksum disagree calls with every update of the client's position just because it wasn't in the original level file. Now add hordes of monsters, explosions, projectiles, etc and there is a huge amount of console spam with very little debugging value for networking ... :/

The good news would be no packet dropping showed up.

Anyhow, we perserve.

Thursday, 30 September 2021

One Year Of Aeronauticals

 So it has been an ENTIRE YEAR (from 1st October 2020) of working on my aeronaut/aeronauticals/dogfighter game that was loosely inspired by Ace Combat with 1930s aircraft and a lot more tightly inspired by Descent: The Great War space combat simulator but with gravity.

How it started (after a month or so anyhow) ...

And, how it's going ...

 
So ... that's been a bit of a change then ...
 
First up, I've created a brand new class of object, aeronautVehicle, that derives off vehicle class, which derives off rigidShape which is the thing that controls the physics, and shapeBase class ... which everything and it's dog seems to derive off if you want it be any form of a dynamic object.
 
This meant that I had to work out how an aircraft actually flew worked. Obviously this would be incredibly boring so instead I worked out how an exciting arcade style flight model worked basing it on ideas and physics values that I mostly pulled out of my bum.
 
Actually that's not entirely true, I did detailed research for months previously, basing everything on real world values and compiled lengthy text files on how the whole thing would work; eg: hitpoints were based on empty aircraft weight divided by length per area element (wings, tail, etc); and thrust was based off maximum take-off weight divided by kilo-watts of power per engine (or something like that) with modifiers for total aircraft area versus air friction... eg: fat aircraft would lose speed faster than smaller ones, etc, etc.

Similarly gun damage was based off calibre, calibre per 10mm modifier, number of guns, and some other stuff, with more guns increasing both damage and overheat timing.

The real problem was creating an Ai system to fly the aircraft against the player. Not only did they not have to crash into anything --- which ended up being much harder than you'd think --- they also needed to act as if they were a real pilot, so I ended up making 12 (?) evasive maneuvers that they could pull when neccessary. Stalling ended up being a huge issue depending on speed and attitude of the aircraft and tightness of a turn. I ended up creating a class of super-Ai pilots who I never stood a chance against, and had to dial the whole OP back, discovering that the margin between genius Ai flyer and absolute idiot was very small.

Damageable elements reduced performance of the aircraft's speed, turning, rudder, etc, and the whole thing had to modeled in 3D and textures to give the player good visual feedback as to what is happening to their aircraft.

PBR was a thing ... a thing which I did not know what ORM stood for and so ended up putting the rough and occlusion maps into the wrong channels because that is how they are set out in the materials editor.

My grasp of networking certainly improved, I had managed to create a co-op mode - based on seperate instances on the same box because I only have the one machine - and I soon realized that I wasn't supposed to just fill the whole of pack/unpack with all of the read/write data because much of that was on the server anyway. Trailing definately need to be on both or either Ai/players would trail and the others wouldn't depending on how they were handling their aircraft. Huge amounts of pack/unpack were commented out and the weird jittering my AI aircraft had been doing in debug mode stopped.

I created a crude lobby system were the level loaded without the mission starting except a briefing to give the player the details of the mission via a seperate file and to choose their aircraft and paint schemes. The player would then wait in this psuedo-lobby for other clients to connect or start a co-op multiplayer mission alone and newly connected players could drop in and out. Debriefing required a bit more voodoo as shifting large amounts of player-mission contextual descriptors - that's text - required some fancy thinking to avoid abusing huge numbers of server to client calls - something that I had been very keen on working smoothly and with the least possible amount of bandwidth.

 Creating missions was a series of timed and triggered events based on what the player and Ai pilots were doing. This required lots of scripting due to the lack of physical triggers which a player could walk into on a more normal character based game of the types I had previously demoed or developed.

And so that is kinda of it. After a year of development I have a fully functioning dogfighting game that plays halfway between an arcade shooter and simulator with a mission complete with playable roster of aircraft, briefing, debriefing and drop in and drop out online co-op mode. So naturally it's time to relegate this to the backburner and go return to my previous game project (and really tidy up it's networking) as I want something that can at least be released for Early Access early(ish) next year and Freespace-style dogfighter will require the most work whilst topdown catgirl mayhem is around halfway complete but needs "fluff" adding for the player's ease of life for the first few levels.

Tuesday, 31 August 2021

Takes Two To Tango With A Brief Debrief

Having mostly been a single player player ... stops, rereads that, nah we're good ... the concept of networking multiple clients wasn't something that I had particularly much experience with. This was most obvious when reviewing my C++ code and seeing that I had literally packed/unpacked everything of my custom aeronautVehicle class regardless of whether it required it or not. On further inspection only rigidBody attitude and whether it should be emitting vapour or not really needed to passed around every frame the engine updated. This could probably explain the jitteriness of Ai and other client aircraft movements.

Debugging ... (don't @ me!)

After quite a bit of faffing around I not only managed to get 4 player Co-Op mode working but had it so that other remote human clients could arrive after the mission had started, and replace the allied AI who had already spawned in their place. The Ai would smoothly disengage, move away and fade out before being deleted, hopefully out of view of other players.

Any later joining client would have to pick the remaining available flights/callsigns that human players were permitted at the briefing screen. Initially I had listed each and every callsign individually, but once I had the whole system up and running, I decided it would be better to simply list available wings and the number of taken and free roles within them. This would cut down on the possibility of scrolling through vast numbers of disabled buttons.

Co-Op Mode! Player 1 and 2 look at each other during a flypast.

The briefing screen also acted as a rather rudimentary lobby. Players could arrive and choose their flight roles, aircraft and paint job, and then wait for the server to fill. Once two or more players had arrived and selected their aircraft and were ready to sortie, a countdown timer would start and automatically trigger the mission so they weren't waiting around for ever. A lone player, waiting on the server on their own could start the mission with Ai wingmen, and future arriving players could drop in and drop out as replacement, as explained above.

One of the things which had proven to be an issue with the networking was briefing. Sending huge amounts of text over a client connection seems like rather a bad thing and I have been desperate not to abuse seven shades out of the commandToClient. This is the reason that I haven't got a large and indepth mission briefing description working yet. I am considering creating it as a seperate GUI file and sending that directly to the player in the same way mission download should work. I do however have a quick description of mission objectives created, pulling them directly out of the mission file.

Lies, Damn Lies And Statistics

 The post mission debriefing screen lists all the statistics that pertain to the player. All allied aircraft are listed as well as their victories, recorded as kills and assists, and their final state which descibes their damage. Added to this is the individual client's performance which ... when I iron out the bugs ... will list the types of kills and assists they scored as well as how accurate they were with their weapons. Right now ... it's a tad buggy ...

More Lies And Bugs Than Statistics ...

Here's a video of the old way I selected playable flights with the multiple buttons at the beginning, and shows how the briefing screen works for aircraft and paint scheme choice.


And so that was the month that was. August, it was wet and cold and not much of an end to summer. The summer fan is dismantled and stored for next year, and the Autumn duvet is already on the bed for maximum comfy.


Friday, 31 January 2020

Space Year 2020 And CO-OP Mode Works

The first month of Space Year 2020 is over. Which is kind of annoying as I always bemoan a month passing in the face of my meagre endeavours. However January has been rather productive.

I created muzzle flashes for the stock player character's weapons. Apparently there is a way to do this in Max using mesh visibility animations ... but Blender3D doesn't appear to have that so I had to fake it with the good old "make it really small and hide it inside the gun when not in use" approach.

 The gifts that keep on giving ... but not this much ...

I also went back and restructured a lot of the power ups. There is a rare power up which drops other temporary power ups - however I found this to be very overpowered, so I changed it to drop a small gift box which contains a 20 second buff to a single attribute - "buff" apparently being the correct terminology for this sort of thing. I also swapped a common single attack damage multiplier for a temporary damage booster that lasts 60 seconds.


The '80s called to remind everyone that it was the greatest decade in history ...

I also channelled my 1980s childhood for an Aliens themed range finder. This finds the nearest unopened swag parcel or node and informs the player of the distance. Originally I tried to get this information via the GUI itself before common sense prevailed that I should be getting it from the player object on the server and then send the result to the GUI so it was networkable.

 Me, myself and I ... and me again ...

Speaking of networkable, I finally tested 4 player co-op mode and it worked quite nicely ... until it all broke but then I fixed it and now it really does seem to work quite nicely. I created a little leader board so all the players can see how they did at the end of the level relative to each other. I had to rewrite how levels are loaded as my previous level loading was very much based around single player mode, but at least I have had the foresight to make all aspects of individual player progression networkable so has been no hitches in spawning clients in a new level with all their old swag.

I have made various other tweaks and additions too numerous to mention, though refractoring the difficulty curve was one. It now works much better in co-op and endless mode, when the player has finished the game but continues to replay through the original 10 levels.

One thing I finally got around to finishing was the model for the Terror Tower item, which creates a zone of protection that the player can hide in. It's a tower of gibbets with severed heads that scares monsters away.

Too Spooky - even for monsters!

After putting on half a stone over Christmas, all of which seemed to congregate in a band around my waist I went for a good 70 miles worth of hiking this month. I am still the same weight but the middle tyre has gone so I guess it's turned into muscle somewhere and now my leg really hurts. More hiking tomorrow but it's only 5 miles to a pub.

Anyhow, roll on 2020.