Spiridios

LD17

First Completed LD!

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

Almost iPhone Compatible

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.

#gallery-1 { margin: auto; } #gallery-1 .gallery-item { float: left; margin-top: 10px; text-align: center; width: 33%; } #gallery-1 img { border: 2px solid #cfcfcf; } #gallery-1 .gallery-caption { margin-left: 0; } /* see gallery_shortcode() in wp-includes/media.php */ iPhone_top iPhone_middle iPhone_bottom

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.

Evil Lair Command compatibility testing

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.

LD18

My Workspace

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.

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.

Green Screen!

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).

Obligatory Cat Post

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.

Progress

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!

Foiled

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.

Postmortem (or I hate javascript!)

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.

Comments

05. Sep 2010 · 12:35 UTC
You can’t handle dynamic typing? Jeez, bro, I always thought dynamic typing made things easier.

LD23

Declaration of Participation

Can’t pass up trying for the 10th anniversary! Going to try again, this time with yet another language/library I’m barely familiar with. PyGame!

At least this time I practiced by converting my only successful LD into Python. I intend to use base code I created from that effort. If you like, you can see the full port of my LD17 entry, Evil Lair Command.

Lunch Time Update

For the record, I’m not liking the them. =p I spent hours yesterday trying to come up with a unique idea based on the theme, had a couple of ideas I didn’t think I could pull off in time, then settled on a reverse Gyruss / Round Space Invaders type game where you defend a tiny planet from something. Yeah, kinda a stretch. Been listening to chiptunes on Youtube to get the proper mind frame.

Here is the title screen for Tiny-Planet Orbital Defender (T-Pod).

End of first full day

I have a rudimentary game! I even have sound!

Though two depressing things happened today:

