Posts Tagged ‘csanyk’

Pre-deadline bugfixes are up

Posted by (twitter: @csanyk)
Monday, August 29th, 2016 7:42 pm

Just added a few last minute features and fixed too many little bugs to mention ahead of the Jam submission deadline.  If you played it before, you may want to try it again.  Mostly (I hope) the bugs weren’t noticeable.  The HTML5 build now renders at correct size though!

Ancient Technologies for LD36 by csanyk

Play Ancient Technologies

LD36 – Ancient Technologies post mortem

Posted by (twitter: @csanyk)
Sunday, August 28th, 2016 10:05 pm

Ancient Technologies for LD36 by csanyk

I just finished and submitted my game a few minutes ago.

In all this weekend I worked a total of 25 hours on my project.

I came up with the idea for the game in about 10 minutes.

Friday night was a struggle as I tried to produce art assets.  I didn’t like anything I was producing myself, so I resorted to grabbing some useful pixel art from the internet. I hope the original artists don’t mind.  For the record, the background graphic of the living room is mine (paint.NET), the atari 2600 console and joystick were found through google image search, and the TV and game cartridge were done by my girlfriend.  I did some minor modification to all of the images that I brought into the project to make them work as I needed them to.

I went to sleep around 12:30am Saturday morning.

Saturday I didn’t get much done during the day due to other plans that kept me busy until around 8pm.  I did manage to put in about 2 hours in the early afternoon.  Then I got into the zone that evening and hacked for 11.5 hours until the 7:30am Sunday.  I just kept making progress and thinking of more things that I needed to do.  Progress went very smoothly and I didn’t get stuck.

Woke up around 12:30pm Sunday, worked until 4pm, broke for dinner, then came back and finished it from 6pm-10pm.  This was mostly debugging and refinement and putting in the finishing touches.

I threw a few things out along the way.

  1. At first I wanted to make the setup minigame more of a challenge, and more detailed, where you would have to drag the objects where they needed to plug in, and connect them up.  Out of necessity, I simplified things quite a bit, so that simply clicking on a thing connects/disconnects it.  I omitted the RF switch that goes to the back of the TV, and I had also planned to do a volume knob on the TV, and have a channel knob with fake streaming channels for NBC, ABC, CBS, or at least station ID logos, and then you’d need to have the Atari playing on Channel 4 in order to make it work.
  2. I also didn’t get around to implementing the functionality behind the TV Type switch, or the difficulty switches or the Game Select switch on the Atari console.  The switches themselves are flippable; they just don’t do anything yet.  These were just more time than I had for the weekend.  (I know I could work another day until the Jam deadline, but Monday I have work and probably won’t get much done if anything.)
  3. My original choice for the game-within-a-game was Space Invaders. But after a while I realized that it would be simpler to implement Asteroids, so I did that instead.  It plays pretty well, and feels reasonably like the real deal, dropped features aside.  I wanted to make it feel as authentic as possible, so I used Stella and Audacity to rip audio and screen cap the sprites.  I had to rework all the sprites in GameMaker and Paint.NET, but getting the general shapes right was important and screen capping them was the way to go for that.  I also grabbed a sample image of the Atari 2600 NTSC color palette, and made sure that all the colors used in the game matched what the Atari was actually capable of.
  4. Programming the game mechanics so that Asteroids really feels like Asteroids was important to me.  I think I did reasonably well here, and I’m proud of the results.  It’s not emulation-perfect, but you’d have to put the two side by side to see the differences.  Making sure that the game system behaved correctly if you did things like unplug it or remove the cartridge while the game is playing was important to me, and made it all a bit more complicated than I anticipated, but I think I managed to get it right, although it’s possible I missed a bug here or there.  I kept finding bugs with the setup logic but in the end I hopefully got them all.  If you turn the TV off and back on, the game continues playing, but if you hit the reset switch, pull the cartridge, or hit the power switch on the console or pull the plug from the wall, it does what you’d think it would do (ie, kills the game if it’s running and dumps static to the tv, etc.).  It even stops allowing joystick input if you unplug the on-scree joystick.
  5. Inside the game, there’s a few features I didn’t implement:  hyperspace/shields and the UFOs being the two most prominent.  I may get to doing those later.

