Jonathan's Blog

Thursday, July 28, 2005

Menu Demo

Haven't had the time or drive to work on this in a couple weeks, so I thought I'd post up a demo of what I've got now so that people can play around with it.

Get the demo here:
Menu Demo for Windows
Menu Demo for Mac OS X

And the source is here:
Source Code

To run the demo, just extract the contents of whichever archive you're using into your Egoboo folder. You probably want to back-up your copy of the Egoboo executable first, 'cause this will overwrite it. Make sure that you extract the folders as well on Windows; Winzip should do that by default.

I made no attempt whatsoever to run this at anything but 640x480, so I suggest you do that too, else it will look stupid. :)

The interesting bits of code are in the Gui.* and Font.* files, and the bottom half of menu.c shows it in use.

Labels:

Monday, July 18, 2005

Mac Eye Candy!

The Gui stuff worked fine on Mac OS X without having to change a thing. Yay!

Here's what the module select menu is looking at... I'm not totally happy with this yet though. I'm way less happy with the character select screen though, so I'm not showing that one until I am. :-)

Interestingly, you can't use the Mac OS X shortcut keys to grab a screenshot of an OpenGL window. You have to grab the whole desktop, and cut the window out of it. Didn't try using the Grab program though, that probably would've worked better.

Labels:

Friday, July 15, 2005

More Eye Candy!

I put this together for the Zippy forums, so I should put it up here too:

Menu demo movie. (4.2 megabyte mpeg)

Labels:

Thursday, July 14, 2005

Eye Candy!

Here are those screenshots I promised. These are both in-game shots, not mockups. They look a lot better once you can interact with them and see the animation. Hopefully, I'll have enough menu-ing stuff by the end of the weekend that I can post a new executable for people to play with. Code too.






Labels:

GUIs and Font Rendering

Timing update: I have the code in place to start converting things over to a proper time-stepped solution, but it isn't very exciting work, so I haven't dug into actually doing the converting yet.

I did find something else exciting though: a presentation by Casey Muratori about Immediate Mode GUIs. He put together a movie (found here, look in the sticky topic for the movie) in which he describes a different way of going about putting GUIs together. There's a lot of discussion about it on the site, and in general, it's a very neat idea. And it works beautifully for games.

So I'm building an IMGUI into Egoboo. So far it's very straightforward, easy to use, and easy to get robust behavior out of. It makes GUI programming a lot less tedious, and a bit more fun.

One thing that's annoying me about it though is that Egoboo's text rendering is rather... inaccurate, for lack of a better term. Where text appears on screen isn't where you would expect it to, given the coordinates you tell it to draw at. It's offset downwards by a bit. It's bugging me, and I'm iffy about trying to fix it and breaking text locations for most the game, so I'm quickly adding TrueType font support via SDL_ttf to use in the GUI system. Dunno if I'll keep it, but being that it supports Unicode text, it's probably a good idea to. Makes it easier to do translations somewhere down the road.

I'll post screenshots once I pretty this all up a bit.

Labels: