Category: Inaria

Lying Down on the Job

It’s now been almost a week since I worked on my RPG, and if I don’t do something soon, I’m afraid I might just let the project lapse. I refuse to allow that to happen.

I intended to work on it over the weekend, but my son was sick. I will get some work on it done over the Thanksgiving weekend, however.


40-Hour RPG Update 5: 13 Hours

(Note: Sorry this wasn’t up yesterday…I came home from work and went right to bed.)

This is going far slower than I intended…I had only intended for this to be a two-week project. I’m now in my third week and haven’t even used up half my hours yet! Still, the project is progressing, and it’s looking more like a game all the time:

Ooooh...

The game now loads maps created with the editor. The player may move around the map, and is blocked by impassable terrain, NPCs and monsters. The player may walk over items, however. The text system is in, allowing me to have a scrolling text area at the bottom of the screen.

However, the player may not talk to, look at, pick up or fight anything. In order to get those actions into the game I need to create the actual item, NPC and monster classes. That’s going to be a huge wodge of content. I’m expecting it to take about five hours.


40-Hour RPG Update 4: 11 1/2 Hours

I had originally planned to have the character moving across the map, monsters spawning and basic combat done by the ten-hour mark. I have failed at that, but I still think the project is on track. My editor turned out pretty darn good:

Holy Smokes!  An editor!

You’ll want to right-click and choose “View Image” to get the full effect.

The big work area on the left represents an entire 64×64 map on one screen – no scrolling. All the in-game terrain types and objects are icons in the upper-right. The numbers 1, 2, 4 and 8 control the brush size (only when painting terrain, of course). Save and load work perfectly, and the “Undo Item” and “Undo NPC” buttons allow you to undo the dropping of items and NPCs in the world.

I initially was going to have a set of “Clear to Terrain” buttons that would have given you an instant water, stone, grass or lava canvas to work on, but it’s almost as easy to just paint the map with the terrain you want using brush 8. I was also going to have a “New Map” button, but closing and reopening the program works just as well. The save buttons always saves to a map called “default.map”, and the load button loads this map, so once you’ve saved your work you’ll want to find that map and rename it to something else, lest your next save overwrite it. Very clunky, but just writing a simple system to input your save game name would have taken at least another half-hour. This is dirty, yet functional – exactly what I was shooting for.

There is one thing this editor doesn’t do, and that is map links. But coding that would take longer that just adding the links to the map by hand (most maps don’t have very many links) so I’m willing to call it done.

The map you see here was made in under five minutes.


40-Hour RPG Update 3: 9 Hours

I decided to go ahead and write an editor. Writing a fairly feature-complete editor will hopefully allow me to get more and better content into the game in what little time I have.

I scheduled three hours for the editor, and worked for two. At that point I decided I needed some text, so I looked up SDL’s text handling functions. I was sure they wouldn’t take long to figure out.

Except that the SDL has no text handling functions. Oops.

Okay, the website has a list of SDL addons…surely someone has written a compatible text handling library.

Except that you can’t search the SDL website just for text handling libraries…you have to use their categories. I managed to find some, but I didn’t see any that met my needs: ie, complete, easy to integrate, fast to learn, and dirt-simple to use.

Okay, no problem. I’ll just grab the drawing context of my SDL application’s main window and use the GDI function DrawText() to put text on the screen. I’ll even get automatic word-wrapping!

Except that when I do this, the text flickers, no matter where I put it in the window update. This is almost certainly due to something the SDL main loop is doing that I have no control over.

Okay. I know the SDL works with OpenGL, and there’s a function called wglUseFontBitmaps() that allows the use of TrueType fonts in an OpenGL app. It seems kind of silly to require OpenGL support for the program just to write text to the screen, but everybody has OpenGL…

Except that when I enable OpenGL support, OpenGL basically takes over all display functions and calling something as simple as SDL_BlitSurface() causes the program to crash. I’d have to rewrite all of my drawing functions to use OpenGL instead of SDL. No thanks.

So I guess I’ll have to write my own real simple bitmap font handler. Fortunately, nine-tenths of the work has been done for me by Sol on this page (and Sol’s tutorials have been very helpful throughout this entire project, I’m going to have to send him a thank-you note).