All told I might be the happiest with this project of any of my #LDJam submissions to date.  I found it very enjoyable to work on the project.


  1. The bugs you think are too dumb for you to make are the hardest ones to find.
  2. One of the biggest challenges when programming something that you know how to do is simply keeping track of the various tasks that you have on your to do list. It’s a huge mental challenge to hold that list in your head and cross things off as you complete them.There’s a lot of tools and techniques for managing this but it’s still a challenge to manage it. The biggest help is writing stuff down. Trello rules for this, but mostly this time it was notepad and memory for me.Plus on top of that you have to mentally walk through your code, following the logic you’ve programmed, and doing the math in your head to make sure you agree with your program’s output and behavior. A good unit test suite can help with this a lot, as can clean design. GameMaker lacks any kind of unit testing, but I’ve adapted to do without for the most part, but it would still be a huge help to have proper testing. To work around I end up writing a little, and run-testing a lot. Logging and screen logging help, but this time I didn’t really need to do either.One of the most pleasant things about an 8-bit program that fills 4k of code is it’s humanly possible to understand it in its entirety, and to run it in your head. I have really enjoyed simulating that experience with my project this weekend.
  3. The thing about programming is, when you get on a roll, you don’t want to stop for anything. And then you die because you neglected to maintain your metabolic processes. If there’s one thing that videogames have taught me, it’s avoid dying.


Play Ancient Technologies

Shape Struggle post-compo: performance optimized

Posted by (twitter: @csanyk)
Tuesday, April 26th, 2016 7:50 pm


I’ve gone over the code for Shape Struggle, and optimized it for performance  On my machine, I can’t get it to drop frames in the latest post-compo build,  The thing is, my laptop is pretty high-end (2.8GHz Xeon E3-1505M, 64GB RAM), so I’m not sure how well it runs on older machines… I need testers!

>>> Play and Rate Shape Struggle <<<

I figure my optimization tricks might help other developers, so in brief, here’s how I did it:

  1. Controller object:  I knew even before the compo ended that I needed to set up a controller object to optimize the performance of the up to 500 instances of oEnemy that I’d have active in the game.  But the code in the controller object from the 1.0 build was far from optimized.  I refactored and streamlined the code, eliminating redundant conditional checks, and pulling code out of loops to make them as tight as possible.

    I also pulled some Step event code out of the two most complex objects, oSquare an oPentagon, and put it into the controller object.  Doing so enabled me to write some of the code in the controller so that it runs once for all instances of oSquare and oPentagon, rather than once per instance.   This makes a huge difference in the amount of calculations necessary when there are hundreds of instances active.  No matter how many there are, there’s only one calculation performed.

  2. Simplified bullet object.  At maximum firepower, the player fires 5 bullets per shot, one shot every three steps.  At 60fps, that’s 100 bullets per second.  That’s 100 creation events per second.  I thought I should limit the number of bullets, and also I wanted to limit the range of the player’s weapon, so I put a timer in the bullet object that destroyed the bullet instance after 1 second.

    Potentially, I might have optimized this by implementing object pooling, so that rather than creating and destroying bullets, I would re-use the instances so I wouldn’t need to keep creating and destroying them.  But first, I tried removing the timer, and found that the game plays and feels exactly the same, so that timer code doesn’t matter.  Normally setting a variable and then decrementing it doesn’t take a lot of CPU.  But with up to 100 fewer creation events every second, and 100 fewer timers to decrement every step, it adds up.

    Object pooling might yield still more performance optimization, but simplifying the objects as much as possible first before making such efforts is smart.

  3. I also removed the collision check from the bullet object that checks for collisions with the wall, and put it in the wall. There’s only 8 wall instances, so 8 collision checks vs. up to 100 each step means a substantial savings in calculations.

Shape Struggle: post-compo release build

Posted by (twitter: @csanyk)
Monday, April 25th, 2016 10:42 pm

I’ve released a post-compo version of Shape Struggle.  It’s quite improved!

Shape Struggle by csanyk


  • Player speed is slightly slower to give you better control.
  • Game is zoomed out 0.75% to give player more room to see.
  • Enemy and power-up spawn location/timing tuned to make game more interesting early, more balanced later.
  • Keyboard controls re-done to include mouse aiming.

