There aint no party like a cute squid party!

Objective: Don’t touch anything! Make sure you get as many Squid Friends as possible (and looking maximal cuteness along the way)!
Careful though, you only have 100 InkBottles to propel yourself around the screen with!
If you touch anything you’ll end the game, but if you end things catastrophically you will also lose Squid Friends!
 

I like calling things Release Candidates because, though it has applied to be a candidate, it will not be the candidate. It has pre-emptively failed.

Anyway, BUILD 13.
I am really happy about this one. I put some instructions on the screen and even built a prototype level that acts as a neat little sandbox. The instructions are fairly easy: draw a vector with your mouse. The length is the strength. Things to try:
  • Beat the game as specified (touch the right, then left, wall)
  • Try it without losing any squid bits
  • Try it going fast
  • Try it going slow
  • Try tearing your squid apart completely (his head bits do seperate but is very hard to do)
  • Try knocking all the planets out of orbit (pro tip: hump the planet with your squid legs)
  • See how long you can drift without touching anything, not even the walls
I have some significant gameplay changes coming in the pipe that makes the game… much more a “game” than a toy. Stay tuned!
 
At the pub tonight I had enough beers that would normally place me firmly in the grips of “drunk.” However, the quantity of food I devoured (well over average) counter-acted the results and placed me in the ultimate perspective of contentedness.
I did not feel dizzy or lightheaded; I did not feel any lack of judgement; I did not feel any dampening of my motor functions; I did not slur my speech. In fact, if I woke up feeling this way I would have no problem getting behind the wheel of a car. If it were for not one little side effect.
Everything we glance at, we analyze – we spot a painting, we note it’s size and shape. We spot a bottle and we note in our head that is it brown and contains beer. We glance at people and silently assign names or pointers in a split second of scanning recognition.
And I had lost all of these abilities.
I scanned the pub, the crowd, the things on my table, and I just saw shapes. The only things that concerned me where that who I was talking to and the pint in my hand. I had lost any ability to care for or note my surroundings.
The experience was in full force for around 10-15 minutes but quickly began tapering off to normality. I was really quite pleased with the experience and hope to have it again sometime!
Needless to say I did not touch the squids today. I am completely content with their progress from yesterday.
 

I was reading some old, old blog posts of mine (from last week) and thought I’d update a bit on what’s going on now. I’ve had a lot of thoughts in the past week that I didn’t think were blog-worthy.. but when summed ended up being quite overwhelming. Prepare yourself!

I’ve been working on the game for a total of 9 days now. During that time I have been maintaining my contract work, which is my full time job. I have also taken many, many breaks that probably accumulate up to several days of inactivity. Slacking, really. But I want everyone to know that my progress is so rapid it’s self-inspiring, and making me more and more motivated. I’ve gone from a guy who just two weeks ago was considering hiring someone to write this game for me, to being the guy who is actually doing it… and pulling it off well.
Er… Well might not be the best word. I’m shooting to get my game up and running ASAP. My implementation might look slick, but my code is a complete hack job and is not at all up to my own standards. I completely intend to rewrite this game from scratch if and when it becomes popular and demands further development. My main mission here: getting the game out, and getting it out as soon as possible.
I think I’ll send a shout-out right now to Phil Hassey, the author of Galcon. Knowing he wrote such a fun game in such a short time (48 hour game jam!) really inspired into doing something similar(ish).
In the past 9 days I’ve stumbled, quite accidentally, upon 2 gameplay ideas. I intend to make these my Game #2 and Game #3. I’ve also revised and re-revised the gameplay mechanics for SpaceSquid. Not quite settled on how exactly things will go down, but I’m getting very close to nailing things down.
A while back I said I used distance-joints on my planets. I’m such a doofus. The next day I looked at them, all pivoting around on their ultra short sticks like balloons on a really short tetherball rope. I immediately converted them (after learning about how) to Revolution Joints and nailed them down to an invisible static object that sits right behind the planets. Much more stable, and I was even able to add a small motor force to the planets so they will slowly spin. This will look much nicer once I have planet graphics.
I blogged earlier about the “Bullet” property that bodies can have. They work fine on larger objects, but when I apply them to smaller things (such as the squid tentacles and arms) they start jittering the simulation quite a bit. I’ve been forced to keep the smaller squid bits marked non-bullet, but I’ve instead converted all the planets to bullet objects, as well as the clubs on the end of the tentacles, and the squids upper mantle, as they will likely be travelling quickly. There will still be some clipping, especially between the squid arms and the tentacles, but they won’t be noticeable once I get the joint destruction routines into place… *evil grin*
I decided on a scale for my game, too. I still do a lot of testing in full screen mode, which is probably a big mistake… (*quickly runs and tests it in a smaller window*) I’m lucky, it’s still looking OK in the smaller size. Official viewport is now 700×500, which is 6 pixels wider than Fantastic Contraption. Suck it, Colin. I resized my game arena to fit these dimensions.
I think one of the biggest chunks of developing this into a real game will be level development. If this becomes somewhat fun and looks like a feasible long term project, my first mission will be a level editor. For now, it’s just going to be whatever I can come up with. I have sketched out 5 basic level designs that I think will work out well. I made sure my code can handle all sorts of wacky things like microscopic black holes up to ultralight gas giants (helium gas of course!). I guess it doesn’t help that right now the squid is roughly half the weight of the biggest planet.
A few days ago I found the game getting a bit too twitchy. I slowed down the timestep by half, so there is now twice as many physics calculations per second. It slowed down gameplay pleasantly and still provided those “big crunch” events as the squid collapses into a planet. As I increase planet densities I might slow this down again.
 

