hi-scor-es

LD23

My Progress So Far

This is my first ludum dare and I’m having a blast!

I’m making a tiny world machine. You place the elements and watch life spring to -erm, life!

Instructions (might need to click in frame before anything works):

  • Hit ‘w’ and click or drag to create water
  • Hit ‘m’ and click or drag to create mountains
  • Hit ‘g’ and click or drag to create grass.
  • Use ‘r’ to toggle run-mode on or off.

While the game is running, fish will appear in large areas of water and plants will grow in grass. Create enough resources and you’ll generate bears who will go through eating all of the fish and plants.

Play the tiny world builder

It’s not a game -yet- but it will be once I start tweaking the mechanics. The idea is that it’s possible to have too many resources since it will spawn more and more bears. The bears then eat all of the resources too quickly and die out . The idea is you need to balance the position of the resources. This isn’t possible yet because bears don’t die yet, but they will. Oh they will.

 

LD24

I’m in

This will be my second LD.  I am planning on doing it in HTML5/Javascript and probably will use the  CAAT engine.

Fun Fact: Based on permalink, it looks like 929 people before me have made a post with the subject ‘I’m in’.

GA SpaceShips

I have my idea: a space shooter that lets you evolve your ship to add on shields, more guns, more body segments, etc. Each ship is based on simple pieces that fit together. As you defeat enemies you get evolution points that you can spend to add onto your ship. But watch out because the enemies you fight also evolve using a Genetic Algorithm. Survive enough generations and out-evolve the enemy to win!

My list of chores:

  • Basic ship pieces fitting together
  • Ship flying, shooting, & collision behavior
  • Ship generation based on GA string
  • GA generation & cross-breeding
  • Put it all together into a game!

 

I’ve started to draw a couple of the pieces. The main bodies will be hexes so it all fits together nicely.

project codename is Darwin Defenders: https://github.com/trflagg/DarwinDefenders

Shields & guns added

Shields & Guns now attach to the ship bodies. And ships can shoot!

Next steps:

<ul>
<li>Attach bodies to other bodies</li>
<li>Collision detection</li>
<li>Enemy ship generation</li>
<li>Cross-breeding & GA</li>
</ul>

It would be really great to get this all done today so I can focus on the ‘game’ aspects and polish tomorrow.

 

With one day down and a late night and sleep-day left to go, let’s look at the big board:

  • Attach bodies to other bodies
  • Collision detection
  • Enemy ship generation
  • Cross-breeding & GA

Not bad!
I’m really hoping to get the ship generation & some basic AI going before I go to sleep. Some basic cross-breed would be awesome, but I don’t think it will happen.

Since I’m using hexes and drawing my pieces, this game has been a lot more math-intensive than the last one which was grid based. Feels pretty good to get back into things. Putting the pieces together so that they match up was surprisingly easy, just a lot of paper scribbling and degrees to radians translating. Hexes and equilateral triangles are amazing.

Collision-detection was made easier by the engine’s built in space-hashing, though modelspace/viewspace bit me in the ass for a bit. Today I got stuck for a while on determining the size and position of the bounding rectangle (you can see them in the screen shot). The tricky thing is that hexes can be attached to the base hex body. Some of the time recursion works out really well, but not for the bounding boxes. I ended up calculating the bounding rect in model space, then translating based on the position that the slave hex is attached to the master hex and then unioning a master hex and its slave hex’s rects. Whew!

So up next is enemy creation & some basic AI. After that I may have something actually playable.

Crisis Averted

I had a wonderful plan and then hit a snag.

All along I had been expecting to use CAAT’s path-following for the enemy AI. I was going to define paths based on the GA chromosome string that would be like a ‘signature attack’ for each enemy that would cross-breed. This morning I found out that the paths are defined in absolute terms, not relative, so I can’t just define a path giving the general direction, but instead have to calculate the general direction each time. I was also facing complexity of how to represent the path, path types (linear, cubic, quadratic), and how to ensure the randomly generated path variables would work.

So I gave up on the paths and headed into the wonderful world of steering AI. Now I’m thinking that there will be multiple behavior types (seek, pursue, evade) and the type will be baked into the chromosome. This should work.

The deadline is looming and I still don’t have cross-breeding or, you know, a real game. I’m starting to get worried.

On the flipside, looking through the blog posts on LudumDare.com/compo shows that the theme has a lot of folks going the Artificial Life route. That’s awesome! I hope those folks aren’t discouraged. Not many AL-based games aren’t really that fun. Did anyone ever ‘play’ Creatures?

Homestretch

It finally all works. The enemies, the chromosomes, the cross-over, the mutation, everything! Hooray!
The only problem is that now I don’t have much time to make it into a real game.

It doesn’t bother me, though. I think what I built is pretty fun and pretty cool. I wanted the GA and game system to be good, and I think it is. It took a lot of work to get it all to work recursively through the body parts, but it’s worth it.

Now I have 2 hours to make things pretty.

LD26

_

My game:
A moving circle.
One button controls.
Pickups modify.
Achieve your goals.

The theme says much.

P27

Can you get them all?
Screen Shot 2013-04-27 at 9.16.20 PM
Code
Play

P27

It now has levels.
Screen Shot 2013-04-28 at 1.25
Code
Play

P27

Has sound and lines!
Needs more levels.
Screen Shot 2013-04-28 at 5.48.50 PM
Code
Play

P27: Postmortem

Enough of the minimal posts, it’s time for introspection!

