venzon

LD20

LD20, my first!

Hello, I plan to participate in LD20. The tools I’m going to use:

* bfxr for sounds

* gimp for images

* cubase se3 for music, if I have time

* Haskell with my SFML bindings that you can find here:

http://www.venzon.org/files/haskellsfml/

-Joe

Tags: haskell

Comments

sfernald
14. Apr 2011 · 13:41 UTC
Wow, I think this is the first entry in Haskell I’ve ever seen. Lovely language but you are brave indeed. Have you done a game in haskell? I always have problems with doing games in functional languages.

About to start

Five minutes away…

Warming up my text editor…

Idea brainstorming: It’s dangerous to go alone. Take this!

Game ideas:

  1. It’s awesome to go alone. Side scrolling zombie killing with shotguns and heavy metal.
  2. It’s dangerous to go alone. Here, take this Boeing AH-64 Apache. Top-down Zelda clone with you in an attack helicopter.
  3. It’s dangerous to goal one. Soccer game where the goalie has a gun or something. Lol wordplay.
  4. It’s dangerous to go alone. Here, take this peasant. Medieval sim game where you team up an with AI to build a settlement, evolving into a castle, to defend against bears or barbarians or whatever.

Now I’ll put on my practical hat and try to figure out what it’d take to execute these ideas.

  1. Tileset, levels with tile placement and enemy placement that scroll, a couple of walk cycles for the hero and zombies, animations for shooting, jumping, etc, collision against the tile blocks, gravity, gun sounds, zombie sounds, complex music, simple AI.
  2. Tileset, levels with tile placement and enemy placement limited to a screen at a time, a couple of simple animations for the hero and bad guys, collision against the tile blocks, helo sounds, guns sounds, music, simple AI.
  3. Soccer pitch, animations for running, animation for the ball, ball collision and player/player collision, collision with walls, somewhat complex AI that has to try to score goals and defend.
  4. Tileset, fixed gameplay area but scrolling, verrry simple two-cycle animations for most objects and tiles, simple tile occupied collision, somewhat complex AI that has to deal with pathing around obstacles and possible coming up with strategies, lots of ambient music, simple sounds and mayyybe ambient sounds.

It’s dangerous to go alone. Here, take this peasant!

I think I’m going to run with this idea. Some random ideas in no order:

  • Opening sequence where a bored king on a throne gets awarded a peasant by an old man hoisting him over his head.
  • Bored king sits on his throne and is not controllable. You control the peasant.
  • You lose if the king dies.
  • At first your main concern is getting food for the king. You have to hunt an animal, kill it, and use it with the fire to create food.
  • Note sure how the food should be consumed or tracked… in a store room?
  • You can chop down some trees to get seeds that you can plant. The planted seeds will grow into plants that you can chop down and feed the king with.
  • Sometimes a bear will wander into camp and steal food. If you get near it’ll swipe at you. If you get hit it stuns you for a bit. Not sure if you should be able to die.
  • You can use wood to create walls that a bear can’t get through without hacking at them for a bit, but neither can you.
  • Every once and a while, a new peasant will come by to help out. They have specific talents (hunter, farmer, miner, warrior, carpenter/lumberjack, stonemason, blacksmith, etc). At first you just get farmers & hunters. If you accept their help they use your food but do farming or hunting for you.
  • Eventually the king demands gold (or steel? metal? i dunno). You can mine for this and stockpile it similar to food.
  • Maybe you also have to get metal and wood and stone?
  • Once you have some gold/metal, you will get attacked  by human raiders. More dangerous than bears!
  • If you enclose the king, he says something like “Yes, finally a manor fit for a king!”
  • Perhaps the king gives you a bunch of achievements/quests to drive gameplay forward. Once you complete them all you winz.
  • The carpenter/lumberjack will chop down trees and create wood that you can use to make walls.
  • The stonemason crushes rocks into stone that you can use to create much more effective walls.
  • Gold sometimes drops when you kill a rock; most of the time you just get stone or metal.
  • The blacksmith will turn metal into weapons. More effective weapons make the warriors fight better.

Comments

Schwiggy
30. Apr 2011 · 01:32 UTC
I’m taking note of your name so I don’t miss playing this 2 days from now :)

Scoping out the code

