Category Archives: Dev Blog

Epic comeback win in the latest Valley of Bones build!

Pixel and I face off in the latest build of Valley of Bones (with control points!), and despite being pinned down at my base for most of the match, I pull off a stunning upset!

Watch the clip on twitch.tv.

As you can see, the development of Valley of Bones is coming along quite nicely, I’ve added a new “Sniper” unit and I’m currently experimenting with control points (the towers in the video above). So far, I think the game is quite fun and interesting, but I suppose I might be biased.

Anyway, the control points build is in the nightlies (still experimental) here.

And you can also check out the “weekly” stable release here, though it doesn’t include the control points.

Until next time!

April 1GAM: Valley of Bones

Remember that one time I said I was going to stop releasing a new game every month and focus on iterating on one game? I lied. Or maybe was just “mistaken.” Technically, I did spend some time iterating on Legend of Rogue the first couple weeks of April. Then, with the Ludum Dare coming up I was inspired to take some old code I had laying around for a space RTS and do a massive overhaul to turn it into a small multiplayer turn based strategy game. I’m pretty happy with the result, which I call “Valley of Bones:”

Valley of Bones

Valley of Bones

Again, I’m planning to further develop this in May, but who knows when and how inspiration will strike, so no promises! Anyway, the game is quite simple: you start with a home base that looks very much like a castle. The base provides an income of $100 per turn and allows 15 supply (you can see your current money/supply in the top right corner). On your turn, you may build, move, and attack with units in any order you’d like, though you only have 1 minute to do so.

If you select a unit, an information panel will pop up at the bottom of the screen to show the unit stats including:

  • hospital-cross health
  • crossed-swords attack damage
  • archery-target range
  • checked-shield armor
  • radial-balance moves per turn
  • rune-sword attacks remaining this turn
  • walking-boot moves remaining this turn

Those last two symbols also appear on the unit itself when there are attacks or moves remaining that turn – to make it easier to tell which units you can still work with.

If you press ‘b’ or click on gear-hammer in the lower left corner, this will bring up the build menu, which only displays building options that you can currently use. Mouse over these options to see the money and supply costs.

The game ends when one player destroys the other player’s home base. To play multiplayer, one player or the other will also need to run the server that is packaged with the game.

I’ll try to write up another post this week detailing my future plans for the game.

Enjoy!

Download Valley of Bones

1GAM January: UberBlocks 2

All right, so this is a few days late. But in my defense, I didn’t decide to participate in the 1GAM challenge until January 30! So without further ado, I give you my January submission: UberBlocks 2.

UberBlocks 2, the successor to UberBlocks (written back in the day…2006ish? Maybe I’ll post it someday as well for nostalgia) is a falling blocks game of epic proportions! It’s written in Java using the LibGDX library. And a special thanks goes out to Kenney.nl who released the pixelated font that I used. Also I should mention that I actually had this mostly finished in Python awhile back, but ported it to Java and changed the way the blocks fall (smoothly rather than an entire tile all at once) which gave me some fun times adjusting the collision detection to work exactly like I wanted it to. Download the game or grab the source. Controls are standard: left/right/down move and up rotates counter-clockwise.

UBERBLOCKS 2

UBERBLOCKS 2

Charity Game Jam Entry: Unmei & The Princess

Well, it took me a little more time than was technically allotted for the jam, but I managed to polish off a submission for the Charity Game Jam. The theme was 8-bit NES-style retro games, so without further ado, I give you Unmei & The Princess:

Title Screen

I’ll do a more in-depth post-mortem type post later. For now, let me just say that the game jam was lots of fun, and it looks like it was a smashing success to raise money for the Make A Wish foundation. Enjoy the game!

Charity Game Jam

Well, I’m going to participate in my first game jam…and for charity!

The guys over at Ludum Dare have organized a mini-competition to create games as a benefit for the Make-A-Wish foundation and Kiva (micro loans for small businesses in impoverished areas). If you’re interested in participating, donating, or playing the submitted games, check out: http://charitygamejam.com/