What went right:
Minimal theme. This was my favorite theme so I was very happy to see it win. It’s specific, yet can influence art, music, and game design. Like everyone else, I rushed to the wikipedia entry and stared at Mondrian’s squares. I read that minimalist art didn’t have to say anything in particular but existed just to look good. I usually have a story and theme linking everything together but with minimalism I didn’t have to worry about that and could remove all meaning and still fit the theme. At one point during the weekend I read someone’s post that said that minimalism was the best theme ever because programmer art was the perfect art for it. I have to agree.

Quick design conecept. While taking in the internet’s examples of minimalist art, I pictured in my head a moving line and manipulating it with a button press. Depending on the location of the goals, the player would end up with interesting minimalist pictures. To keep things fun, I thought of adding pickups to modify what the button does and laying out levels that require obtaining the pickups in a certain order. After I had my prototype I noticed how crazy it was to have the button down and button up work differently. And that’s pretty much all I needed. I think Ludum Dare works well when you have a good design from the beginning that you can focus on and it flops when you start with too general of an idea and have to rush to design something coherent at the end. I got very lucky this time that my design ideas ended up working out.

SVG. Rather than use the bitmap graphics of a canvas library, I chose the Raphael SVG library for web based vector graphics. I decided on SVG because minimalism made me imagine a very clean game. With vector graphics you can rotate and scale to any size without worrying about jaggies or pixilation. It is also very easy to manipulate colors and outlines since you don’t need to create new graphics but simply change the stroke and fills. Unfortunately, I didn’t get to use much of this in the end, but ever since I came up with the design I knew I wanted to take P27 past the Ludum Dare weekend and try and get a complete fully polished game out of it. Hopefully the time I lost implementing SVG will pay off in the future.

What went wrong:
SVG. You probably saw this coming. Pretty much all of the problems and time sinks I had were the result of choosing SVG. I’m going to break them down further in the next items, but know that SVG was the root of them all.

Rolling my own. There aren’t any SVG game engines out, just graphics libraries. This meant I had to program all of the pieces that make a game a game for myself. P27 isn’t very complicated so it wasn’t too bad, but I did lose time on tracking movement and position, handling collisions (thank GOD Raphael computes bounding boxes), and level setup.

Sweating the small stuff early. Since I hadn’t done an SVG game before I had no idea how it would perform. My initial tests showed ugly jitteriness on the iPad. That had me worried that most users wouldn’t get the smooth animation I was looking for. I could fix this by swapping out Raphael’s setInterval animation with some custom css transition code, but that was risky and did I have the time? What about modifying the animation after it had started? SVG animation is mainly used today for interactive pie charts and bar graphs, could I stop it in response to an button press event and change the line’s direction? I think I spent all of the time I saved by coming up with an idea early by worrying over the perfect execution of it. I was afraid of going too far down the road with SVG and then finding some impossibility that would cause me to start all over again so before I started I spent too much time researching every little thing to make sure it would work. In LD you don’t have time to worry, you have to go with gut decisions. Before I started I spent too much time in my head and not enough time putting bits to processors.

That damn line!. My final worry came from the moving line I saw in my head. Even though I already had a dot moving and changing direction, I wanted a revealing line instead. I wasted hours thinking about how to do it and researching how to reveal an SVG path. I found some solutions, but they all sounded too slow and time consuming and I once again I found myself pre-optimizing in my brain. The quick solution I ended up with did turn out okay, and I suppose one could argue that a point is more minimal than a line, but I want a line damnit!


If Ludum Dare were a video game it would be a resource management game. You would have a finite amount of the time resource and have to figure out how to best distribute it among thinking, coding, polishing, making art, and making sounds. Last weekend I spent too much time on thinking and not enough on coding and sound (I will gladly admit the music ended up pretty awful).

In the end, however, I am very proud of the result. It fits the theme in art, music, and design and more importantly can be entertaining to play. The comments from the LD community have been very inspiring. I have a goal of spending the next 30 days fixing it up and turning it into a polished little product (I think it would be perfect for touch control on a tablet or phone). Who know, maybe I’ll even get that revealing line I’ve been looking for.

P27
by hi-scor.es
1 programmer
946 lines of javascript
Libraries:

  • Raphael.js (SVG)
  • Buzz.js (HTML5 sound)
  • Requirejs
  • Font-Awesome
  • jquery (who doesn’t use jquery?)

Tools:

  • Sublime Text 2
  • Chrome

Entry
Play

LD29

I’m in

Even though I have too much to do already and it will be a lovely spring weekend, LD could not have come at a better time for me. There is no better way to obliterate life’s problems than by obsessing over game code for 2 days straight.

I’ll probably make something with HTML/JS/CSS/Bootstrap/SASS/Node/MongoDB/etc/etc…

I’ll probably use my fork of nodebootstrap.

I’ll definitely use my Node engine argie.

Maybe even my new Backbone-y animation lib bargie.

TTFN

Tags: html5, im in, javascript

SolidGround #2

The mechanics are working. Simple drill down, connect pipes to resources. Resources help build pipes :)

Now I have 23 hours to make an attractive game out of this.

Screen Shot 2014-04-26 at 10.09.49 PM

Source on github

SolidGround #3

My little digger is moving forward. I calculate score and it costs money to buy pipes. Amazing how it doesn’t feel like a game until you start adding restrictions.

Screen Shot 2014-04-27 at 10.19.18 AM

Play SolidGround
Source on Github

LD31

I’m in

I’m in for LD #31. This will be my fifth LD.

It will be made with javascript.

I’m probably going to use this and a little bit of this.

Or maybe this, this, this, and this.

And I highly doubt it, but just in case, I might possibly use this

The Disk of Phaistos

DiskOfPhaistosBanner

 

The Disk of Phaistos

by hi-scor.es

A combination platform/shooter.

On one screen.