About Cosine

Game developer, musician, Source Engine map maker.


Ludum Dare 31
Ludum Dare 26
Ludum Dare 25
Ludum Dare 23
Ludum Dare 21
Ludum Dare 19
Ludum Dare 18
Mini LD #19
Ludum Dare 17
Ludum Dare 16

Cosine's Trophies

Cosine's Archive

#26 – Day two

Posted by
Sunday, April 28th, 2013 5:47 am

It’s day two! That means I have to actually accomplish a set list of goals, instead of aimlessly building stuff. Here’s the list I built for myself last night-

  • Implement a timer
  • Add support for multiple levels
  • Add bonuses that remove 10 seconds from the timer
  • Add a menu
  • Sound/music

In other news, I changed how visibility works:

It’s not as minimalistic as it was before, but I think this makes it a lot more intuitive to navigate the maze. I’ve left in the option to turn the extra walls off, so I might make that an option in the main menu to make the game harder. Also present are clocks:

They don’t do anything yet, but they will eventually subtract 10 seconds from your time. They also bob up and down gently, which was surprisingly easy to implement in Unity. I’m liking this engine a lot more than I used to! Definitely using this again in the future.

#26 – An objective!

Posted by
Saturday, April 27th, 2013 5:47 pm

There is now a reason to explore the maze – find the stairs out! What’s your reward? Another maze. I need to work on making the gameplay a little bit more engaging, but I’m not sure how.

#26 – Second build!

Posted by
Saturday, April 27th, 2013 3:32 pm

I managed to optimize the maze generation code, as well as make a lot of progress on the gameplay side of things. Here’s where it stands right now:

And of course, a playable build! You can’t win at the moment, but you can explore a randomly generated 10×10 maze.

#26 – First build!

Posted by
Saturday, April 27th, 2013 9:33 am

If anyone has a thing for maze generators, here’s one you can mess around with (Unity). The only parameter is size. I’m still optimizing the code, so currently generation is noticeably slow around 9×9 mazes. Enjoy!

#26 – Code optimization is best optimization

Posted by
Saturday, April 27th, 2013 8:59 am

As you can see, the mazes generated by Prim’s algorithm are a lot more complex and has a lot more branches. Awesome! Now I can get to work on the actual gameplay, right?



Wrong, as it turns out. This maze took upwards of a minute to generate, meaning I really need to go back and optimize this code. It’s nice to have a good maze generator, though!

#26 – Maze generation

Posted by
Saturday, April 27th, 2013 8:25 am

I’ve got maze generation to work! Using a randomized depth-first search algorithm, I was able to produce this:

















However, I’m already sensing a problem here. As you can see, the paths don’t branch a whole lot – finding your way around is pretty easy. Starting from the upper right (where the generation starts), you go quite a ways before even having a decision to make. Not ideal! I think I’m going to just start over and use a different algorithm (namely, Prim’s), as it produces a lot more branching paths, which is great for the gameplay I plan on implementing with this maze.

#26 – First journal entry

Posted by
Saturday, April 27th, 2013 5:56 am

My typical LudumDare usually consists of finding some fairly simple puzzle mechanic that fits with the theme, getting the game done in about 8-10 hours, and polishing it up. I use GameMaker, an engine that I’m super familiar with, meaning I can program most anything that pops into my head with ease.

But not this year. This year, things are changing. This year, I’m going to try and learn Unity, something I’ve been putting off for quite some time. This gives me the advantage of letting more people (read: getting more people to) play my game, since downloading a super simple game is a hassle, not to mention that GameMaker packs on some filesize because of its runner.

I even considered making my game for Arduino, to attract the minimal audience, but I decided against it. I will be porting this game over to Arduino for my electronics class when this is all over, though.

So, what’s the game about? I can’t really tell you, since part of the game is “minimal information.” It’ll be up to the player to figure out what the puzzle is, as well as how to interpret the minimal information about their environment. However, it’s based on a puzzle we should all be familiar with, which is fairly minimalistic in its design already. It won’t be a super exciting entry, but it should be worth my time to figure out how to program all of this.

Treasure Defender Post Mortem

Posted by
Sunday, December 23rd, 2012 1:05 pm

Because apparently my game died? I don’t know. Anyways, here’s a synopsis of my game, and how I made it. If you haven’t already, you can go get a Windows (sorry Mac users!) download here.¬†While not needed, it might help to play the game before reading.

Here's a picture so that more people read my post!

A screenshot of the current version of the game.


And That’s a Wrap!

Posted by
Sunday, December 16th, 2012 3:52 pm

Treasure Defender is now done!

A beaut’, isn’t she? I’ve got a whopping 8 levels in the main campaign, and the option for myself (or others!) to make even more! While this game certainly isn’t my most fun, I would say I’m proud for getting the thing to even run. I even got some rudimentary (SFXR) sounds in, and music for the main menu. Try it out here!


Posted by
Sunday, December 16th, 2012 10:51 am

Because who doesn’t love references to classic German literature?

Anyways, I’m making some good progress. The game is fully playable in its current state, which is pretty neat. Whats even neater is I added a ‘campaign’ feature to the game. A campaign file is simply a series of levels, which the game then plays in order. This not only makes it so I can change/patch the order of levels without messing with the game itself, but also allows me to add expansion packs with ease. Next, I’m going to add some menus in and tie this all up into a final product. Only when that’s finished will I start work on a level editor or sound.

Day 1 Progress Report

Posted by
Saturday, December 15th, 2012 8:18 pm

For day 1, I’ve got a half-playable game:

By half-playable, I mean that the gameplay is pretty much done. However, spawning heroes has to be done by console, and levels do not cycle automatically. That’s for tomorrow. For now, I sleep.

Tomorrow’s agenda, in order of importance:

  • Get starting/stopping of waves to work
  • More levels
  • Menus
  • Graphics
  • Level editor (something better than notepad)
  • Sound

More progress!

Posted by
Saturday, December 15th, 2012 5:07 pm

More text parser progress!


which is pretty rad. I’m certainly learning a lot about file formats from this! I’m also learning that GameMaker doesn’t support reading tabs, only spaces. Makes writing my level files a bit annoying, but oh well. I’m currently working on displaying info about heroes entering the dungeon, such as their health, and path through the dungeon. Next up, being able to place towers, and having heroes walk through the dungeon.

Late Start

Posted by
Saturday, December 15th, 2012 3:12 pm

So, I woke up this morning like it was any other. It wasn’t until one of my friends shared a screenshot of his LD entry that I remembered there was a contest! So now I’ve got about 30 hours to cobble together a psuedo-tower-defense-esque game. I really don’t have much in the way of gameplay written yet, but instead a file parser. For example:


This took me 2 hours to get working properly ;_;

Anyways, the game will be about defending your treasure, similar to dungeon-builder games. This one, however, isn’t realtime, and instead works on a trial-and-error basis akin to The Incredible Machine. Towers are also more logical, in that they only harm certain squares on the grid, than having a set radius/power. It’s probably a bit odd to explain, but I’m sure it will be easy enough when you play it for yourself.

Day 2, Journal 3

Posted by
Sunday, April 22nd, 2012 10:52 am

More progress! You can now switch which tool you are using.
I’ve also set up a nifty solution-showing system, in case you get stuck. I also made the landscape have stripes to better show the “grid.” Also added are sounds, and music is coming soon.

Day 1, Journal 2

Posted by
Saturday, April 21st, 2012 4:29 pm

It’s playable! Kinda.
You can drop bombs onto the planet, which then destroy the terrain according to the game rules. The objective is to destroy (read: mine) all of the precious ore in the ground. There will eventually be three options (bomb, horizontal drill, shaped charge) that effect the terrain differently, along with things that cannot be destroyed (cities).

Day 1, Journal 1

Posted by
Saturday, April 21st, 2012 7:55 am

I spent the better part of this morning learning about surfaces, primitives, and blendmodes. This rock-textured donut is the result:
rocky donut
It doesn’t look like much, but it will provide the framework on which the rest of the game runs. Next, I’ll work on translating levels into donuts.

[cache: storing page]