Here’s how it’ll work:

  • Main menu for starting a new game or loading a game, possibly for adjusting options
  • Pause menu for saving your game and exiting
  • “Cinematic” screen for the “here take this!” and possibly other interludes (like YOU WIN or YOU DIE), sometimes with text at the bottom that allows you to say “yes” or “no”
  • Randomly generated main play tile area with grass, stone, river, lakes, trees, plants. Should be pretty big. Scrolls as you move around like the SNES zelda
  • Tiles can have objects on top of them such as entities or objects
  • Entities can carry objects
  • Entities can place carried objects on the tile in front of them
  • Entities can move in 4 directions and play a simple move animation
  • Entities can play other simple animations consisting of a few frames
  • A HUD displays resources (plus drains) and the current king’s quest and the day and time of day
  • Entities can attack, attacked things get hurt until they die
  • Upon death, the entity changes to an object or goes away
  • Upon the death of an object, the object can change to one of any random number of things, or can be impervious, or go away, or can change to something that depends on who hit it or what weapon they were using when they hit it
  • Entities need behavior tracking (simple state machine prob?), pathing (A* plus steering?)
  • Some kind of director to spawn resources and enemies and wild animals and friendlies
  • You need a simple set of tools (weapons, building tools) that you can switch between
  • Projectiles (for archers/hunters)?

First screenshot

Woooooooo! My boilerplate haskell code came in handy, although I had to fight with the input code for a bit, and I still only have a black window that prints input events to the console.

Title screen: complete

I’m a little worried about how long it take me to get to this point, but I’m hoping that now I have most of the engine framework up it won’t take me as long to do the actual gameplay bits.

Here’s the title screen:

I think I’m way behind

I’ve just now gotten a proof of concept tile engine scrolling around. It doesn’t draw any characters or do any collision yet. I think I should have done this first, not the title screen, lol.

Progress on starting gameplay

I’ve at least got a controllable entity that can run around now…. Man those are ugly graphics.

A new gameplay direction

I realized I’m not going to have the time needed to complete my original gameplay idea, which was a sim game where you helped out the king as a peasant (hi king, here, take this peasant). I had a NEW idea that’s a lot easier and fits with the theme better. Now, you play as the king running back from a battle to his castle, chased by enemy soldiers or bandits or bears or something (it’s dangerous to be the king). The enemies are faster than you, but they chase as a dumb swarm and you can navigate through obstacles better than they can. You can also fight them, but a better tactic is to throw your crown onto one of them (here take this!) which distracts the mob long enough for you to make your escape, hopefully. Here’s what’s left to do:

  • you spawn at a certain point on the map and have to get to a new point to finish the level
  • ability to play attack animation
  • attacks drain life of whatever they hit
  • enemies are spawned from specific points on the map
  • you are limited from traversing into the margin, enemies aren’t
  • enemy entities swarm toward the crown (or you if they don’t see the crown) trying to keep a little distance between themselves
  • enemies attack when they are close to you
  • you are drawn with a crown object on your head
  • you can press a button to transfer the crown object to the nearest enemy within a radius
  • when life goes to zero, the entity dies which ends the game for you
  • HUD to display life and current level
  • if time, graphical polish, walk animation, more than one level, music

Starting to see the light at the end…

I’ve got most of the code finished for the new gameplay direction. Haskell really shines through as an awesome language for gameplay programming. I was really stumbling over the tile engine stuff, but now that that’s over and my scope is reduced, I think I might actually finish this thing. I have tons of polish-type work to do, but I’m hopeful now. The game’s actually kind of fun, even though it looks like crap.

What’s left, roughly in priority:

  • re-work the intro cinematics to fit the new game story, along with a description of how to play
  • make real graphics for the king, the enemies, the crown, and the castle
  • add sound to the gameplay
  • fix the map so it’s more interesting
  • make music for the gameplay
  • add more object types
  • make graphics for the cinematics
  • make more levels with increasing difficulty
  • make new cinematics to tie the additional levels together

Done.

Finished with an hour to spare. It’s a pale shadow of my original idea, but it is a technically a finished, complete (very short, buggy) game. I’m proud that I at least got something out there! And I’m also excited that it was entirely in Haskell, and to my knowledge the first Ludum Dare entry in Haskell. Thanks to the peeps on #haskell for answering my questions. I need to go get some beer and relax.

http://www.ludumdare.com/compo/ludum-dare-20/?action=preview&uid=3863

Tags: haskell