post-compo download

entry page

Shape Struggle postmortem

Posted by (twitter: @csanyk)
Monday, April 18th, 2016 8:52 am

I started out wanting to make an Asteroids-like game, where your spaceship changes its shape according to its state — elongating when accelerating, turning into a square or some other rugged shape when shields are on, etc.  I quickly built a demo Friday night, but it didn’t feel special to me, so I abandoned the effort and started fresh the next morning.

Partly, I was irritated because I was working on my brand spanking new VERY EXPENSIVE laptop, and discovered that the keyboard has a low rollover (certain key combinations block signals from other keys from being registered) which makes playing games via keyboard really sub-optimal.  Tired, I went to bed wondering what to do about that, and figured the best thing would be to try a game that was designed for play with a gamepad.

I woke up Saturday morning thinking about Robotron 2084, one of my all time favorite games.  I thought about making a twin-stick shooter.  I decided to try it, and incorporate the theme by making the different enemy objects be different geometric shapes, and give each shape a distinctive behavior, and have a hierarchy of shapes, with the higher level shapes shifting into lower level shapes when shot.

For point values, I started out simply by making the 0-shape (Lines) worth 10 pts., then multiplied each previous value by the number of sides of the next shape.  So, Trigons are worth 30 pts., Squares are worth 120 pts., pentagons are worth 600 pts., and hexagons are worth 3600 pts.  I liked the mathematical pattern the points progression created, it’s similar in concept to the Fibonacci sequence, in that it bases it’s value on the previous values in the series.  I have no idea if the point progression matches the relative difficulty of the shapes — probably not.

What I ended up with was more a Geometry Wars clone than I had originally wanted, but I think it plays pretty well with a XBox 360 gamepad.  There’s a few things that I’d like to do with it if i do a post-compo release:  some sparkly eye candy when enemies spawn, animated transitions when a “higher” shape turns into a “lower” shape, better spawning placement, make the early part of the challenge curve a little less gentle, a few additional sound effects.

I’d also like to come up with something more original/innovative, but I’m pretty happy with how the implementation of this went and how it came together.


Play Shape Struggle!

Alamagordo: Post-mortem

Posted by (twitter: @csanyk)
Monday, April 28th, 2014 6:04 pm

I almost didn’t submit a game this time around. For some reason, I couldn’t get my creativity going. I thought that Beneath the Surface was such an excellent theme, too, with great potential. When they announced it, I started trying to think of a game that would happen underground, or under water. But all I could think of was the setting, not what you’d do there. My brain was being an enemy to me.

So I stayed up until about 6 AM Saturday morning, and still hadn’t thought of any good ideas. My best idea of the night came to me when the Neil Young song, “The Needle and the Damage Done” popped into my head, and I briefly considered making a game about heroin use and damaging the skin beneath the surface. If I wanted to do that right, I needed to make a chiptune cover of the song, and I still can’t do music properly. One day…

So, I put that idea aside, and then nothing else came to me. I slept in until around 11:30, and spent most of the afternoon sitting around, waiting for inspiration to hit me, but nothing happened. I dicked around on the internet, reading stuff, and started reading all these articles about the New Mexico landfill dig, where they were trying to determine if the legends of massive amounts of unsold Atari merchandise being buried in the desert were really true. Turns out, they were true! I found the story fascinating, because why would people still care  that much that they’d dig around in a land fill trying to find that stuff. It’s not as though E.T. was a rare and valuable game. To me, the story wasn’t fascinating, it was people’s fascination with the story that was fascinating.  It seemed to be getting a lot of coverage in the media.

I still didn’t have any ideas for what would be a good game, and by around 5 or 6, I had given up and resigned myself to not producing anything this time around, and felt pretty down about my failure to come up with any good ideas. I had a relaxing Saturday evening, went to bed, had a pretty normal Sunday, and then, around 7pm it occurred to me that the land fill dig was happening beneath the surface of New Mexico.  Beneath the surface…

Beneath the surface…
Beneath the surface…
Beneath the surface…
neath the surface…
the surface…

