Monday, October 28, 2013

Coherent design is melting my brain

It starts pretty basic most of the time, you get an idea, start working on it, fix a few hurdles and adjust some ideas, make some great progress and then hits some evil wall that you never even saw coming and will need to start reworking systems or designing things totally differently.

In my case its these model constraints on the ships. I've been deliberately making the shapes weird to try and identify where I would have problems (I secretly love being angry and frustrated all the time) and go figure I'm running into issues with size and placement of models on the hardpoints when they're mix-matched. For instance making a long hull and putting the mounts for the wings near the back of it, then realizing they clash with the engine if you use the wider, larger engine but everything is peachy on the short hull with the mounts in the middle. Is that a problem with the mount location? The wing length? Hull length? Engine width? Theres so many factors it can get really difficult to choose which one to clamp down on to get good design constraints.

I look back to Black Prophecy (2010 -2011 space action game with a ship customizer much like this) and wonder how any of those guys managed to stay sane while doing this. They had the same diversity in their model combinations but I suppose they just made tighter constraints for sizes of things to keep it all in order. I'm still just amazed that they could have so much ship diversity and fluid design without clashing parts all the time. Too bad it flopped.

I hope I don't have to keep redesigning the ships. It seems that I'll need to sit down and define maximum sizes for a lot of mounted items to prevent overlapping and clashing.

On the up side I did make some new models for Oomph and get them loaded into the webplayer. There are some more functional camera controls in the pipe that will allow you to view the ship better so you can get a good look at the new weapons, hulls and engines. You can also now change your thruster color values thanks to Jean for some cool new HSV Color Actions. I had been messing around with adjusting those colors with GUI sliders last week but it wasn't working out. His actions made it much easier so check out the color slider to change the thruster colors! =)

Sunday, October 13, 2013

Oomph goodness

Physics, space, and science.

Oomph spawned from working on a Hover Ship system with the Brevis project, then eventually I realized that firing lots of missiles, blowing things up and flying through space at high speeds was much more fun than throwing boxes around with the force. So I switched gears and moved on to Oomph.

After throwing together the physics side of things for Oomph, testing, testing, re-testing, changing, fixing and testing that ship more and more I started to get pretty tired of looking at it. That silly ship and its pointy, low poly, projecting wings and ... stuff.. whatever those pointy things are. (you'll know if you had kept up with things on the Playmaker forums)

So I manifested a new ship and in doing so began to wonder how the next iteration of the shop was going to work. Currently you could make 3 things, [1]Hull, [2]Engine and [3]Wingset. This worked fine for testing purposes since the ship would grab the engine and wing data and figure out the horsepower that puppy was pushing and what pewpew to make it shoot.






But, this did not appease my inner nerd! Nothing mounted dynamically, everything was based on object prefab pivot points, you couldn't change the weapons from the wingset and it would not allow much diversity long term.

Then came the glorious day I overhauled the shop (like... friday).




Now the menu is way more comprehensive, you can change the left and right wing independently, weapon mounts now exist, you can mount them on any wing, the weapons know if they are supposed to be in firing group A (left click) or group B (right click) based on their mount point, every mount reads its parent object and figures out where it should be, how its rotated, builds the thrusters on the fly, and the best part is that as long as I name the hardpoints correctly in the prefab then I don't have to do anything more than add a GUI button in the shop for any new Hull, Weapon, Wing, or Engine that I create from now on.

BAM, SON.





Needless to say, I thought this was pretty cool and was pretty surprised that the beer I was able to pull it off and get things actually working as intended. I learned a lot about using temporary variables and generalizing state machines for purposes while parent states define the properties for them to execute and now my shop does my bidding. HA!



If anybody has questions about how this works feel free to post up or find the downloadable project with all the assets on the Playmaker forums.

Monday, June 3, 2013

Physics are hard.

There hasn't been a really juicy update lately because I've been stumped on designing a flight system that only uses the physics system to power it. It turns out that its pretty easy to throw down a rapid prototype but it is obscenely difficult to control it and create a feedback loop for it to manage power controls and auto balancing features so that you can actually fly the thing instead of just spiraling out of control when you press the wrong button.

I have learned a lot about PID controllers and it's helped me get some basic principles down but its still quite hard to build a good flight system. There are a ton of floats changing all of the time and math bouncing off all kinds of other variables. Surprisingly this isn't as difficult in code but PlayMaker does not have an equation action to rapidly do an equation and store the result, you have to multiply, subtract, add, divide all as separate actions and floats and that is quite cumbersome when you have a lot of math going on and need a bunch of calcs done on every frame. Notably, this is only the second time i've been disappointed in any way with PlayMaker since I got it in 2011 but it is mortal after all.

But I did seem to be able to keep it pretty modular, almost everything is based off of the mass of the ship and there are a few principle floats that control the bulk of the background calcs related to power control and magnitude of player input so I'm pretty happy about that, I just hope as I continue that I can carry that ease of use into the autobalancing system and other features that will be in the kit.

Eventually, the prototype for the flight system will be posted on the PlayMaker forums for other PM users to delve into and use for themselves.