Posts Tagged ‘code’
Huldo LD
Signing up for the competition seems to be in order. It’s my first one, so hopefully it goes swimmingly.
I’m going to use my old XNA framework engine, but I’ll utilize ANX to get rid of the framework dependency. I tested it a few times and it seems to work mostly fine, except for Rendertargets which leak memory bad and crash the whole thing! Apparently fullscreen support is missing as well which is a bit of a bummer.
I might just ship two versions then eh, when/if I get something done of course.
Here is the codebase for those interested.
Have a nice day.
Chevy Ray’s Codebase
Friday, August 24th, 2012 7:36 amI 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
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
Saturday, April 21st, 2012 12:04 pmLunch 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.

Progress

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;
import net.flashpunk.graphics.Image;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.centerOrigin();
image.smooth = true;
active = false;
layer = 2;setHitbox(40, 40);
type = “seedbullet”;trace(“created”);
}override public function update():void
{
trace(“update”);
super.update();trace(“update2″);
if (collide(“BadPlant”, x, y))
{
explode();
}
}override public function added():void
{
super.added();var time:Number = FP.distance(x, y, world.mouseX, world.mouseY) / SPEED;
TweenMax.to(this, time, { x:world.mouseX, y:world.mouseY, ease:Quad.easeOut, onComplete:explode } );
}public function explode():void
{
world.add(new Explode(this));
world.remove(this);
}
}
}
Desk Shot + Code
Friday, April 20th, 2012 4:51 pmHere’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.
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, 0×00000000);
var pt:Point = new Point(0, 0);
var rect:Rectangle = new Rectangle(0, 0, bitmapData.width,
bitmapData.height);
var transparent:uint = 0×00000000;
var maskColor:uint = 0x00FFFFFF;
bitmapDataNew.threshold(bitmapData, rect, pt, “==”, color, transparent, maskColor, true);return bitmapDataNew;
}
Ancient Rover
I finished my game in time for the jam. http://www.ludumdare.com/compo/ludum-dare-22/?action=preview&uid=1044
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.
![]()
HELP! (Slick2D)
Sunday, December 18th, 2011 5:44 amSo 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:
g.Drawstring(¨foo¨,x,y);
But when I do:
UnicodeFont font = new Unicodefont(new Font(fontname, Font.Plain,20);
font.draw(x,y,¨foo);
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!
I’m in. LD22 will be my first ludum dare. Looking forward to it ![]()
My tools of destruction:
Code: C++
API: SFML 2.0
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
||||||||||
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
so ya ill see you when im done spriting
-pants12
simplemenu pre-Mini-LD5 release
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
Wednesday, April 16th, 2008 9:30 amHi 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
)
PSDImage class
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.
Get: psdimage.zip






