Jump to content

  • Log In with Google      Sign In   
  • Create Account

Journal of dx elliot

Defend Your Nuts

Posted by , 11 August 2011 - - - - - - · 753 views

Yikes! It's been a while since I last updated this.

Well, I finished my second Flash game called Defend Your Nuts, which is a free-to-play Flash game sponsored by Armor Games. The project took six weeks of development and then one week of part-time bug-fixing and polish. I used a lot of audio from freesound.org and the royalty free music was purchased from pond5.com and soundloopstudio.com. I did all the programming and art. It is a simple game designed to appeal to the large casual gaming audience. There are four weapons, half a dozen enemies, a boss fight, and three difficulty settings, so a play-through can take less than 25 minutes.

My other blog shows the progress of how the game was developed, as well progress on my current projects.

Posted Image

In a nutshell (no pun intended), I developed Pigs Can Fly which got sponsored by MaxGames.com. Then I proceeded to quit my job and go do indie game development full-time. This is my second game and has done very well in all aspects. I really had to push myself hard to do all the art and animation, which was very time consuming. I'm currently finishing up an unnamed mobile tower-defense game for iOS and Android using Corona (cool library!)...

Posted Image


Five new levels

Posted by , 13 April 2011 - - - - - - · 528 views

By popular demand, I added five new levels 26-30 for Pigs Can Fly that should be more of a challenge. This is the final level...

Posted Image


Pigs Can Fly

Posted by , 10 April 2011 - - - - - - · 445 views

I finished my cursor game a while ago, and just released it on the Internet with an exclusive sponsor. Click here to play. I decided to give it a cute theme where you have to get the pig to the potion, so he can grow wings and fly away in 25 levels. It was released Friday night, and in as little as 48 hours a million pigs have been saved, contributed by 100 thousand players with an average play time of 14 minutes (thanks playtomic.com for the swf stats). It is now hosted by an estimated 15 websites and the number will probably double in the coming months. It won the daily third place on Newgrounds.

Posted Image

So yeah! I would say the game is a success, but not quite a hit. The most critical remarks is that the music is a bit crappy, too short, and not nearly challenging enough making it more of a toy than a game. I do have plans to make a proper sequel later this year which will include a level editor, online level database, scoreboards, more game mechanics, and an iOS version. In the meantime, I'm going to be concentrating on my next 1-2 games first, before I whip out the wild card.

Posted Image


Joints

Posted by , 02 December 2010 - - - - - - · 359 views

This is the eighth level that I have finished. I've added some support for joints (b2RevoluteJoint, b2DistanceJoint) and it has opened up so many possibilities. I attached many circles together using b2RevoluteJoints to make this long chain that must be held by both ends. A third cursor is needed to swing the hanging door that nudges the circle off the platform.




Simplify!

Posted by , 28 November 2010 - - - - - - · 296 views

I did not like the buttons that open gates from the previous entry.. it seemed like a cheap and easy way out. I replaced it with boxes that must be dragged around. This simplifies the game because it is clear that all orange boxes can be moved and all blue boxes are static.

Additionally, there is now a button to end the current cursor's turn. This will immediately play the recordings of all the cursors.



In this puzzle, the horizontal box must be moved to the right to drop the vertical box down. Then, then circle can be moved to the bottom, but since the vertical box is now blocking the bottom tunnel, the vertical box must be dragged up so that a second cursor can then move the circle through the tunnel.


Co-op Cursors

Posted by , 26 November 2010 - - - - - - · 247 views

I'm trying to make an original game with FlashDevelop. The goal is simple - to get the box or circle to its destination. But the goal cannot be accomplished with one cursor alone - the level is rewound while the previous cursor(s) have their actions replayed in the scene. For example, one cursor may need to hold down a button, while the other drags an object through an opened gate.

There are still many design problems that I'm trying to iron out.




Box2D in Flash

Posted by , 21 October 2010 - - - - - - · 879 views

I finished the development of Xmas sliders a couple weeks ago and submitted it to to the Apple store. It is awaiting a review.

