Home | Rules and Guide | Sign In/Create Account | Write a Post | Donate | #ludumdare on irc.afternet.org (Info)

Ludum Dare 23 — April 20th-23rd, 2012 — 10 Year Anniversary!

Ludum Dare 22 :: December 16th-19th, 2011 :: Theme: Alone

[ Results: Top 50 Compo, Jam | Top 25 Categories | View My Entry ]

[ View All (Compo, Jam) | Warmup ]


About Spiridion

Spiridion's Trophies

Spiridion's Archive

Postmortem (or I hate javascript!)

Posted by
Sunday, August 29th, 2010 11:19 pm

My foiled post.

Things that went right:

  • Cooking. I didn’t like the theme and had no ideas (and I’m pretty sure I voted for the theme). So I went and cooked dinner and ended up with a really good idea. Well, I thought so.

Things that went wrong:

  • I tried to get Slick 2D working a few hours before the compo started. I couldn’t get a simple blank screen up in an applet. So I gave up and switched to Canvas.
  • I didn’t have a javascript framework ready ahead of time. I tried to shave some time off by re-implementing some of the code I used in LD17, but creating an engine in javascript just sucked a lot of time away.
  • I needed path finding and grabbed a random javascript A* implementation off the web. Other than having issues integrating it, I also ran into performance issues. And in retrospect I’d have ran into licensing issues since there was no explicit license. This past week, I’ve been converting a fast implementation of A* to javascript. The old A* took 2,240 milliseconds to path a very simple blockade. The new A* took 100 milliseconds to path the same blockade. An order of magnitude better, awesome! Except I need less than 16 milliseconds to fit within a frame, so I need to break the algorithm up so I can compute it over several frames. In javascript. No thank you.
  • I tried to write a game in javascript. Being weakly typed, I ran into so many bugs that should have been caught at compile time. Typo one variable name and the interpreter just creates an instance of it. Nice. I also ran into problems with firebug. Things like infinite loops causing the debugger to not function. Even if you put a breakpoint in before the infinite loop starts. I switched over to Chrome and had less issues. But I don’t think I’m ever going to write anything this complex in javascript again. Spending hours tracking down things that a compiler could’ve caught in seconds is not my idea of productivity.

What I’ll do in the future:

  • Check out and vet my tools ahead of time. I think I’ll try Unity. Or Slick 2D again (with more time spent getting to know it). Or anything that’s strongly typed. =p
  • I may continue with my tower defense idea, because I still think it’s a good game. But I’m trashing the code I’ve got so far in favor of something more fun to develop in.

Foiled

Posted by
Sunday, August 22nd, 2010 6:54 pm
Conga Line

Conga Line

It’s hard to give up after working so hard, but there’s no way to get a working game in 5 minutes from what I have. The Javascript A* I nabbed off the web performs way too slowly (it does a linear search through the arrays storing open and closed nodes). If I just put a moderate blockade in place so the enemies have to path about 5 extra steps out of their way, the A* implementation takes somewhere from 1-2 seconds in firefox. Chrome is better at about .5 seconds, but still not playable. With that big a delay, the enemies overshoot their target tiles and have to backup, creating a nice conga line. Even if I managed to have a decent A*, I still didn’t get zombie infection implemented, so there still isn’t any gameplay.

I may try to get in on the jam, but with work tomorrow that only gives me a couple extra hours.

Progress

Posted by
Sunday, August 22nd, 2010 12:15 am

Almost Rainbow Almost All the Way!

Almost Rainbow Almost All the Way!


Let’s see. I have an engine. Sorta. And I’m spawning enemies who are rushing the target. Sorta. And I have art. Sorta. (that rainbow streak is a row of enemies that must be spawning once per frame).

Tomorrow I need to get enemies hitting the target, pathing, defenses, allowing the player to place defenses, losing state, and winning state. Hmm, sounds so easy!

Obligatory Cat Post

Posted by
Saturday, August 21st, 2010 7:17 pm

Obligatory Cat Photo

Obligatory Cat Photo


This is what my cat thinks of what I’ve completed so far….
Seriously, I need use a library or engine next time and take the week prior to prep my dev environment. I have a mausoleum and some 16×16 pixel people on screen, but the people don’t do anything yet.

Green Screen!

Posted by
Saturday, August 21st, 2010 12:16 am

GreenScreen
Jumped off IRC (I’m lurking as spiridios there) to go to bed then decided I needed to at least get FPS showing to prove the game loop works! Working in Javascript/HTML because I couldn’t get Slick 2D to work as an applet (some kind of permissions problem).

Posted by
Friday, August 20th, 2010 9:17 pm