I learned my idea isn’t all that unique (duh), there are others working on this exact game! =(

I learned that my idea so unoriginal I used it in LD17! =(

 

Even the enemies look the same as the enemies in my ld17 submission! =p (I used the enemy sprite from LD17 as a placeholder since it’s late and I don’t feel like drawing anything right now)

For tomorrow I have to play with the mechanic a lot to try and make it more inverted Gyruss and less Evil Lair Command. I also have to get py2exe working again. I was going to post an alpha, but I couldn’t build an executable. I had it working before the compo on my test project. I’ll have to see what’s gone wrong.

Comments

johnfn
22. Apr 2012 · 06:09 UTC
py2exe is pretty tricky to set up. the way I got it working was to be sure that I had included all the assets. the one that really got me was the font – if you dont specify a default font pygame chooses a random one that py2exe doesnt include. be sure to specify a font!
22. Apr 2012 · 15:00 UTC
It was the font problem, thanks! =p I had ruled it out since I had it working before the compo on a test game with font rendering. The problem was I made some changes to my framework so it now selects a default font. Even though my game wasn’t using that font, the framework was still trying to load it, hence the big boom.

T-Pod Post-Mortem

So it’s probably time to do a post-mortem of my project, T-Pod. The submission page is here if you want to check it out.

I started off on the wrong foot. I took hours on Friday to come up with an idea. The theme just didn’t inspire me – no offense to anyone who was inspired, because there’s some really great interpretations on the theme out there. My brainstorm page was filled with doodles, but nothing was saying “create me!” The idea I finally came up with was mostly just desperation to get started on something, and it really wasn’t original in any way.

When I had two hours remaining I had the game you see here and still a long todo list. I opted for a refactor of the explosion code since it was hacked in and messy (alien saucers don’t explode, lasers do. Hey, it seemed like a good idea a the time!) and I wanted to make the planet explode too. That took almost the hole two hours, not the 20 minutes or so I was hoping for. It also introduced a ton of bugs that I had to clean up last minute. And in the end, the code is still just as hacked in and messy, and I never did get the planet to explode. Next time: messy but working code stays until AFTER compo. In that time I could’ve had a third alien AI behavior, more tuned alien spawning/speed, or just general balance fixes.

Also, my particle effects were supposed to fade with time, but my unfamiliarity with PyGame left me with the always red particles you see in the game. If you check out the resources you’ll see the particle graphic is grey so I can tint it at runtime. Unfortunately the only way I could find to tint a graphic was to do an alpha fill on the surface…. Which would mean a separate surface for each particle, a complex system that keeps surfaces for each possible color, or a fill to a temp surface just before blitting.  Instead I opted to just work on other features (like the useless refactor!)

So what went right? I completed the game and actually had time for polish I’ve never had time for before (music? I actually managed music? Oh yeah, it’s autogenerated). I learned enough Python and PyGame to make a finished game! Prior to this, my only real experience with either was the practice conversion I did of my earlier LD48 game about a week earlier.

Thanks to everyone who’s left a comment on my game! Here, have a cat with a Wii remote on its head.

Post Compo Silverlight Port

http://www.spiridios.com/ludumdare/ld23/postcompo/index.html

I decided to port TPod from Python over to something that runs in a browser, and Silverlight won out as the technology to do it in. It was largely a toss-up between a Java applet and C# Silverlight, and since I work in Java daily I figured I’d refresh my C# skills.

I would have posted this during the compo, but my productivity wasn’t exactly at competition levels and I literally ported the last feature the day voting ended. Which is probably good, since I don’t think this really should count under the “porting” provision. This wasn’t just a “tweak a build file and correct a backslash” kind of port. This was a “rip the guts out, since even the language itself is fundamentally different” kind of port. Those who played the Python version should recognize the game, but will see I implemented some of the suggestions from the comments. The source code largely mimics the Python code, though Silversprite/XNA do things a bit differently than PyGame, and I did refactor and implement some things better now that I had time for such luxuries as “encapsulation”.

LD24

I’m out – but here in spirit

I just started a new game project and I don’t want to lose momentum on it. I’ll be spending the 48 hours trying to finally get something up on screen other than solid green! Darn work’s been keeping me from getting more than an hour here and there on it. At this point, I’ll settle for just getting the GUI in! =p

LD25

So many “I’m in” posts!

So many “I’m in” posts, no one’s going to see mine! Mwuahahahahahaha. Err… Yeah.

Anyhow, not sure if I’m partaking in the compo or the jam. Thanks to finally having a job that’s not totally stingy with the paid time off, I’ll actually have Monday off to use for the jam if I want. Or to use as recovery for the brutal weekend.

Planned tools:

  • C# (express) with XNA.
  • My 2D game library (I’ll post it soonish).
  • Probably JSIL and/or Silversprite for final submission.
  • Sound effects by http://www.bfxr.net/ or my iPod microphone.
  • Audacity for finalizing the sound effects.
  • GIMP for graphics.

Unplanned tools:

  • Uh…. I’ll get back to you on that.

Comments

10. Dec 2012 · 21:30 UTC
Hehehe…

I’m still in

I said I’d be using some 2d library code I wrote. I also have a skeleton “Base code” that just gets a screen on, err, screen. I’m only posting this now because up until now I was still adding basic features like animated sprite (which doesn’t work yet!)

SpiridiEngine (don’t look at it. It’s an awful conglomeration of code written in past Ludum Dare’s)

BaseCode (It uses the engine, so it’s just as ugly)

End Level Boss

It’s the end of day one here (well, technically the start of day 2). Only a bit more then 17 hours left, and I’m about to dedicate 8 of them for sleep. I’m pretty far behind, so this may end up being a jam game. Right now what you see is pretty much what’s there. No gameplay at all.

EndLevelBoss

The AI will pilot an oddly shaped ship and you’ll be the end-level boss that the AI has to fight. We’ll see how much of the core mechanic gets in.

1goat

 

Tags: goat

Not Sure What Went Wrong

End Level Boss Failed

What it is

This is what was done by 3 hours after Jam closing. You can spam the “3” key (no other key does anything) and lightning enemies will spawn at random locations and swarm the Goat Ship. The Goat Ship will attempt to target the nearest enemy until it’s dead, then target the next enemy, and so on. Since the lightning ships can’t actually shoot lightning yet, you pretty much have to spam enough up them to overwhelm the firing rate of the Goat Ship (4 shots a second). The 10 in the upper left corner is the number of enemies that are currently being tracked (two are in the process of exploding). There needs to be around 40 to overwhelm the Goat Ship.

What it was supposed to be

The bars at the top of the window are different kinds of energy. You press the corresponding number key to spawn an enemy that uses that kind of energy. If the enemy damages the Goat Ship, you get more of that energy back for your bar, allowing you to spam more enemies of that kind or allowing you to save that energy up for the final battle.

In the final battle, you are the end boss. The end boss moves around the screen in a pre-determined or random path (the player has no control over this) and you can use your energy stores for attacks. Only the end boss can kill the Goat Ship.

What went wrong

On theme night I lost 6 hours due to not coming up with an idea that I thought was completable in 48 hours. My initial idea was a platformer where you’re the end level boss (very similar rules to those stated above), but I thought a platforming AI would be a bit beyond my ability. It wasn’t until nearly midnight that I realized the idea could still work so long as I didn’t have any pesky platforms to have to jump around.

The next two days development was pretty slow. I did get a decent amount of content done. I spent entirely too much time playing with autotracker-bu and Open-MPT (generated approximately 50 songs), and though I’m quite proud of my pixel art, it took me a while to get it done. Most of the real hardcore development occurred after the compo deadline and during the final jam day. But that just wasn’t enough time for me to get through all the little oddities I hadn’t expected to come up. In hindsight, nothing really sticks out as something that tipped the failure point though.

What I’d do different

I don’t know if I could do anything different about theme selection – if inspiration doesn’t hit you there’s not much you can do short of just going with a bad idea. But once I had an idea, I should have got the core mechanic in without any assets. I wasn’t very motivated this weekend, and having something in front of me moving and playing is one of the best motivators. While I had a Goat Ship in the game on Saturday and the lightning ships in on Sunday, they didn’t do anything in game except animate in place until late Monday!