New games every week!
Building the Framework Blog
9th January 2010
For something that just looks like this..

.. I have actually but a heck of a lot of work into the framework, so far!
Take a peek inside to find out some nice nuggets of info, and take a look at the future of AGameAWeek!!

(It's a bit wordy, mind!!)

-=-=-

First things first.
If you click the image above, you'll notice the fullsize is NOT 800x600!
That's because I took some time to implement different resolutions! Blimey!

BlitzMax has recently upgraded to v1.36 (or at least, that's the one I downloaded a few weeks ago!), which has brought a very nice little set of "Virtual Resolution" functions.
Basically, I write for one target resolution (wow! 1280x960!!), and then you get to pick which resolution you want to play it at.
The engine scales all my code up/down to match, so assuming I'm using nice pixelly sprites and things, they oughta (?) still look lovely and chunky in a super-high resolution.
The image above uses 16x16 pixel tiles, and they're being upped to 32x32 by the engine, whilst still looking nice and blocky.
Good stuff!!

So, how do you change the resolution, then?
Faffing about in command prompt? Loading up GameX to change settings for GameY?
Nah, this is 2010, this is the future!!
Hit Tab or F12 ingame (that's in the middle of a freakin' game!!) and blammo


Down pops the options bar!

At the minute you can only change the fullscreen/windowed setting, the game's resolution, and which of the three available graphic engines the game uses. Choices being OpenGL, DirectX9 and DirectX7.

Those options now save and load nicely, and work exactly as expected.
The game loads, grabs the settings from the nicely laid out Setup.ini file (ooh, a .ini file!!) and then gets prepared.

Additionally, a lovely new feature.

Whilst the "AGAW/Socoder" logo screen is onscreen, the game whizzes away in the background, and counts how many sprites it can throw up on the screen at the same time, whilst simultaneously drawing the big logo, and even a nice big gradient.
Essentially it stress tests the engine, and your PC, for about 0.5 seconds, and the resulting figure is kept for future reference.
Whenever I draw a sprite, it double checks that I've not gone over the stress point, and will refuse to draw anything more if I already have. The framerate should always be nice and smooth, whether it's running on a rubbish dead-end struggling Celeron, or a high-end megatech supercomputer. .. .. It'll just look a bit different!

This could be a bit tricky, but I'm going to be double checking all my games can run with the bare-minimum.
It also separates main sprites from backgrounds, additional bloom effects, and even the particles, so if you're going to have to sprite-limit at all, it'll be the "niceness" that goes first, and the main game sprites that stay onscreen.
Oooh, fancy stuff!!

Only 4 days in, and the framework's already doing a whole big bunch of really cool stuff!!

Things to do..

1. I've currently allowed the engine to switch to Widescreen (16:9) resolutions if the player picks one, but I'm not entirely sure what I'm going to do in those resolutions.
Black Bars are not out of the question at this point!!

2. I'm currently working on input stuff. Keys first, then mouse, then have a faff about with joysticks. Shouldn't take too long, but I want to try and get it looking nice and neat.
I'll probably also allocate slots for multiple player's keys, so that future games can incorporate more than one player at a time. .. That does NOT mean online gaming!!!
Redefinable keys will be in the Option Bar, and constantly accessible.

3. Next up, I have to fiddle around with the audio.
Shouldn't be TOO hard to come up with the basics, but music could be tricky.
I might end up coding my own mod-player functions if I find I can't trust the available stuff. (aw, crap!)
Volumes will also be in the ever-present Option Bar!!! I'm really pushing the boat out, here!!

4. Titlescreen.
I've still not decided exactly what I'm doing with the titlescreen yet, but I know there's a lot to fit in there!
Game title/logo, Credits, Player name, Last Score, High Score (table?), Online scores, gameplay options, and more!
(Gameplay options, level settings and things of that nature, will obviously NOT be in the ever-present Option Bar!)

It's a lot to design, because like the last titlescreen, it's going to have to make do for a huge number of games.
It's going to have to look right, right from the get-go.

I wonder what it'll look like..
hmmm...
Views 38, Upvotes 12  
2010 Framework
New games every week!
Site credits : If you can see it, Jayenkai did it.
(c) Jayenkai 2023 and onwards, RSS feed 83

Blog - Building the Framework - AGameAWeek