Friday, December 11, 2015

Arma 3, LMS Mission/Mod Progress... And Lots Of It!


Over the last few weeks I have been 'tinkering' away within the Arma 3 editor and running tests in a multi player environment on a dedicated Arma 3 server for my own "Last Man Standing" mission/mod. Needless to say, things are progressing rather quickly after another big learning curve.
 
What is this progress you may be asking?... Ok, I'll try to explain.



My "Care Package Run" script has been ported to a multi player environment (server side), with some code/routine optimization and enhancements.

+ Random calculations for care package drop locations are now more random, based on map grid size and current playable area (multi step custom routine).
Care Package Run - Debug Markers
+ Custom flare/smoke with any RGB color combination possible (no smoke grenades here!).
Care Package Delivery... Perty Custom Smoke
+ Changed the delivery method to a cargo helicopter. The helicopter opens the rear door whilst tilting backwards... then drops a care package out and flies off into the distance.
Cargo Helicopter... Deploy Care Package!



My "Bombing Run" script has been ported to a multi player environment (server side), with some code/routine optimization and enhancements.


+ Random calculations for bomb zone locations are now more random, based on map grid size and current playable area (multi step custom routine).
Bombing Run - Debug Markers
+ Amber markers on map "warn" you that the area will be bombed and to move away from the area (not just a red circle that pops up on map, then explosions.. smh).
Bombing Run - Amber Zone = Danger
+ Bomb zone size is random, as are the number of bombs being dropped per zone (which is relative to the bomb zone size).
Uh Ow... Bombing Plane
+ Red bombing zone markers will stay on map until the last bomb has been dropped and has exploded.
Red Zone = Bombs


My "Loot Spawn" script has been ported to a multi player environment (server side), and semi re-written for optimization.

+ More building positions for possible loot spawn (buildings that have limited amount or have no default positions now have some). See the yellow (manual positions) and red (dynamic positions) circle markers in the below screen shot.
So Many Loot Positions
Hey! Loot Never Use To Spawn There...
+ No floating loot...nope, none, nil, nadda. My custom calculations for placing loot onto (and not above or under) surfaces is 'almost' perfect, and all done without sacrificing any optimization in regards to accuracy vs speed (each possible loot spawn calculation takes a maximum 2ms to execute whilst doing it all on-the-fly).
Backpacks, Headgear, Vests Do NOT Glitch Anymore!


My "Land Vehicle Spawn" script has been ported to a multi player environment (server side), with some code/routine optimization and enhancements.

+ Vehicles are spawned on (or right next to) roads. Per map adjustments are made so that 20 vehicles do not spawn in one area... aka the airfield.
So Many Vehicles...



My "Water Vehicle Spawn" script has been ported to a multi player environment (server side), with some code/routine optimization and enhancements.

+ Water vehicles are spawned in around the map in at least 2m depth of water (to prevent beached boats that are not drivable).
No Beached Boats Here...


My "Timing Routine" script is half-way there (written from scratch), I have the initial routine done and tested. The timing routine is for the 'blue zone' calculations as well as checking to see whether each player is inside said 'blue zone' once the zone is locked, as well as making sure you are within the overall map zone ('black zone').

+ Zone timing with on screen messages are done.
At the 60 Second Warning Mark...
+ Zone checking once the zone is locked. Adjustments were made to have the player and minimap match up for zoning. Player half out of the locked zone = in the zone. Player over half out of the locked zone = out the zone (as in the screen shot below).
Ouch!


All in all, I have been very busy coding in the background, and thought it was time to do another blog post.

I have learned a lot in the last month, and continue to learn. Learning new/better ways to code my routines so that all my scripts are as optimized as they could be.

Whilst testing on my local dedicated server I have also written a script to keep a check on server FPS. The FPS of the server sits at mostly 50fps, dipping down to 30fps at times... which is decent considering the hardware that I am using to alpha test with.

Once my mission/mod reaches Beta test stage, I already have multiple USA servers to host with, with much thanks to those who continue support me and my efforts (sorry, no name-dropping at this stage ;P).

Watch this space... there is more to follow.

-soul.




Tuesday, November 17, 2015

Arma 3, Module Testing

For the last few weeks I have been tinkering in the background (away from public eyes) inside the Arma 3 Editor, correcting my modules/scripts, updating/optimizing code, etc.

Bombing Run System - Debug Markers On


The above screen shot shows the normal game markers everyone in game would see which are the black circle (map zone) and the blue circle (current game zone), as well as the bombing zones (orange/red circle markers).

The other colored arrow markers are debug markers to show the random chosen base location(s), the random chosen bomb location(s) (which must be inside the current game zone), and the flight path of each air vehicle with color codes in regard to current speed. The start/finish markers are cut off the above screen shot.