Oh, did I mention the theme is 8-bit retro (NES-style) games? Pretty cool.

I’ll probably tweet with updates on my progress.

NetPong Screens and Update

Well, I basically got a skeleton of NetPong working, then I decided that, in the interest of developing a better understanding, I should rework it to use more features of LibGdx. Anyway, I promised screenshots, so here are some of the newer, prettier (though not yet complete) version:

Main Menu

NetPong Main Menu

Multiplayer Setup

Multiplayer Setup

Game view

Game View

On Threads

So for November/December I’m going to work on a number of side-projects, I believe, in the ‘style’ of http://experimentalgameplay.com/ … ie: spending only a short amount of time (hopefully a week or less) on  these projects.

Anyway, I’m also interested in working with multiplayer/online programming, so I thought I’d remake an old classic…Pong. Or, in this case, NetPong. Anyway, the idea is quite simple: a Pong game where you play against an opponent over the network. I’m using LibGdx for the engine and KryoNet for the networking (which only supports client-server, if you’re curious).

So, as you might imagine, in order to keep up with everything in real time, the server runs the network code and the game logic in separate threads. So, after coding the basic client and server apps and making everything update over the network…I got a super-laggy looking game. Boo! Well, having never worked in a multi-threaded environment before, it took me awhile to realize the problem: since the game update is running in a separate thread from the main application, it was calling update multiple times in the same frame. Since I’m using the LibGdx builtin Gdx.graphics.getDeltaTime() to measure time, this caused huge problems! The server was running way faster than the client!

Of course, once I realized this, the fix was easy: only update when there’s been a new frame drawn. So now the ball moves smoothly, at least. The paddles still need some work, but that’s all right. Screenshots will be forthcoming.

Space Domination 0.3.1 Released!

Check out the newest release of Space Domination here!

Sorry I haven’t posted anything in awhile, I had to get motivated to move the dev blog over here first, and that takes time away from programming! Anyway, here are the major new things in the release:

Redesigned HUD

Well, if you played any previous version of Space Domination, you know the HUD was…well…clunky to put it mildly. It was basically just a bunch of text in the bottom right corner of the screen. Anyway, I was inspired to make it better! Specifically, to create some vector drawings in a cartoonish style to display the weapon and ship states. You can see the result in the screenshot below:

Release 0.3.1 – Check out the new HUD!

As you can see, there are nice cartoon drawings of lasers and a missile in the bottom left, with filled/unfilled boxes to show the status of the weapon. The yellow weapon is selected (in this case missiles). The weapon pills will be red when the weapon cannot be fired, but more on that in the next section.

Weapon Overheating and Burst Firing

One of my friends, testing out the game, gave me some feedback. Turns out, in the previous release, it is nearly impossible to dodge incoming laser fire because the AI ships just turn toward you and start shooting seemingly endlessly. He suggested that maybe they could fire in bursts rather than constantly.

That reminded me of the weapon overheating/cooldown systems present in some FPS games, such as Battlefield. So, I figured that would be a nice mechanic to implement and kill two birds with one stone: limit the number of times the AI can fire and adjust the difficulty of the game back up.

See, if I only implement that for the AI and the player can still shoot constantly, that’s a huge advantage for the player. But, this way, both the AI and player are bound by similar conditions. Basically if you fire your lasers enough times to end up below a certain threshold of ammo, it ‘overheats’ for a certain amount of time, and you cannot fire. For now, I have it set such that the player can normally fire 5 shots (x2, since the ships fire two lasers each shot) and the AI can fire 3.

Coming Soon to Release 0.4:

My wish list, which I am working toward, is to have a ship upgrade system and a campaign mode in place for the next release. I have some basic functionality for these things now (you can check out the upgrade system in the profile menu, but I disabled the Campaign menu option for now), but I’m not happy with them, so I want to rework the way these operate and how the player interacts with them before I include them in a release.

That said, I’ll try to post updates here more often, though I think I am going to start dividing my time because I’d like to learn some network programming and work with LibGDX (Java library for multi-platform game development), so I’ll post details on that stuff as well!

Space Domination (First!)