I spent way, way too many hours today on getting some very simple things done. I had set myself a milestone, though, and by gum I would achieve it!

First, a shout out to my girl Aubrey who gave me a rundown on some fundamentals of Object-Oriented Programming that I had not quite picked up on. She also acted as a sounding board that really helped me pull through with a victory tonight.
Secondly, thanks to OfficiallyHaphazard for directing me on some simple vector things that I could have probably figured out myself if I hadn’t had several beers. Also thanks to him for setting me up with Trace(). Good god programming with traces is so much nicer.
Speaking of Trace, I have a big beef. Actually, a list of them..
  • For trace() to do anything in your flash application you must first compile the application with debug mode turned on, which is off by default.
  • Finding out how to turn on debug mode is tremendously hard when you are using the Flex 3 SDK command-line jobby (and tremendously easy in retrospect).
  • You must also define two environment variables that aren’t set by default in Windows Vista. Boy I love adding useless environment vars for a single application.
  • You must create, from scratch, your own configuration file. This file must be stored in your user directory. Wow, so convenient!
  • If you use Flash 8 or earlier, you can tell the config file where you’d like your tracelog to go. Flash 9 or later, it defaults to the oh-so-convenient c:\documents and settings\username\program data\roaming\macromedia\flash\logs\ . Woe betide the person who renames their documents-and-settings directory!
  • Googling how to do anything in Flash 3 SDK is impossible since “sdk” is such a generic term, and vastly more popular products “Flash 3 Builder” and “Flash 3 Framework” both experience all the same issues, but have different solutions.
  • Flash 2 SDK documentation is all on page 1 of the google results and Flash 3 SDK documentation is on page 4.
OK I think I’m done ranting now.
So today, I present you with a single build. Build #12. I was able to wrangle the code so that anywhere you draw on the screen, it will remember the force vector and apply it only to the squid. Hooray! This is going to be the basic gameplay element. Things will become more clear in the coming days as I solidify the complementing assets.
Build 12 is important to me though, because this is essentially it: This is the gameplay. I could call this the tech demo right now and call it quits… But I gave myself until the end of the month, which means I can turn it into a proper “game” with levels and a bit of an interface.
PS: Props x3 to OfficiallyHaphazard for finding the first ever bug. The unmapped key “d” will remove the squid’s head (and therefore disable the mouse) for some reason. No idea why this is yet.
 

I spent the day making a somewhat realistic Squid object. I even researched some squid physiology to get the dimensions right. After my disasterous failure (in the last post), I went through several iterations:

  • Build 6 – with this build I finally got my spatial coordinates right.
  • Build 7 – this build is a further step where I made my squid with a retardedly huge head
  • Build 8 – my lil’ guy is finally coming together and looking like a proper squid! I have his joints hooked up wrong but I’m pretty proud of him.
  • Build 9 – I fixed up the squids joints and made him affected by gravity.
  • Build 10 – shaped the head a little bit and prevents the arms from being affected by gravity. The long arms still are, just not the short ones.
  • Build 11 – changed weight distributions in the squid’s body and placed a few new planet types.
