Wednesday, April 25, 2012

Ludum Dare 23 - Post Mortem

I managed to get an entry completed for the 48 hour competition.



You can read the post mortem here: 
http://www.ludumdare.com/compo/2012/04/25/a-theft-of-mass-post-mortem/

Game entry is here:
http://www.ludumdare.com/compo/ludum-dare-23/?action=preview&uid=10893

I'd love to participate again, but it can certainly take a lot out of you.


Tuesday, April 17, 2012

Ludum Dare 23 - Warmup and Flash Games

I haven't done anything with this blog in ages and a lot of my development has been stagnating. Most of the work I've done has been on an EverQuest emulator server, which is fun, but not especially rewarding. (http://midian.homelinux.net)

Now, in an attempt to rekindle some of that old hobby coding fire, I've signed up for Ludum Dare 23 and completed the warmup weekend.
The first idea I chose was too big to complete in that time frame, so after a day and a half I put it on the back burner and then started from scratch on Sunday. I guess I can only say mostly from scratch since I'm using my own rather simple Flash/Flex framework. It just sets up some boilerplate for a preloader, stage, events, resource manager, and a very light menu UI.
I was at it for about 10 hours with breaks for lunch and dinner and finally released a game based on my new simplified idea, Canyon Runner.
This was one of the first games I played on the VIC20 when I was a kid, so it has a certain nostalgic value, and after all these years I think the game mechanic can still be fun.
You can see the original gameplay here:


http://www.youtube.com/watch?v=bFfyfYBkgMk

My take on it has slightly better graphics but I still take a tiled approach as it actually makes the game easier to play than if I had used smooth scrolling and pixel collision.



I was also compelled to add some simple powerups to spice things up a little. One speed boost is ideal for me, but two speed upgrades will just get you plastered all over the canyon wall. Speed upgrades stop doing anything meaningful after 2 above or below the starting speed. The coins just give you 1000 points.

The hardest part of this was the map generator, but that was because I approached it poorly. My first version tried to make random gaps in the new row, which means you need to try to adjust it to line up in at least one column with the row before. This proved to be a huge headache, so I ended up centering on the canyon opening and mutating it in one block at a time in width and direction.
This proved very effective and more closely matches the original.

Once I had states cycling properly and a score, I just built and uploaded it. My first project, while promising, wasn't going to get done in time, but I still spent a day and a half deep in code and content creation before starting over. By the time I Sunday evening came around I was exhausted, so the game wasn't as polished at I might have liked.
http://www.ludumdare.com/compo/ludum-dare-23-warmup/?action=preview&uid=10893


After a good night's sleep I was ready to throw some quick polish on it and then, equipped with a complete and playable Flash game, I set out to work on something that I had thought about on many occasions, but never messed around with because it required a complete and playable Flash game.

Kongregate is pretty well-established Flash game site. They have good developer incentives and a nice API for offloading stats, doing account-based saves, and so forth. I found the QuickKong library which makes connecting to the KongAPI easier than it already was and quickly integrated some stats into Canyon Run.

http://www.kongregate.com/games/Josheb/canyon-run

There is a source link in the description, or you can click here.
I have a couple of sounds listed in the credits that came from opengameart.org so if you use the audio in the resource directory, be sure to provide attribution.

As Flash development environments go, mine is very humble. I use nano with the java highlighter rc file set to include .as files for formatting. The makefile assumes flex/bin is in the path.
You will want the Flex SDK and the Projector Content Debugger.
For fdb to work you'll want to copy your debugger to flex/bin/flashplayer.

Sunday, July 4, 2010

Blender Gun Models, etc

Last time I made a post here it was about some firearm models I was working on in Blender. It's been quite a while and these files have just been sitting around collecting dust so I've decided to release them.
The host for many of my links has gone down so I've also updated the Downloads section.

You can find the gun models and licensing information at OpenGameArt.org:
http://opengameart.org/content/various-small-arms-assault-rifles-sniper-pistol

Sunday, November 8, 2009

Blender Weapon Pack Preview

I've been working on some guns and melee weapons in Blender lately. Ultimately I'd like to see them go into an RPG of some kind, but it might be a while. The projects I've completed have usually been abandoned and then picked back up later, sometimes more than once. Burnout is pretty common when you're working on your own time, but whether these models make it into a finished game or not, I'll release them all once they're complete.



From left to right, top to bottom: L85, Dragunov, M4, AK47, M1911.


I haven't even started UV mapping, but I'm actually tempted to just bake them shaded like that.
The bolt is animated for the rifles and the carrying handle iron sights can be removed to reveal a rail. I intend to add some modular accessories like a reflex sight, ACOG, SUSAT, etc.

The 1911 has been made from scratch and now has an animated slide and separate magazine.


The melee weapons I have so far can be found at opengameart.org.


My goal is to build a fairly robust library of weapon models and so far it's moving right along. I'm not going all out in regard to detail and since the firearms aren't texture mapped, making a new rifle takes about 2 hours.

Feel free to request any particular weapons you'd like to see. I may already have it in mind to add them, but requests will at least increase their priority.

Thursday, October 15, 2009

Colt 1911 Revisited

Since there was a request for the blend file for the colt 1911 model, I figured I'd give it a little attention. I didn't put much work into it, but it's a little more clean and the non-manifold geometry is gone.
The texture is pretty rudimentary, but I didn't know anything about the source of the original image I used so I grabbed some from Wikipedia that were listed as public domain.


The original is available here.
The revised version is here.

Creative Commons License

If you don't have Blender, get it here.

Monday, August 10, 2009

sdltutorials.com 2009 Game Contest

I've been using the sdltutorials.com 2009 game contest as an excuse to dive into modern C++. Nevermind that I studied it pretty extensively about a decade ago, today it's a different animal.

Anyway, here's a preview of my entry. There's a lot to be done, but I think the hardest parts are over.




(youtube for better quality)

I'm not an artist, so you can expect a fair amount of particle effects in an attempt to cover my miserable sprites and textures.
The visuals are all lua driven and my campaign / mission system is pretty solid so adding the rest of the gameplay elements should be relatively simple. Of course, they won't be and if I finish in time it will be by the skin of my teeth.

Update:
I got bored and didn't make the deadline. It is likely that I'll come back to this and finish, but I doubt it will be any time soon since I'm not especially fond of side-scrolling shooter games. It did at least serve the purpose of getting me more acquainted with modern C++.

Wednesday, July 22, 2009

Crawl!

A friend pointed out to me that Crawl Stone Soup recently released v0.5.
If you're a nethack, angband, or general roguelike fan you're sure to enjoy it.
You can download a client or just ssh to crawl.akrasiac.org and log in as joshua.

http://crawl.akrasiac.org/

A++ would die alone and hungry in a hateful dungeon again.

Friday, June 26, 2009

Current Events

Unless you've been living under a rock, you are probably aware that Michael Jackson died. In fact, we've had a couple of celebrities pass on this week, but I just want to take a moment to honor a lesser known celebrity who also died recently.

http://www.roanoke.com/news/roanoke/wb/208832

Saturday, May 30, 2009

Make A New Game

I do a great deal of hobby coding. If I'm not doing that, I'm playing games, which doesn't leave much time for blogging. It doesn't help that I also program for a living, so by the time I get home, gaming is much more appealing than hobbying around with code. Lately I haven't been into a new game so I've been thinking more and more about making another game myself. To date, my games are very simple, use a handful of 2d sprites and were easy to make. Limiting my games to 2d has two distinct advantages.

1. I can load up gimp and paint sprites, or as was recently suggested, load up Inkscape to make prettier sprites.

2. 2d logic is generally easier. You can cull to boxes instead of frustums and hit detection is usually trivial.

I could argue that you can get more depth out of a real 3d environment, but there are still a lot of really well done 2d games that knock the socks off of many recent 3d titles, not because they have more stunning visuals, but because they're just more fun. Even then, there are some 2d games with very impressive visuals.

Even though 2d logic is generally easier, 3d logic really isn't that hard once you wrap your head around the basics. Things like octrees, AABB trees and ray-triangle collision detection are actually not that hard to implement. Furthermore, there exists a wealth of open source 3d engines that solve a lot of these problems for you. (Ogre3d, Crystal Space, Irrlicht)

When I ask myself what keeps me from taking on a 3d game in any serious context, it's content creation. If my game needs people walking around, I'm going to have to model, UV-map, texture, rig, and animate human models. That's a lot of work, especially for one person or even a small team. Next our people are going to need to walk around on something, maybe enter buildings, swim and so forth. At least here we only need geometry and textures, but we need a lot of it. As I build my design document and flesh out gameplay ideas or story, I'm considering what kind of engine technology it's going to require and what kind of content I'll need.
How many game ideas involve a character walking around and interacting with other characters and the environment? Hint: lots.

Your story stops mattering at that point because it's not the bottleneck, it's not the hard part. Take a look at Fallout 3. I love the Fallout games. I even got some brief enjoyment out of that flop of a tactics game Interplay made. (This game marks the point where they officially jumped the shark.) Fallout 3 is immersive and visually impressive, a successful, although non-traditional resurrection of the franchise. Maybe everything is roughly the same color, but it still looks pretty good. The world is enormous and took a lot of time and work to make, but even in this professionally built game, they're repeating scenery and geometry.

All of this prattling on has been to lead up to the focus of some of my recent hobby coding. I've been tinkering with procedural terrain and procedural texturing of that terrain.
Thus far I've made a script that processes an 8-bit height map image into terrain geometry of the specified scale. You can even assign an arbitrary number of height levels with unique textures that are procedurally blended and 'baked'. In another mode it can use vertex colors to produce something more cartoony. Next I might look into using some Perlin noise to speckle the terrain with trees and rocks or other detail meshes.
My next post will be a more in-depth look at procedural terrain and my hope is that over the next few months we can explore some gameplay ideas and their accompanying implementations and requirements.

Monday, March 16, 2009

Classic Games

Most people I know, myself included, have games from their past that they remember fondly. Unfortunately, most attempts to revisit this ancient fun are met with disappointing results as we realize that not everything that was fun back then is fun to us now.
The good side of this is that you sometimes come across a game from your past that is simply timeless.
I keep thinking I'll put up some new blender material or maybe some programming goodies, but I've been lacking the time and the clarity to get any of it done. (Maybe these old games have something to do with that?) Instead I'm posting some older games that remain awesome.

The Ur-Quan Masters
http://sc2.sourceforge.net/

Dune 2
http://www.abandonia.com/en/games/36

Nethack
http://www.nethack.org/

Mechwarrior 4 : Mercenaries -- Online play doesn't work through MS anymore, but there are community mods.
http://www.microsoft.com/games/mw4mercs/
http://www.mektek.net/ -- Community site

This list could get long so I'll stop there for now.

Sunday, February 15, 2009

Gun Sound Pack

Militia Defense has been updated with new sounds and some cleaner enemy tracking.
Some friends and I spent an afternoon target shooting and recorded some of the action, so I stripped out the non-essentials and packed it into uncompressed wav's for the masses.
These are released under the Creative Commons Attribution 3.0 Unported License.

Enjoy!

Creative Commons License

Monday, February 9, 2009

Game Programming With Lua

Love sold me on lua as a scripting language and provided a great excuse to learn it. As I get time I intend to keep working on Militia Defense, but I'm at a point now where I need to make some significant changes and there just hasn't been time.

Presently, what time I have has been occupied with some reading and a little work on lua-driven 3D library. I'm using SDL with Bob Pendleton's fastevents and net2. My older openGL framework used GLFW. GLFW is actually really nice, but for this project I wanted to use fastevents and net2 for network access, so it's SDL. Honestly it's just a little trickier to load textures, but beyond that they're pretty equivalent. GLFW has a higher precision timer on the platforms I use, but the perceptual difference between 3k fps and 1k fps is probably negligible, and neither one of the libraries require you to use their timer.
Right now I initialize everything and load up a lua script file that sets the video mode and has functions for the main loop.
I've started using lua's userdata element to create procedural shapes and draw them in 3D. I need to work out matrix transformations and camera functions, but none of this should be particularly daunting. At this point I figure it would be best to implement the scene graph in lua, as well as the camera, but my main concern is texturing and defining static and dynamic mesh formats.
I'm using display lists for static geometry for the somewhat marginal performance increase over VBO's, but I'll be using vertex buffer objects for anything animated. Blender will be the content generator of choice, of course.

Once I start getting tired of this I'll probably go back and re-work Militia Defense. Changing projects form time to time helps me avoid burnout and I can usually come back to old work with new perspective, so rest assured there will be updates to this.

Saturday, January 17, 2009

Trying to Blog Again

It's been around a year since I last posted anything and I thought I might try to actually do something here for a change.

I've been hobbying around with a lot of 3d programming but lately I've started messing around with Love, which is a nice cross-platform 3d accelerated 2d engine that uses lua.
Content creation for 3d games can be a long, difficult process, especially for the lone game programmer. To that end, I've made a few simple 2d games if for no other reason than to say that I've made a couple of complete games.
First you'll need Love, which is a fairly small download.
http://www.love2d.org

With that installed, you can get the game files here:

My simple lander game
http://tyranny.ckt.net/land.love
http://architect.ckt.net/eq/land.love

Militia Defense game
http://tyranny.ckt.net/md.love
http://architect.ckt.net/eq/md.love

In Windows you should automatically have love associated with .love files if you ran the installer. In Linux, just run 'love land.love' or 'love md.love'. Alternatively, your preferred desktop probably has a mechanism for associating love files the the love binary. In gnome it's as easy as going to the 'Open With' tab on the file properties, adding the love command, then selecting it as default.

The .love files are actually just zips, so source code and resources can be found by unzipping them. Both games are released under the MIT license so feel free to play around in the source, but be warned, it might be nasty.
The lua backend makes it so easy to make games that I tend to just plow through them without much thought. The good side of this is, you can use your first game prototype as a design document and you really haven't lost any time.

Monday, February 11, 2008

Blender Modeling: Colt 1911

I spent a great deal of time in Blender today. Usually when I try to model something the hardest part is figuring out precisely what to model. I tend to focus on inorganic things, objects with hard edges and straight lines.
Why a Colt 1911 you ask? It's inorganic and it's a gun.

I learned a while back from some obscure tutorial that background images in Blender are a huge help when getting started. If you have a digital camera you can get your background images just by taking pictures of the front, side, and top of the object you wish to model. Since I don't actually own one of these pistols, I just did an image search and found a nice side shot.

My first step was to make a shape outline. Blender starts up with a cube at origin (0,0,0), which you can either delete or manipulate to your liking. Unless there's a trick for just adding a bare vertex that I don't know about, which is entirely possible, it is necessary to manipulate that cube in some way in order to get started. If you want, you can just select 7 of the 8 vertexes and delete them, then move the one that's left to a desired starting position and use the Extrude command (usually E).
The outline is easy but then you have to add appropriate depth. Obviously this is going to be easier on some objects than others, but if I've learned anything form fooling around with Blender it is this: Modeling requires as much patience as it does skill, especially in my case, since I really have no skill. A professional modeler might disagree, but for someone with no artistic talent and a rudimentary understanding of Blender, it's true.
I'm compelled to remark on Blender as a modeling tool. If you've perused my list of Open Source Software links to the right, you've seen it listed. The more I use Blender the more impressed I am with it. It seems like every time I use it I learn something new about it that makes using it significantly easier. Today I learned a great deal about seams and UV mapping techniques.

Anyway, back to modeling. Based on many of the tutorials I've read, symmetrical objects are created one half at a time and then mirrored. You can actually enable a persistent x/y/z mirror which should mirror your actions along a specified axis. This is probably what I should have done, however, I wasn't thinking about it and since it's far from habit, I simply forgot. I determined an acceptable width for the slide and extruded down from that to build the frame. From there I tapered down into the trigger well and the bottom of the barrel. Lastly, I outlined the grip area and gave it a bevel. I work with it in slices. Once I've made one taper, every vertex in that progression should be at a consistent and recurring 'slice' level.

I should also mention that throughout this process, the object did not have any faces defined. If I accidentally made any, usually by extruding an edge, I removed it just so it wouldn't confuse me later. The act of cleaning up after myself in this manner served to educate me on intelligently removing items from a model in Blender. When you press the delete key to delete something, you get a context menu. For the most part it is self-explanatory but I discovered an important distinction today. If you have enough vertexes selected to define at least one face and you press the delete key, you have an option to delete 'Faces', and lower on the list 'Only Faces'. If you choose 'Faces', you'll also remove the vertexes associated with those faces, but if you choose 'Only Faces', it does what you'd expect the first option to do and just removes the face definitions without removing the vertexes involved.

Once I got all my faces assigned I selected the whole thing and duplicated and mirrored it. This part is where I got into some work that I probably could have avoided. I moved the mirrored half very close to the original, but snapping vertexes has to be done one by one.
Once this was done I removed any duplicate vertexes and fixed any broken faces. Lastly, it's important to make sure your normals are pointing in the correct direction.

After messing with smart unwraps and seamed unwraps in the UV editor, I finally started experimenting and found the option to get UV's from the current projection. Cycling through the different views and manually selecting faces for the UV map strikes me as the fastest way to get it done at this point. That may change as my experience increases.
It was at this time that I ran into my most significant hurdle. I can't draw, paint, or otherwise compose images that are pleasing to the eye.
I was in a hurry at this point so I used a real photo to build the texture beforehand and then manipulated my UV pattern to fit on top of it. This actually proved to be very effective, however, in the future I'll take reference photos as suggested above and recycle those as textures.
This is getting wordy so here's a shot of the finished product.



I'm pretty pleased with it overall, especially when I look at it textured like that. Unfortunately, the naked truth reveals that my geometry is ugly and far from optimized. Later I'll have to clean up redundant faces, but the good news is that this won't affect my UV's as a whole.

Saturday, January 26, 2008

SKS Update

The new stock and magazines are perfect. Everything fit and fired just as it should have and it was very comfortable to shoot. I couldn't be happier with the performance, and perhaps the sweetest aspect of it all is that the whole thing only cost around $300.

Thursday, January 17, 2008

New hard drive

Newegg had some cheap 250gb sata hard disks, so I picked one up to replace my 80gb pata disk. The old 80gb drive housed my Windows XP partition, mainly because my install disk couldn't recognize my other sata disk and I didn't have a driver floppy to feed it.
I'm not the sort that re-installs Windows every six months, or whatever other relatively frequent interval those so-called technical sorts nuke, so I proceeded to find out how I could clone it.

I'm going to chase this rabbit for just a moment.
Why do so many 'high-proficiency' PC users re-install Windows at frequent intervals? When I installed Windows XP, I'd been running Windows98 for more than four years. This install of XP is almost past its third birthday and it still runs like a champ. I'll grant that I've had to manually defragment once (this isn't as complex as it might sound, just moving files from disk to disk really), but minute for minute, it's easier and faster than re-installing. The most common excuse I hear for re-installing is, "Oh I just do so much, the thing gets bogged down." I try nearly every new game or open source project I find, not to mention I have development software and libraries for a dozen languages and I never seem to have this necessity. I don't fancy that I do anything special to keep things running either, if anything my PC and both its resident OS' could file domestic battery claims based on my rigorous computing habits, but alas, I digress.

A quick search revealed a nice package of Linux tools for dealing with NTFS and the specific process I was looking for was reasonably well documented at
http://alma.ch/blogs/bahut/2005/04/cloning-xp-with-linux-and-ntfsclone.html

I'm pleased to see how far NTFS support has come in Linux. Don't forget that this crap has to be reverse engineered since some people apparently never learned how to play nice as children.
For those using Ubuntu or it's relatives, you can likely fetch these tools with 'apt-get install ntfsprogs'.

Oh yeah, First Post!