And I got this visual in my head of the pits in the E.T. video game, and connected that to the landfill, and immediately realized that there was a potential game in there.  Digging in the Alamagordo, New Mexico landfill, in a pit from the E.T. video game, searching for the secret stash of E.T. videogames. I knew exactly what I wanted it to be, not really a challenging game, just an idle time waster that paid homage to the legend and the events of the weekend. I had less than 2 hours before Compo deadline, and knew I’d never make it, but this would need to be a Jam entry anyway, as I wanted to use graphics and audio sampled from the E.T. video game.

Unfortunately I was already on my way to spend the evening with friends, and I didn’t get home until close to 11pm.  By 11:30, I had just gotten started, and I worked through the night until 6:30am, and which I had most of the level laid out and working.  Movement and collisions were very buggy, but the game was basically playable by this point.

I took a power nap, worked Monday, and then cranked out bugfixes until I got everything working right.  All told, the game took about 10 hours to build.

I used that time rather well, struggling only a little bit with the bug fixes, and all I really needed to fix those bugs was to step away from the project and return to it fresh — once I did that, it was fairly easy to redesign the code that handled movement and fix the problems I’d been having in the wee hours of the morning earlier in the day.  Throughout the project there was very little re-work, almost nothing thrown away, and everything that I built was done in such a way that it doesn’t feel like a mess.  The project code is actually pretty decent. Almost every LD48 that I’ve done so far, I’ve struggled with some stupid error in a feature that should be very basic and easy to do, and ends up sucking a lot of my time away from the project, but this time, I worked effectively from start to end.  Only, I had just about 10 hours of work put into the project over the entire weekend.

The game itself, well there’s nothing much to it, but it does feel somewhat like one of those terrible shovelware titles that caused the Great Crash of ’83.

So, there it is, an homage to terrible games.  Since that’s what it is, it somewhat excuses it from itself being a fairly terrible game.  At least the programming is fairly decent, …beneath the surface.

Well, play it and see what you think.


Bad Puppy news: OS X build now available

Posted by (twitter: @csanyk)
Monday, December 31st, 2012 10:27 am

@xbelanch was kind enough to produce an OS X build of my LD25 game, Bad Puppy, so you can now play the game if you’re a Mac user.

Play Bad Puppy – Now on OS X!

I am not sure whether the build he produced was the compo version or the post-compo, as I am unable to play it myself due to lack of Mac. Easiest way to tell is if the people in the game are all male and have green sweaters, it is the compo build.

The OS X build is not up on the main site yet, so for now please obtain it from the Mirror link.


Bad Puppy update

Posted by (twitter: @csanyk)
Sunday, December 23rd, 2012 9:20 pm

Play Bad Puppy

  1. randomized petter skin color.
  2. fixed some subtle graphics bugs that would sometimes draw a person’s clothes backwards.

Bad Puppy: Latest post-compo update is live

Posted by (twitter: @csanyk)
Saturday, December 22nd, 2012 2:46 pm
  1. Added girl petters.

Play Bad Puppy.

Bad Puppy post-compo update

Posted by (twitter: @csanyk)
Friday, December 21st, 2012 8:47 pm
  1. New “fear” animation for person running away from Bad Puppy if you bark at them enough.
  2. Fixed bug in highscore detection so that tweet prompt only happens when you really do have the local highscore.

I’m still looking forward to seeing my first high score tweet from a player.  It will make me feel really happy when I finally see that :)

Play Bad Puppy

Bad Puppy: Design analysis

Posted by (twitter: @csanyk)
Tuesday, December 18th, 2012 5:43 pm

Bad Puppy: Post-compo enhancement

Posted by (twitter: @csanyk)
Sunday, December 16th, 2012 10:57 pm

Bad Puppy update

Posted by (twitter: @csanyk)
Saturday, December 15th, 2012 7:03 pm

I couldn’t think of another game idea and rather than quit I decided to remove the Hitler references and rename the game Bad Puppy.

I now have a Person animation in the game.  If you get too close to the person, it will pet you, causing you to lose meanness.  When your meanness drops to 0, you cease to be a bad puppy and start wagging your tail.

Not much of a game, yet, but the animation is pretty cute.

[cache: storing page]