A fairly productive day – even if it is just easy-peasy object building, it was a lot of fun and really renewed my enthusiasm for the project.
My next goal will be getting the interface running properly. I’ve never dealt with mouse/graphics interactions before so this is completely new territory, and quite scary.
 

In my latest build, I attempted to create a fully articulated squid that is affected by the world physics.

I knew when I set out that I wasn’t quite sure of the spatial dimensions of my screen, and I was pretty confident it would be pretty messed up. And boy was I off.
I did my first compile after linking my squid all together, and as you can see, it resembles nothing like a squid. It appears to have half of its body outside of the visible area, and everything is spaced light years apart.
Looks like calamari for dinner tonight. Sorry, squiddie :(
 

It took me much too long, but I was able to make an incremental build today that made me way too excited.

It’s officially titled “Build #4.” I figured out how to make some distance joints in Box2D and tethered my planets down. On the backend I have “Pin” objects and “Planet” objects with easily callable functions, for ease of level creation. I also have a very sparsely populated “BuildSquid” function which just draws a circle. Can’t wait to make that a proper squid with waggling tentacles all over the place.
The goal of the game so far is to get the little squid ball from the left side of the screen to the right side of the screen. The next big deal I’ll have to tackle is the control mechanism to allow you to do so. Right now you can just drag and drop him to the right side. I’ll have to make it so you can set a launch vector and go from there.
I’m having some trouble deciding on a sense of scale. I’m coding all of this in a full screen flash window. Maybe I should decide on some dimensions early on and really nail down the size of my squid and planet objects.
 

I’ve been spending the last few days just researching – reading up on Flash forums and the Box2D common issues. I’ve learned quite a few things and have a better grip on how I’m going to implement this now.

One bug that Fantastic Contraption has always had, is the “Collision skipping.” When an object moves too quickly, it will clip right through another object without triggering the collision detection. Box2D has a feature to prevent this – flagging your objects as “Bullets” will instead sweep the object and halt the simulation at the first collision intersection, then continue on with the new vector.
I imagine it reduces performance, as each collision requires a new step in the physics process, but my benchmarking tests on my game don’t seem to have a large effect. I think I’ll keep it in. :)
 

So I ran into a lot of trouble with Flash yesterday. Seems that compiling from the Flex SDK (mxmlc.exe) produces different results from most compilations in any sort of framework. Great example;

[sourcecode language="as3"]var a:Number = 1/3;
var b:Number = 1.0/3.0;[/sourcecode]
In MXMLC, VariableA is equal to 0, and B is 0.3333. In IDEs (Flash, FlashStudio, etc.), the framework is smart(?) enough to evaluate both to a decimal value.
It is producing all kinds of headaches. Yesterday I swore off Flash and decided to not making games anymore. After a few beers this afternoon I was able to reconcile my differences and produce my first compilation.
I’ll be honest here: That is nearly line-for-line written from a “How-to” tutorial and is just some cheap vectoring and nothing physics based. I ran with this code and made myself a nice start and finish line, and fiddled with some input commands.
Then I realized everything I was doing was a horrible idea. My end product will have physics in it – and tacking that on later in development, especially for a newbie like me, will likely result in me swearing off game development again.
I scrapped all my starter code and grabbed the latest Box2DAS3 set. This is an excellent collection of physics tools you can use in any flash application. A few quick mods, and learning from my previous mistakes, I was able to make a gravitational objects demo. Again, primarily me just compiling some pre-made code with minor edits here and there (it took me all of an hour to do), but it has helped me prove I can setup this dev environment properly.
It also served as a cautionary tale. I had so much fun playing the latest demo I spent a further hour tweaking it to be even more fun. The change ended up being relatively minor: removing friction from the ball surfaces. An hour. And this isn’t even the direction my game is going.
I decided to blog about it, post a link, and scrap the code. I could spend 5 years chasing neat idea after neat idea… But for better or worse, I have a design in mind, and a time frame to adhere to. I can’t waste time chasing these now. Maybe Game #2 will use these mechanics… But for now, I have to focus.
© 2012 Andy Moore Suffusion theme by Sayontan Sinha