Today, after much anticipation... I can happily say that I ported one of my modules/scripts (Bombing Run System) over to multiplayer to test, and it worked flawlessly with multiple players on the server.

At first I had ALL debug markers on server wide (see above screen shot) so any connected/connecting client could see them, and to make sure in what I had coded worked for everyone... and it sure did. *happy dance*

I then turned off all debug markers and ran the "Bombing Run System" again once. Everything worked as intended, no lag/lost frames. I then ran 3 bombing zones at once, no lag/lost frames. I then ran 12 bombing zones at once, no noticeable lag, fps dropped by 1. Then again to stress test/load up the server I ran 24 bombing zones at once, no real lag as such, but fps did drop by about 10fps for each client, which was noticeable. Each instance of the script ran as intended, cleaned up after itself and exited, which made the fps (when the script ran 24 times at once) gradually get back to "normal".

All in all, it was a successful outcome to the effort of learning and scripting/coding within Arma 3 for my own mission/mod.

Watch this space, as there is a lot more to follow.

-soul.

Saturday, October 24, 2015

Code Four Gaming, New Logo Creation

For a while now I have been amongst/involved with "Code Four Gaming" gaming group aka "C4G" who are known for their Arma 3 "Sa-Matra Wasteland Mod" servers (you can check them out at www.codefourgaming.com).

Recently I had a dabble at creating a C4G logo... just as a test and to see if I could do something decent (see logo at bottom of page).

After showing a few C4G members what I had produced, they wanted to use the logo (or something similar) for their new logo/badge. Discussions were had, and I agreed to create a new logo to their likings, something to re-brand C4G as a whole.

After a few iterations in design and colors, the below logo was decided upon as the new logo for Code Four Gaming.
The new 'code four gaming' logo design
It's simple, clean, bold and red, which is what was wanted, and am glad with what I produced, and glad that it is liked and will be used.

I will also create all other graphics needed (web/teamspeak/etc) based on the logo and it's color scheme, so that a real "theme" is behind Code Four gaming, which will make the branding very hard to miss.

I'm still in the progress of creating each part of the theme, but as another example, here is the TeamSpeak banner, and below that are some custom forum badges for rank within C4G itself.


Example TeamSpeak Banner with the C4G logo and color theme
 
Example forum badges with the C4G logo and color theme