IMG_1080Cooking dinner had its effect, I now have an idea for a tower defense game! I’ve since learned that others are also doing tower defense. =( Oh well, mine will be more mine! Yeah, I dunno what that means either. I should get my blank screen up.

Oh, that’s fajitas, mexican rice, and refried beans in the pic.

My Workspace

Posted by
Friday, August 20th, 2010 5:39 pm

I just “cleaned” it. Doesn’t it look so spotless? =p
IMG_1079

Waiting for the topic to decide if I’m going to participate. I’ll either try Javascript/Canvas again or go learn something new with Java/Slick 2D, depending on, oh, I don’t know, random fluctuations in the space-time continuum.

Evil Lair Command compatibility testing

Posted by
Tuesday, April 27th, 2010 9:49 pm

Evil Lair Command uses HTML5′s canvas and javascript. In theory that means it runs anywhere. I decided to do some more compatibility testing based on what I have readily available to me:

Browser OS Result
Firefox 3.6.3 Win 7 Developed in (so of course it works)
Firefox 3.6.3 Ubuntu 9.10 Works at full framerate. I only have a touchpad here, so I agree TOUCHPAD HELL!
Firefox 3.5.9 Win 7 Works
Firefox 3.5.9 Win XP “Choppy, couldn’t hit boats” Note: this computer also had problems with a Silverlight game we tested on it.
Firefox 3.0 Win XP Doesn’t work (only shows blue square)
Safari 4.0.5 Win 7 Works
Safari iPhone OS 3.1.3 (iPhone 3GS) Low framerate. Upside-down text. Not really playable.
Chrome 4.1.249.1045 Win 7 Works
Opera 10.52 Win 7 The mouse position is off, so hitting the boats is even harder.
IE 8 Win 7 Fails. I also tried the canvas compatibility library, which also fails with a blue square.
Fennec Maemo Half the graphics don’t display, maxed CPU with single-digit FPS.

Obviously some of the playability depends on the hardware you’re on. Leave a comment if you want to play “what can this stupid game run on” too.

Almost iPhone Compatible

Posted by
Monday, April 26th, 2010 9:02 pm

I borrowed an iPhone to test Evil Lair Command and it almost worked. All the text was being displayed upside down inside and outside the canvas. The text that was still inside the canvas was flickering while the text outside wasn’t being “erased” each frame, so it just piled into a big smudge of pixels. The framerate was low and based on the FPS smudge I think it was single-digits low. And it was darn near impossible to hit any pesky agent boats, though I did accidentally hit one, so I know it’s possible. I think it could work if I could have some more time to work on it with a real iPhone, but I don’t want to buy an iPhone just for this silly game. =p Here’s some screenshots of the grand event.

Bottom line: don’t try to play Evil Lair Command on an iPhone (3GS to be precise) unless you’re morbidly curious. However, if you have an Android device or some other mobile device that supports the Canvas tag, I’d be happy to hear the results.

First Completed LD!

Posted by
Sunday, April 25th, 2010 8:21 pm

Entry Here, Game Here (source currently available by viewing source and grabbing the js and css files.)

This time I tried to write a very simple game after failing with multi-bodied collision response and pixel-perfect collision detection in LD15.

Evil Lair Command is a variation on Missile Command where you defend your volcanic island lair from the likes of 007. Ripe for lots of humor that never made it in (see below).

I decided I really wanted to try HTML5′s Canvas despite having never worked in it before and not touching  javascript since 2007. I prepped myself for this challenge by blitting an image to a Canvas on Thursday.  The biggest hurdle (for me) was the fact that an image doesn’t load immediately upon setting its source. I was rewriting the image handling code up to about 15 minutes before the deadline because the old code was crashing when I added boat spawning. There’s still a lot of bad code leftover from the old image handling methods, like the initGameState which is now a NOP (thankfully it doesn’t crash anything and just silently moves on to the next state).

I also lost a lot of time yesterday when I got sick. I ended up sleeping several hours in the afternoon and when I was working I wasn’t concentrating that well.

Stuff that was planned but didn’t make it in:

  • Water texture that I spent more than 3 minutes creating.
  • Laser graphics.
  • Explosions.
  • Minions (lives). Each time a boat hits the island a named minion would be lost protecting the island from a named government agent.
  • Increasing difficulty as time progresses instead of just throwing a mass of boats at you in the beginning and spawning a new boat at a more-or-less constant rate (it’s a constant rate that’s perturbed by a random variation).
  • Sound effects (including Evil cackles).
  • Game restart that’s not triggered by clicking. Because it’s annoying to be trying to click on a boat just before it “reaches” the island, only to find you’ve started a new game.

Oh well, I have all the time in the world to add those features now. =p If I do, I’ll probably post a link to it from the Game Site, leaving the LD17 entry where it’s at for judging.

- Micah


All posts, images, and comments are owned by their creators.

[fcache: storing page]