All right, so I’m basically just testing out categories and things on the site, but I’d like to plug a pet project of mine, Space Domination. It’s an in-progress top-down 2d space shooter. Don’t worry, a newer version is in the works (hopefully I’ll post a “3.1″ version to show off some new features in the next few days) and a major revision (cross your fingers) by the end of the month.

With that, hope you all are enjoying the new site layout.

Thanks,

AHS Unmei

EDIT: Now that I’ve imported the devblog, this isn’t the ‘first’ post anymore.

Release 0.3 and Recursive Dimensional Clustering

Sorry about the delay between posts, guys, but I did manage to get out a release last weekend. Here are the highlights:

Redesigned menu system
Although many of the menus should look familiar if you played 0.2, I completely reworked the underpinnings of the GUI as I had mentioned in the last dev update. I’ve finished coding the basic implementations for these, though I did leave handles for some more advanced features (read: drag and drop) which will make implementing drag-n-drop ship upgrades and a mission editor easier.

Profiles
You can now visit the profiles menu and change your callsign and ship and see your stats such as accuracy, kill-death ratio, etc. This will become more important as I add features like ship upgrades and such.

Player Flyable Ships
There are 3 player-flyable ships included in 0.3. You can access these through the Profiles menus. Enjoy :)

Stat Tracking
The game now keeps track of your bullets fired and hit (and thus accuracy), kills, deaths, damage taken, and damage dealt. During the mission, you can keep track of your mission totals in the bottom right corner, and your overall totals are in your profile.

So that’s 0.3 in a nutshell. You’ll notice that missing from this list is any mention of new missions. Well, don’t worry, one of my friends has agreed to help with creating new missions that I will add as sub-releases of 0.3 asap, so expect a mission pack to come out as 0.3.1 soonish.

I also made two major changes to the game logic: recursive dimensional clustering and time-dependent physics. Both of these changes were basically optimizations to help the game run more smoothly and consistently among machines of differing power (ie, a netbook on an Atom processor vs a gaming pc with the latest quad-core processor).

Recursive Dimensional Clustering
Here is a basic description and comparison of RDC vs brute-force collision detection. The basic idea is that a brute-force approach to collision detection has O(n) ~= (n**2 – n) / 2. As you might imagine, this causes some problems when lots of bullets are flying around especially on lower end machines. So, I looked for a solution to get this down to a more manageable range…I think RDC is O(n) ~= n*log2(n).

Here’s the basic premise:
1. Divide the sprites into ‘clusters’ along a single axis such that each cluster contains overlapping sprites. So if A overlaps B but not C, and B overlaps A and C, then A, B, and C will cluster together, but sprites D and E, which overlap each other but not A, B, or C, will be in their own group.
2. For each of these groups, run the same clustering analysis on the other axis.
3. Continue recursively clustering, alternating between axes, until the “minimum group size” is reached for each group or the group can no longer be subdivided.
4. Now brute force collision detection can be performed within each group.

I think my implementation could be better in that I think my sorting algorithm might not be fully optimal, but I’ll continue working on it.

Time-dependent Physics
So before 0.3, the game ran at about 30fps. This is fine normally, but once bullets start flying, each frame might start taking longer than 33ms temporarily. For a single player game, it is probably OK to just go ahead and continue using fixed-step physics because it’s not like you need the game to run exactly the same on different machines. However, I would eventually like to have a networked co-op mode.

So I adjusted the physics stuff such that the game draws at one framerate (now 60fps) and updates physics assuming a separate framerate (20fps) is equivalent to one “step”. Now, that said, the game then measures the time in ms between physics updates and passes the fraction of a “step” (ie the number of ms since last update / number of ms per step) on to the physics engine, which then multiplies all rates by that fraction (usually 0.3). The nice thing about this is that when the game slows down due to excess bullets or whatever, the fraction of a step each frame will compensate for this and allow the game to still play at the same speed in real time, though a bit choppier.

Cool right?

I’ll save what I have planned for 0.4 for the next post, since I’ll need something to talk about next week.

Thanks,
Jami