I have done graphic design in the past, and still dabble from time to time (when I'm not scripting/coding for Arma). I may not update my blog as frequent as I could, but I still work in the background doing various things. I'll try update more soon.

Below is the original logo test I did, just to see if I could still manage to put together something decent.
The "test" logo I designed
-soul.






Tuesday, July 21, 2015

I'm Still Here...

So you may be wondering where I have been, why no updates for a while, etc.

Well the gist of is real life took over, and my will to code temporarily diminished. My spare time is spent doing various things other than sitting at the computer coding (scripting/whatever you want to call it).

I have also recently updated my entire computer system, which was well overdue. My PC specs are now as follows.


  • CPU: Intel i7 4770K
  • CPU COOLER: NOCTUA NH-U9B
  • MOTHERBOARD: Gigabyte Z87 G1 Sniper
  • GPU: Gigabyte R9 290 OC 4GB
  • MEMORY: 32GB G.Skill RipJaw (4x 8GB)
  • SSD: 1x 500GB Samsung Evo
  • HDD: 1x 1TB WD Black, 1x 1TB WD GREEN, 4x 2TB WD RED
  • PSU: Antec 750W TruePower Classic
  • CASE: ANTEC P193 (Antec 3 speed and Thermaltake 120mm fans)
  • MONITORS: 2x DELL 2208WFP 22" 1680x1050 (Will add a 3rd soon enough)
  • SPEAKERS: Logitech X-530 5.1 Speaker System
  • And various other "goodies"

System specs as per Speccy
My new PC... decent cable management

I still have the intention of continuing my coding on my own "Last Man Standing" mod for Arma 3, albeit it will still be slow goings, as I am working solo and learning things as I go... as for now you will still have to play (and put up with) the clunky version (BR) that is still available. Hell, I even had a few rounds of it lately... yup, still the same frustrating things to deal with. Sloppy coding FTL. Error check, error check, error check.... wait what?


I have also been involving myself in a couple of Arma 3 groups/clans to which I enjoy being a part of, playing Arma 3 in a team environment, as well as still "lurking" in various twitch.tv channels... watching, not chatting.

Don't expect too many updates over the next 3 months... but do expect something. I still "tinker" in the background although keeping it hush to the public, as it's mainly script code enhancements, bug fixing, etc... to make sure everything is correct before I move on to the next scope of my mission/mod.

Patience is the key.

-soul.

Saturday, May 02, 2015

Arma 3, Care Package System

Another part of my mission/mod is a care package delivery system.

Care package script

The care packages are delivered by a proper cargo plane (not a noisy Osprey *rolls eyes*), and get attached to a parachute and pushed out the rear of the plane when it reaches the drop zone... in a proper camouflaged military crate (not a bright red/pink crate).

The care package is randomly and automatically calculated in each aspect, from the cargo planes start and finish zones to the drop position (which is also temporary marked on the map), the crate smoke and color, and the then actual care package random loud-out (what's actually inside the crate) as well as the loud-out per weapon (scope/muzzle/ammo).

Green marker?... Care package inbound!
The cargo plane flies over the destined drop zone, which will appear as a large green marker on your map for a short amount of time (be quick to take notice, as it won't last long). You see the package drop out the rear of the plane... the parachute opens and smoke begins to pour out in a specific color (significant to what 'class' of care package it is).

Care package deployed
The care package slowly parachutes to the ground with the colored smoke still billowing from it, as a visual reference on where it will or has landed in the diverse terrain. Once the care package hits the ground, the parachute folds up and the smoke begins to fade and disperse over a given time duration.

Follow that smoke, follow that parachute!
Other than the colored smoke and the temporary green drop zone map marker, there are no other visual indicators to where the care package has landed (no UFO lights that appear in the middle of the sky)... so be observant.

The care package has landed
Once the care package has landed, you can then go and check the contents. At current, the load-out is randomly generated from a static item list split into it's own categories (primary weapon, clothing, vests, backpacks, medical, etc). It may contain only one of an item, or five of an item... it's random.

Each primary weapon also has a custom load-out. All weapons are the base model (no attachments), based on probability it then may equip a silencer/muzzle, or an optic, or a laser pointer/flashlight... who knows, again, it's a 100% random weapon load-out.

The ammunition for each weapon is also inside the crate. There may be only one magazine or five, it's the luck of the draw.

With the care package, every single item is kept inside the crate too (unless a player puts it on the ground), not spilled out onto the ground itself... as it can cause further issues on not being able to quickly see/find/pick up due to the glitchy Arma 3 terrain (yeh, we all know what I'm talking about!).

Get the goodies you need, and run!
My care package script can be ran once or multiple times side-by-side, and run flawlessly, no script issues/errors, no FPS issues... it just works. As per my bombing run script, the structure and procedures were replicated for use with the care package script.

My care package script is also split up into 5 separate scripts/functions in order to make things run quicker/better/more efficient on CPU usage, as well as for server side functioning and client side functioning (eg, smoke effects).

A short video demonstration of the in-game care package is below.



Learning, scripting, debugging... repeat.

-soul.


Thursday, April 30, 2015

Arma 3, Bombing Run System

As a part of the mission/mod that I am creating, it involves a bombing run with one or multiple planes and zones.

Bombing run script

I wanted the script to be a proper bombing run, not just a red circle (bombing zone) that appears on your map and then a heap of explosions scattered around the place *cough*... as there is little to no immersion in the game-play for any players, and rather unrealistic.

I sat down, and thought about how I wanted my version to be, and came up with a rather decent solution.

When the bombing zone is spawned in-game, whether once or six times at once, each jet plane and zone is kept separate from the next. Each jet plane spawns out-of-bounds, so that any player gradually hears and sees the jet... it gives you pre-warning.

The jet plane will do a low altitude fly-over for the pre-warn (the jet sound is loud), the players would check their map (default 'm' key) to see where the bombing zone(s) will be placed, as they would be marked in an amber marker with a random size/diameter. If any player(s) are in the zone... it would be time to run run run!

The jet plane will then loop around (avoiding all other air traffic), gain altitude and fly back over the determined bombing zone which in-turn, changes the amber marker to red, and it's bombs-away!



Uh ow... bombing zone
 
Once the jet plane has dropped all it's bombs (bomb number depends on diameter of zone), it then flies off into the distance, which removes the red marker from your map... hopefully by this stage, you are still alive! :D

Bombs be dropping
I have gone over my bombing zone script multiple times, redone the procedures, redone the variable checks, redone the cleanup of entities/objects/etc... and can now say that whether I run the script once or twenty times at the same time... everything works perfectly, each jet plane does-their-own-thing and there are absolutely NO left-overs to clutter up memory (memory leaks) or affect FPS.

From being a novice at Arma 3 scripting/coding, and learning as I proceed, I'm fairly proud of what I have achieved in a short amount of time.

The video below shows an in-game demonstration of my bombing zone system in action. In this video, I ran the script/function six times at once... as you will see multiple amber and red zones on the map.



Another part of the mod created, more to follow.

-soul.

Tuesday, April 21, 2015

Battlefield Heroes, The War Is Over

I had played this game since "closed beta" (2009), and now after 6 years... the war is over. EA/EAsy are closing down the game.

From the beginnings the game style had potential, it was great fun, the game mechanics were enjoyable, and it was a unique third person cartoon style shooter. Weapon load-outs, abilities, taunt emotes, custom clothing/skins/etc... it was rather unique.... somewhat clunky, but unique.

Battlefield Heroes - War Is Over Heroes
I started off with three National and three Royal characters, one in each class, gunner, soldier and commando, and got every single one of them to max level (level 30).

I found each class as enjoyable as the next, and pretty much mastered them all. It was fun slaying opponents with a machine gun and rocket jumping over buildings as a gunner, lighting opponents on fire or blast striking as a soldier, and running around invisible and head shot sniping as a commando.

Along the way there were game-breaking game bugs, servers not being updated, a huge influx of hackers and pay-to-win update after update after update... and the game bugs still existed (as did the hackers).

Once the fun got sucked out of the game and EAsy neglected the game, a lot of players from the closed beta... up and left. I was one of them.

For what "BFH" was, it was greatly enjoyable for the most part, and it is a shame that it is now closing (as their other "free-to-play" titles are).

After months of little to no updates back in 2014, I gave the game until the end of 2014 before it was gone/kaput/dead. I posted on the "BFH" forums to show my concern and opinions about the game time and time again, but most was ignored... and quite a lot of the player base refused to believe that the "game was dying".

So now at this time... it's kind of a "told-you-so" scenario to those that didn't want to listen, even though the game will be playable until July 2015... I was correct in my prediction of them closing it all down "soon".

I met quite a lot of decent players across the Oceanic and Asia community, I played in a squad/team, played with/against other squads/teams... and it was enjoyable (apart from my ISP latency issues).

Greets go out to tN (Team Nads), db (dubbrothers), nSg (no sh*t gaming), all the independent players that were in game with me and/or use to rage against me and/or accuse me of hacking over and over and over. :D BOOM HEADSHOT!

All-in-all, it was fun while it lasted (6 years)... and I hope to see a similar (non pay-to-win) version of BFH in the future (hopefully not made by EA or EAsy).

-soul.

Monday, April 13, 2015

Arma 3, Loot Spawn System - Video Demonstration

As promised, here are a couple of short videos of my loot spawn system in action, with an explanation on what the colored markers represent.

Loot Spawn - Debug Markers

The green circle markers are default loot positions retrieved from the configuration within Arma 3. 

The red circle markers are dynamically/on-the-fly generated loot positions on the outside of any given building

The yellow circle markers are static positions which were created for each building model, as some building models had a shortage of possible loot spawn positions. Each position was created manually via some in-game positioning code, then pasted into a separate configuration file. The result... custom and more possible building positions to spawn loot at.

The video below shows the loot position calculations in action in debug mode.



The green building markers are to show which buildings have zero damage and have default loot positions retrieved from the configuration within Arma 3.

The khaki green building markers are to show which buildings are damaged and have default loot positions retrieved from the configuration within Arma 3.

The red building markers are to show which buildings have zero damage and have no default building positions.

The black building markers are to show which buildings are damaged and have no default building positions.

The debug marker colors above make it an easy way to first configure the buildings on any map I decide to run the script on. I also have building model names and other information I can turn on If I choose (makes it quick and easy to debug issues).


The video below shows the loot spawning in any given possible loot spawn position.




The loot is spawned with a probability set in the configuration file, based on size of the map, the playable area and number of accumulated loot positions.

The markers are self-explanatory. "<amount>x ItemConfigName @<height above terrain level>". The colors are used to differentiate each item class.


The video below shows some in-game footage in relation to the above two debug videos.


Within the Arma 3 engine, it is hard to properly calculate the relative position for each item, whether on the ground, or on a surface (2nd and 3rd level buildings), sometimes the "loot" can glitch just below or just above the surface.

Example... if you encounter any loot that seems to be glitched into the floor/terrain below, pick the item up and drop it again. 9 times out of 10, the item will glitch back into the floor/terrain. This is due to the physics in the Arma 3 engine. Sometimes it can be scripted/coded to correct it, but other times not.

In my loot spawn system, you will not find loot spawned 3+ meters up in the air which is unobtainable, nor loot that has disappeared underneath the floor/terrain. If the loot calculations do glitch, they will either be half visible or floating less than 1 meter from the floor/terrain below.

In reference to the above statement, I could possibly create some code to precisely calculate the exact positions in relation to the floor/terrain below... but it would take 5x longer for the loot spawn system to complete... so for the time being, I have reached a mid point on calculation speed versus glitched loot.

Each script/code for my last man standing mode is rather involved, has many of many of many calculations are involved. The debug process and optimization process is rather satisfying when a script/module is completed with no bugs/lag/desync issues in-game.

I hope that gives insight into my loot spawn system.

-soul.