Skins and Meshes to use in Freedom Force Utilities and Information for use with Freedom Force Fan-created Mods for Freedom Force! My Blog! Answers to Frequently Asked Questions Links to other great Freedom Force sites

Help out the Fortress!

Best Modder

Best Site

Email Me!


Hero Sandbox

[2010-Sep-20] #3 - Getting Somewhere!

Panda3D Superheroes!In the last dev diary, SuperSquad had been setup with 8 different meshes and it was possible to move them around with WASD controls. Tons of enhancements followed over the next few weeks:

Hero files

Added a whole subsystem to read "hero" files from a specific folder and use the information in them to know what mesh to load, etc. SuperSquad's hero files are at the moment, simple CSV files (delimited by ";" rather than ","). Still adding to this, but here's where it stands
  • NAME - character name
  • MODEL - 3d model (or "mesh") used
  • SKIN - skin folder used
  • ANIMS - animations folder used (more on this later)
  • STRENGTH - to be used to calculate melee damage and other things
  • SPEED - to be used to calculate char movement
  • AGILITY - to be used to calculate % to hit for melee (offense/defense)
  • ACCURACY - to be used to calculate % to hit for ranged
  • ENDURANCE - to be used to calculate Hit points
  • ENERGY - to be used to calculate Energy points
  • TRAITS - a list of traits a character has (ex: "Flight", "Shrinking")
  • RESISTANCES - a list of 9 resistances vs. attacks (Acid, Energy, Heat, Mystic, etc.)
  • POWER1 - Placeholder - Still being defined
  • NOTES - Freeform comments about your character (ex: "Capt. Hero was born in Alaska..."

As you can see, the hero files are quite familiar but not quite the same as FF's. Major differences include:

  • Energy rating controls amount of Energy, not energy recharge rate
  •  Resistance ratings allow you to directly tweak how a char responds to different attacks like Heat and Cold. No need to use Attributes or Materials to set this up
  •  Traits are like Attributes in FF , but a) you can have 10 instead of 5 and b) there are no Traits to control resistances to attacks as those are all covered elsewhere.
  •  There are other differences I'll get into later.

Superman , Flash, Green LanternCamera controls
Panda's default 3d camera control is, IMO, not usable for a RTS-style game. So code was written to make it closer to what you would expect. To be honest, I'm still not 100% happy with it, but it's getting there. It's patterned after FF, since I am so used to that, but with a few differences. Will continue tweaking this

Panda supports collision handling of 3d objects (which is good - otherwise it would be quite the pain to write a game like this). Added a little code at each character's creation, so they would no longer walk through each other. Instead, they push each other around.

It was now around April 18, 2009 and I decided to take the plunge into AI. The first time I had ever done anything in Python was way back in 2002 when I wrote a little mod for FF called EZ Danger Room. Basically, it made characters chase each other and make decisions like should I fly or not? I actually dug up my old EZ Danger Room code to look at how I had done it and believe it or not, I was able to adapt it to SuperSquad without too much of a hassle. (Did have to learn about Panda intervals first).

Suddenly, things were in motion for real as the enemy characters started running after your squad. Panda3D Heroes fight

A few more revisions later (we were up to SuperSquad 0.1.8 at this point), and the foes were intelligently deciding if they should fly (taking off  and landing on their own). One simple change later and suddenly your squad members could do everything the foes were doing. I'm making it sound easy, but there was plenty of hair-pulling to solve glitches and bugs (rotation issues, animations, etc.)

Clicking Characters
One simple thing you're goanna need to do for a game like this is to click stuff - click where you want to go, click someone to fight, click an object to pick up, etc. Panda fully supports this, but to do so, you start getting deep into the collision system. There's a whole section of the Panda manual on collision handlers that I'm only now starting to fully understand, but by version 0.2, I had added the ability to select a character by clicking them.

By May 2, 2009, I was sick of the characters chasing each just to say "hi", so I added basic melee. You could now punch foes by clicking on them and eventually even knock them out. Plenty of bugs, though:

  • After 1 punch, couldn't seem to switch back to idle mode
  • Have to fix the combat text , right now it keeps writing on top of itself until it's unreadable
  • You could attack a foe just by clicking them, it doesn't check if you're near enough or for collisions
  • You can cheat by clicking the mouse button repeatedly (without waiting for the animation to complete) and it still counts as an attack

It did use STR to calculate damage and you and your foe's AGL to calculate % chance to hit and subtracts damage from foe's HP correctly. So it was a major step forward. This is one of the times (it's happened a few times before and after as well), that Tommy famously remarked, "it's starting to feel like an actual game!"

Panda3D Heroes brawlWhen I code, I really make an effort to use as little code as possible (less code=less bugs is an old programmer's mantra). Also, always trying to write code so it can be reused. So I was very satisfied when just adding 1 line of code suddenly made the foes capable of fighting back!

Version 0.2.4 added basic flying melee. Tommy is hard at work as I write this to add some new animations to this, but the basic logic is fully functional.

BTW - our test scene, even now, is JLA vs. Avengers as those are the sample meshes and skins that Tommy made.

At this point (May 23, 2009), also added the concept of "map" files. These are plain text files that are read by a function in my code to create the scene. Obviously, they will be created by a still-to-be-made map editor eventually.

For now, I just created a quick map in Notepad:
H;wonder woman;wonder woman;(50,0,0);(0,0,0);(1,1,1)
H;green lantern;green lantern;(25,0,0);(0,0,0);(1,1,1)
F;naked guy;male_basic;(100,-400,0);(0,0,0);(1,1,1)
F;iron man;ironman_21;(50,-400,0);(0,0,0);(1,1,1)
F;captain america;captain america;(25,-400,0);(0,0,0);(1,1,1)
Superman and Captain America combo
Movement Controls
Switched to point-and-click movement like a traditional RTS, which required more collision system code. WASD controls are still in there, though.

Yeah, RTS games can be hard, so of course, a Pause feature had to be added. Not hard to do, but like much in Panda, you have to code it yourself.  Remember, it's an SDK , not a "game creator".

We definitely wanted for skins to work like they do in FF, where you can choose a skin folder for a model to use. This turned out to be quite tricky in Panda as models have multiple image files mapped to them, etc. Eventually, got some code working that did the trick and this is now called when loading your character, to set the skin to the folder specified in the hero file. On this page you can see an early test pic of the Supes model using Cap's skin. Doesn't look bad, actually...

ArtPanda3d Superheroes wiremesh
Throughout this, Tommy was creating tons of new animations (remember we wanted everything in the game to be original) and adding an occasional character to the roster. He also did lots of great research into Physics and LOD (level of detail). Things we may implement later.

Other stuff
After fixing all the melee issues, I added various miscellaneous features, usually just because I had just heard about them on the Panda forums. The picture at the left shows an option I added to show the scene in wireframe mode. I also added options to remove all textures from the scene, and take screenshots.

But Then....
It was now June 9, 2009, I had started to look at adding title and menu screens (no idea how to do it :) ). But then ... all work on SuperSquad stopped. Why?


* Any Comics characters are TM and of their respective owners.
These are FREE third-party add-ons that claim no license to any of the likenesses contained herein.
We are just lowly fans showing our love for the characters!
Irrational Games (TM) and Freedom Force (R) are trademarks of Irrational Games LLC and/or its affiliates.
Freedom Force is the copyrighted property of Irrational.