My experience submitting a game for the iPhone/iPad is a bit sour, though the development was fairly easy. I have heard that the process to submit a finished app has improved, but it took many long and painful hours sifting through outdated documentation to make it this far.

Anyways, in the meantime I coded up this simple demo in Action Script 3 using Box2DFlash. It is only 150 lines of code. I did the art myself, as inspired by some recent games like Angry Birds:


//===========================================================================
// Elliot Pace
// This software code uses the zlib License - http://en.wikipedia.org/wiki/Zlib_License
// This software uses the Box2D physics library for Action Script "Box2DFlashAS3" - http://sourceforge.net/projects/box2dflash/
// Box2DFlashAS3 is a physics library for Flash built from Eric Catto's Box2D library under the zlib license - http://www.box2dflash.org/
//
// Copyright (c) 2010 Elliot Pace http://www.elliotpace.com
// *
// * This software is provided 'as-is', without any express or implied
// * warranty. In no event will the authors be held liable for any damages
// * arising from the use of this software.
// * Permission is granted to anyone to use this software for any purpose,
// * including commercial applications, and to alter it and redistribute it
// * freely, subject to the following restrictions:
// * 1. The origin of this software must not be misrepresented; you must not
// * claim that you wrote the original software. If you use this software
// * in a product, an acknowledgment in the product documentation would be
// * appreciated but is not required.
// * 2. Altered source versions must be plainly marked as such, and must not be
// * misrepresented as being the original software.
// * 3. This notice may not be removed or altered from any source distribution.
//===========================================================================

package
{
import Box2D.Collision.b2AABB;
import Box2D.Collision.Shapes.b2MassData;
import Box2D.Collision.Shapes.b2PolygonDef;
import Box2D.Collision.Shapes.b2PolygonShape;
import Box2D.Common.Math.b2Vec2;
import Box2D.Dynamics. b2Body;
import Box2D.Dynamics.b2BodyDef;
import Box2D.Dynamics.b2World;
import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.Event;
import flash.geom.Matrix;
import flash.geom.Matrix3D;

public class Main extends Sprite {
// This will "embed" these assets into the swf file - which means once you build the swf flash file, you will not
// need to include these files!
[Embed(source = '../data/bg.jpg')] private var imgBG:Class;
[Embed(source = '../data/box.jpg')] private var imgBox:Class;

// There may be functions available for this elsewhere, but multiply angles by these to convert them
private static const m_todegrees:Number = 57.2957795;
private static const m_toradians:Number = 0.0174532925;

// I like to just hard code the width and height rather than access it by some other means.
// These values never change on runtime anyways.
// The location of the top left of the window is (0,0). The bottom right is (m_width, m_height).
private static const m_width:Number = 512;
private static const m_height:Number = 512;
private var m_dt:Number = 1.0 / 50.0;

private var m_world:b2World;
// Total time in seconds since we initialized.
private var m_time:Number = 0.0;
private var m_bodies:Array = new Array();

public function Main():void {
// The game begins here!!
if (stage) Init();
else addEventListener(Event.ADDED_TO_STAGE, Init);
}

// Creates a Box2D rigid body (of type b2Body) and includes a reference to the bitmap instance for rendering.
private function createBody(_x:Number, _y:Number, _width:Number, _height:Number, _density:Number, _visible:Boolean, _bitmap:Class):b2Body
{
var bodyDef:b2BodyDef = new b2BodyDef();
bodyDef.position.Set(_x, _y);

var body:b2Body = m_world.CreateBody(bodyDef);
var shapeDef:b2PolygonDef = new b2PolygonDef();
shapeDef.SetAsBox(_width * 0.5, _height * 0.5);
shapeDef.density = _density;
shapeDef.friction = 0.6;
shapeDef.restitution = 0.5;
body.CreateShape(shapeDef);
body.SetMassFromShapes();

if (_visible) {
var graphic:Bitmap = new _bitmap();
addChild(graphic);
body.SetUserData(graphic);
}

m_bodies.push(body);

return body;
}

private function Init(_event:Event = null):void {
// Create the background first so it gets displayed first. Everything else
// gets drawn on top.
addChild(new imgBG());

// Create world that all the physics objects will be contained in.
// In some games, multiple worlds may be a good idea.
var worldAABB:b2AABB = new b2AABB();
worldAABB.lowerBound.Set(-1000.0, -1000.0);
worldAABB.upperBound.Set(1000.0, 1000.0);
var gravity:b2Vec2 = new b2Vec2(0.0, 100.0);
m_world = new b2World(worldAABB, gravity, false);

var body:b2Body;
body = createBody(m_width / 2.0, m_height - 50.0, m_width, 8.0, 0.0, false, null);
body = createBody(-4, m_height * 0.5, 8, m_height, 0.0, false, null);
body = createBody(m_height+4, m_height*0.5, 8, m_height, 0.0, false, null);

body = createBody(m_width / 2.0, 100.0, 64.0, 64.0, 1.0, true, imgBox);
body.SetAngularVelocity(Math.random() * 4.0);

body = createBody(m_width / 2.0 + 100, 100.0, 64.0, 64.0, 1.0, true, imgBox);
body.SetAngularVelocity(Math.random() * 4.0);

body = createBody(m_width / 2.0 - 100, 100.0, 64.0, 64.0, 1.0, true, imgBox);

removeEventListener(Event.ADDED_TO_STAGE, init);
addEventListener(Event.ENTER_FRAME, Tick);
}

private function Tick(_event:Event = null):void {
var i:int;
var body:b2Body;
var sprite:Bitmap;

for (i = 0; i < m_bodies.length; i++) {
body = m_bodies[i];
sprite = body.GetUserData();
if (sprite != null) {
var matrix:Matrix = new Matrix();
// Offset so origin is at center of box. Then it makes sense to rotate, and then translate.
// This is necessary because the position of a Bitmap is actually the top left corner.
matrix.translate( -sprite.bitmapData.width*0.5, -sprite.bitmapData.height*0.5 );
matrix.rotate(body.GetAngle());
matrix.translate(body.GetPosition().x, body.GetPosition().y);
sprite.transform.matrix = matrix;
}
}

// Integrate the physics objects.
// * Change the 2.0 to anything if you want to make the physics simulation run faster.
// Yes, it is incorrect for me to be running the physics simulation at twice the speed, but it is an approximation of the real world anyways.
// * Change the 5 to an integer greater if you want to improve the reliability of the physics simulation at the cost of performance.
m_world.Step(m_dt * 2.0, 5);
m_time += m_dt;
}
}
}






