REP Engine Updated
I spent most of last night getting REP Engine updated to use the new code base as it was quite outdated by now. I also have somewhat of a project template that I'm using now (based off of SAGE) that I wanted to update REP to. The template starts me off with a splash screen thingy, a state system, a basic scripting system, and storage; basically the stuff I need to get a prototype off the ground really quick. Anyway, REP is back up and running, but I still need to decide on a project for that.
New Font System
I spent some time yesterday going through and finding some free TrueType and OpenType fonts (around 15) to try out for SAGE just to have only one of them actually work with XNA's system; this frustrated me A LOT (I spent about 2-3 hours scouring for the fonts.) I've also been kind of bored with the system as it doesn't offer much, so I decided to go back to AngelCode's Bitmap Font Generator (http://www.angelcode...roducts/bmfont/
). I spent about the last two hours going through and getting the system up and running and some nice features implemented:
- Alignment (and eventually auto-ellipsis support; maybe some other stuff)
- Formatting (current text coloring)
Alignment is easy, so I won't cover that. Formatting is done via BitmapFontFormatter; basically it allows you to color strings based on indices. So, if I want to color the first 5 characters:
Formatter.SetColor(Batch, 0, 5);
Effects is the cooler part. Basically it is a class that allows you to modify character glyphs on the fly. Currently I have a sine-wave effect, 'flashing' effect (highlighting characters one at a time), and a flipping effect. Each is adjustable and the flipping effect has two modes: single character or whole string. The single character mode just moves through the string flipping one character at a time while the whole string mode flips each character until it reaches the end. There is a little quirk with the whole string mode: if you don't use batching, the string will flip, but as soon as it gets to the end, the string goes back to normal. This is pretty much as designed; without the batching, the glyphs get generated on the fly, so one it reaches the end and goes back to the beginning, the states are all reset (the effect works by setting the state of the characters from the beginning to the current index each frame.)
Using a formatter and batching is not necessary; you can simple call SpriteBatch.DrawString() as normal (via extensions.)
Here's a shot showing the testing I was doing:
I also updated the UI system to use it:
While the UI system does support effects (the sine-wave effect is being used in the shot above), they have to be set manually and do not adhere to state (so, the same effects are used across each state.) In the future I may move them into the theme system and allow them to be set per state and such, but I don't believe it is really worth it at the moment (though, it'd be really cool to have the sine-wave only show up when hovering over. Maybe later lol.)
I am still working away on the demo; I've been working on some different scenes the last couple days. I've decided to skip the editor at the moment. I'm aiming for this weekend, again (maybe Friday so I can get it out in time for Weekend Reading), but I can't make any promises. Other than it will more than likely be REALLY ugly lol. Here are some of the concepts I did up last night:
The stairs and perspective are a little off, as well as it has a kind of MC Escher appeal due to the lower wall. So, I tried again:
Stairs are better, the MC Escher is still there. Hooray for programmer art!
Now, back to work!