Except…

I don’t like the included font, and Google has failed to help me find a font I like better that is in the proper format. I can legally exclude the time I’m spending getting the font system working from my project because it’s framework stuff, but the font will actually be visible on the screen, so if I make my own font, that time will count against my forty hours. Can I afford to spend a half-hour putting together an alternate font? If I do, I can use a font from an old Commodore 64 RPG like Legacy of the Ancients, which will contribute even more to the game’s old-school feel. But is that the best use of my time?

If I say “I’ll make one at the end of the project if I’ve got some spare time” then it won’t get made, because I won’t have any spare time. And I want it. So I’m going to do it. I’ll probably regret doing this around the 35 hour mark, just as I’ll regret spending three hours putting tiles together, but I want what does get on the screen to look as nice as it can.


40-Hour RPG Update 2: 7 Hours

What a difference two hours can make!

Woo!

It’s actually looking rather gamish! While I already have all my terrain types defined, I don’t have a map yet. I think I’m going to have to spend a few hours writing a map editor, especially if I intend to shoot for the moon and have an overworld, towns and dungeons.

There’s also no input yet, but that’ll come quickly once I have a map to actually walk around on.

One thing I’m realizing is that I’m at a disadavantage because I’m using C++, and not something lighter and faster to develop with like PyGame. But the whole point of this is to get my skilz up, so I’m willing to put up with it.


40-Hour RPG Update 1: 5 Hours

Well, I am now five hours into my 40-hour RPG-

Oh, so you finally decided to do some work on this project, huh?

Okay, just who the hell are you, anyway?

I’m your superego. You know, the part of your brain that nags at you constantly about what you should be doing. You know damn well that you should have worked on this project over the weekend, but what did you do? You spent the whole weekend playing Soul Calibur III!

Really. Isn’t the superego the “parent” aspect of consciousness?

Why, yes it is! I’m surprised that you-

[BANG]

AUUUUGH!

Oooh, looks like you won’t be “parenting” any more.

You…gasp…you can’t do this to me!

In the end, it’s my brain, so…yes. Yes I can.

I’ll be back! You can’t get rid of me! They’re tricksy, false hobbitses! We must have the Precious!

Yeah, yeah. Now that that’s taken care of, let’s talk about the game!

I hit my first roadblock early on. I had expected that assembling the tiles off their various pages into one tile bitmap would take about an hour. It ended up taking three hours and fifteen minutes, partially because the Angband tiles I liked didn’t have the terrain symbols I needed, and I couldn’t find any others that I really liked. Yes, I wasted time Photoshopping some tiles together when ones I found on the net could have been used. I just didn’t like how they looked, and I want this game to be as good as it can be (I also don’t want it to look like every other quickie RPG out there). I don’t think the time was completely misspent.

I was then able to work up a map structure and a tile structure so that I could start putting the map on the screen. I don’t have any map data yet, so until I get some, here’s a look at the tileset I chose.

Tiles!

You may notice that I’ve only got 56 tiles so far…I’m reserving some because I know that as the project progresses the need for new tiles will come up.

Picking the tiles also dictated a lot of the game design. I tried to pick the most interesting monster tiles I could find, and to cover the basics of weapons, items and armor. Plus, I just couldn’t help but include four spell tiles in the game; hopefully I’ll actually have time to code those spells.

My next task will be to put together the overworld map and allow the player to scroll around it. I also need to finalize what the game’s GUI is going to look like.


40-Hour RPG Update 0

Well, I-

Update zero? What the heck do you mean, update zero?

Well, I’ve had to spend some time updating my framework. Since that’s not time working on the actual game, it doesn’t count against my 40 hours.

Oh, oh, I see. You haven’t even STARTED working on the RPG yet.

Sigh. Yes, that’s correct. I haven’t started on the RPG yet.

So what could you possibly have to say?

As I was about to say before I was so-

Hmph.

-so rudely interrupted, despite not having started on the RPG yet, I have accomplished a lot. The framework needed a lot more work than I’d anticipated, and it also needed this:

The eyes creep me out...

That may not look like much, but if you click on that skull icon, the window closes. That icon is a black triangle that shows that my simple GUI system is working. Wrote it in three hours, and it means that I can have mouse control in the game.

Next update will show some real progress on the RPG, I promise.

Suuuuuure…


More Thoughts…

No music or sound effects. Sorry, just don’t have the time.

Mouse control is iffy. I really, really want it. It’ll make the game much easier to play. But a keyboard-only control scheme would be much easier to program. If I don’t use the mouse, people won’t be able to play my game without a thorough reading of the instructions to figure out what key does what. That makes it too much like a Roguelike. But supporting the mouse means I either have to come up with a rudimentary GUI system or find and figure out an existing one – and I have to do this BEFORE I can actuallly get started on my game.

I’m deliberately limiting myself to a single 256×256 tile file. Since the tiles I’m planning on using are 32×32, this means I’ll have 64 tiles to work with. That doesn’t sound like a lot, but my tiles won’t be animating, and heck, Ultima III was made with only 64 tiles.


Okay, I’m Going To Do It.

I’m going to do a 40-hour RPG. The 40 hours will not be contiguous, I’ll probably use them all up over the course of the next two weeks or so (give me a break, I’ve got three kids). I will be keeping rigorous track of my time, and I will be posting my creation at the 40-hour mark, no matter how hideous it is.

How will I do this, you ask? Well, I’ll probably fail spectacularly like I did last time (when I got so interested in terrain generation that I burned up 8 hours just on that, making it impossible to continue). But this time I think I have a better plan.

First, I’m going to spend some time polishing up my game framework. This won’t count against my time, since it’s the same framework I’ll be using on every future game I make. I’ll make sure the framework supports everything I need before I start, so I don’t waste precious time coding something like GUI buttons when I should be laying down dungeon corridors. It’s based on the SDL, so that’ll make things even faster.

Second, I’m going to steal every resource I can. While the game will be graphical, it’ll be tile-based, and I’m going to use one of the free tilesets I’ve found on the web. I’m leaning towards the Angband graphics on this page. They’ve got a nice little retro-cutsey feel to them (though not TOO kawaii).

I’ll also be using maps from online map resources, like this one. I’ll also be researching lots of stuff off of rec.games.roguelike.development to speed up development.

Third, I’m going to keep the scope as limited as I can. The player will only control one character (this makes me cry; I SO want to do a tactical combat RPG). The game will consist of linked 2D tile maps for overworld, town and dungeons. All maps will be the same size and use the same code. I’ll write a very quick and dirty map editor to speed content creation. There will be an inventory system, but it will be quick and dirty, and the player won’t be putting bags inside of bags. Dungeons will be 2D overhead mazes or collections of rooms, like a Roguelike. Will they be randomly generated? That would be awesome; don’t know if I’ll have time. The game I’m envisioning will basically be a cross between a Roguelike and Ultima III.

I’m also considering releasing a 40-hour version, and then giving myself another 40 hours to add more features and also releasing an improved 80-hour version.


Okay, Here’s The Problem…

The problem is that I can either write an engine for a top-down, 2D, robust RPG with world, city and dungeon maps, NPCs, quests and quest objects, spells, fighting, and inventory in 40 hours…or I can actually take that engine and create all the content for an RPG using it in 40 hours. But I can’t do both. Here are my options:

1. Just do what I can in 40 hours, and then post it, just like I was supposed to do on my first try. I’d learn a lot, and I could probably work something up…but I probably won’t be satisfied with the results.

2. Use a prebuilt engine and just create our content for it. I don’t like this idea, for a couple reasons. One, most prebuilt engines are designed to make SNES-style Japanese RPGs. Nothing wrong with that, but it’s not what I’m making. And two, I won’t learn as much.

3. Create the engine, but create no content for it. I certainly would learn a lot but it wouldn’t be very satisfying to have nothing runnable to show at the end of the forty hours.

4. Give myself more time. This feels like cheating.

5. Use another game’s precreated content and just write a replacement engine for it. That’s darn tempting. If I were going to do this, I’d almost certainly use Ultima III’s content…a plus is that a decent PC remake of Ultima III was never made. Remake Ultima III in 40 hours…hmmm.