physicstest.swf

Download: physicstest.zip

The project file can be opened with FlashDevelop, which is an Action Script editor. I installed a trial version of Adobe Flash for the FLEX SDK and then I installed Flash Develop. It worked for me, I hope it works for you. Sometimes the boxes vibrate.. anyone know a fix for that? Anyways, let me know if you have any questions or troubles.


More progress

Posted by , 19 September 2010 - - - - - - · 279 views

I did some more progress on the game. The house goes back to the main menu, the 123 toggles the digits, and the egg "scrambles" the puzzle (lol). I only have time to work on this game bit by bit, but I can say that I am having fun with it. :)




Framework on Mac Mini

Posted by , 11 September 2010 - - - - - - · 261 views

My Mac Mini and first generation iPod Touch I bought for game development more than a year ago had been sitting around idle until now. I needed to upgrade to Snow Leopard so that I could register as an individual developer and download the SDK. Then I found out that first generation iPod Touch devices are no longer compatible for app development.. HmmM?? I'll upgrade that too, but for now I can just use the emulator:



I decided to make my first game a slider puzzle game. It has been relatively easy so far. Interestingly, the iPod and iPad have different aspect ratios so I occasionally switch the emulator to ensure things are getting drawn correctly.


More pictures

Posted by , 29 August 2010 - - - - - - · 252 views

Here are three more pictures I did. I only have one left to make a total of eight. What do you all think I should do? Hanukkah? I have already done Kwanzaa and a winter scene with a church.

(If you didn't read the previous post, these are for a jigsaw puzzle game)

















December 2016 »

S M T W T F S
    123
45678910
11 121314151617
18192021222324
25262728293031

Recent Entries

Recent Comments