Posts Tagged ‘code’

Chevy Ray’s Codebase

Posted by (twitter: @xMrPhil)
Friday, August 24th, 2012 7:36 am

I took Chevy Ray‘s code that he released as part of his keynote for LD23 and put it up on github.  It is written for his FlashPunk engine.   I used it to make my LD23 entry Seeds of Destruction and it worked out really well for me.

PS Chevy if you happen to see this, I’ll happily transfer the repository to you.

Code on GitHub

Posted by (twitter: @attrition0)
Tuesday, April 24th, 2012 9:14 pm

While more for myself than anything else, I’ve placed my Unity project on GitHub. Maybe somone can make it.

Game: Earth Is Dying!

GitHub: TinyWorld

Till next time!

Lunch #1 and Serious Bug

Posted by (twitter: @xMrPhil)
Saturday, April 21st, 2012 12:04 pm

Lunch 1
It’s almost 3 pm here in Arlington, VA and I’m having my first lunch for LD23. Kind of late but I wait until I’m hungry.

Chicken and Vegetable stir-fry.
Lunch 1

Screenshot 3
It’s coming a long, but I’m feeling the pressure. My task list seems too long. Worst part is I’ve hit a bug! Maybe you can help? My FlashPunk Entity is not calling the Update method! I’ve triple checked and the World Update is being called and calling the supper.Update()!

package SeedsOfDestruction
import com.greensock.easing.Cubic;
import com.greensock.easing.Quad;
import com.greensock.TweenMax;
import flash.display.BitmapData;
import net.flashpunk.Entity;
import net.flashpunk.FP;

public class SeedBullet extends Entity
[Embed(source = “/assets/Seed Bullet.png”)] public static const SEED_BULLET:Class;

public static const SPEED:Number = 200;

public var image:Image;

public function SeedBullet(player:Player)
// Make the Pink transparent
var bitmapData:BitmapData = Global.MakeTransparent(SEED_BULLET);
image = new Image(bitmapData);

super(x, y, image);

FP.angleXY(this, player.stem.angle, 40, player.x, player.y);
image.angle = player.stem.angle;
image.smooth = true;
active = false;
layer = 2;

setHitbox(40, 40);
type = “seedbullet”;


override public function update():void

if (collide(“BadPlant”, x, y))

override public function added():void

var time:Number = FP.distance(x, y, world.mouseX, world.mouseY) / SPEED;, time, { x:world.mouseX, y:world.mouseY, ease:Quad.easeOut, onComplete:explode } );

public function explode():void
world.add(new Explode(this));

Desk Shot + Code

Posted by (twitter: @xMrPhil)
Friday, April 20th, 2012 4:51 pm

Here’s the command center, that’s right I code in a storage closet and that’s my cat Jack.  His hobby is to keep me from using the keyboard or mouse.

Mr. Phil Games Earth Headquarters

Mr. Phil Games Earth Headquarters

I also wanted to share this snippet of AS3 code that lets you choose a color and then convert pixels of that color to transparent pixels:

public static function MakeTransparent(source:*, color:uint = 0x00FF00FF) : BitmapData
// Get the bitmap data so we can fix it
var bitmapData:BitmapData
if (source is Class)
bitmapData = FP.getBitmap(source);
else if (source is BitmapData)
bitmapData = source;

// We aren’t use the transparent feature, hence the color
var bitmapDataNew:BitmapData = new BitmapData(bitmapData.width,
bitmapData.height, true, 0x00000000);
var pt:Point = new Point(0, 0);
var rect:Rectangle = new Rectangle(0, 0, bitmapData.width,
var transparent:uint = 0x00000000;
var maskColor:uint = 0x00FFFFFF;
bitmapDataNew.threshold(bitmapData, rect, pt, “==”, color, transparent, maskColor, true);

return bitmapDataNew;


Ancient Rover

Posted by
Monday, December 19th, 2011 7:28 pm

I finished my game in time for the jam.
If you thought that my last compo typing game was bad, this is a morse code game.
I’m an evil game designer… and loving it.

The only button that works is the spacebar.

Progress Update

Posted by
Sunday, December 18th, 2011 12:14 pm

Ok, so I’ve been busy this weekend, but I managed to get a little bit done.

I have a moon rover and it can be commanded with only the space bar (through dots and dashes a la morse code).

My collisions are still busted.

HELP! (Slick2D)

Posted by (twitter: @caranha)
Sunday, December 18th, 2011 5:44 am

So I´m trying to pretty up my game, but I can´t get Slick2D to render fronts using the UnicodeFont class. (So I can´t use some of the fancier functions from that class)

using the Graphics Class, I manage to:


But when I do:

UnicodeFont font = new Unicodefont(new Font(fontname, Font.Plain,20);

Nothing happens.

I have tried to add a font effect to UnicodeFont, but it is still not displaying :-(

Halp, please?

EDIT: Thanks for all the help! It turns out that I have to font.loadGlyphs() at every render cycle to get my font to display.

I’m in!1!

Posted by
Tuesday, December 13th, 2011 2:04 am

I’m in. LD22 will be my first ludum dare. Looking forward to it 😀
My tools of destruction:

Code: C++
Graphics: GIMP
Sound: LMMS, Audacity
IDE: Code::Blocks

I will probably be streaming during the competition. I just need to find a way to stream from ubuntu first…

yesh i done wit code :s

Posted by
Saturday, June 12th, 2010 3:58 pm

im done with all the code and now im just gonna make the sprites good! im so happy i finished with code :D:D:D:D:D:D:D:D

so ya ill see you when im done spriting


go to sleep

Posted by
Friday, April 23rd, 2010 9:01 pm


simplemenu pre-Mini-LD5 release

Posted by (twitter: @OMGWTFGAMES)
Friday, November 7th, 2008 4:52 am

Not sure if I’ll participate in Mini-LD5 yet or not, but just in case, here’s an alpha release of my ‘simplemenu’ library. It could well be the simplest GUI framework you can imagine. It barely deserves the title of GUI, actually. It’s intended to make it easy to add clickable “Start”, “Options”, “Quit” buttons to the title screen of a game. It works for me, but it’s far from finished.

(Also, sorry to release code so close to the start time … won’t do it for a ‘real’ LD … but for a mini-LD … well … better lateish than neverish).

Likely Entering

Posted by (twitter: @sgstair)
Wednesday, April 16th, 2008 9:30 am

Hi all,

I’m not exactly new to LD, but it’s been quite a while. I’m planning to enter LD11, and I have some interesting ideas up my sleeve :) I’ll be writing all my code completely from scratch, using Win32 -I have a lot of experience doing this though, so I don’t think it’ll be a handicap.

I’ll also be recording a time lapse video of my progress, which might be amusing to watch afterwards – Good luck everyone (you’re going to need it :P)

PSDImage class

Posted by
Saturday, April 12th, 2008 7:20 am

I might want to use this for my entry, so I’m putting it up for free download to avoid cheating.

Just some loader code for PSD images, you can retrieve image data for each layer in the image through pointers to regular 32-bit ARGB  pixel buffers (with individual bounding boxes and positions in the image). Haven’t tested it extensively, and it will probably crash for some images… but if it works for you then go ahead and use it. My idea is to do level layout and similar stuff in Photoshop to remove the need for a level editor. Being able to draw scenery (and collider geometry?) in multiple layers should be enough to make something interesting, and do it conveniently.


[cache: storing page]