Enemies! I've done a lot of work with them today. So far, I have the building block of the enemies almost fully set up: the enemy base class.
I started work on the first type of enemy, the "spore", which is just a child class of the base class. Right now all it does is sit there, and shoot at you when it feels like it. You can kill it by shooting it, obviously. Right now I'm having a little touble getting my functions and headers to play nice, so they can't kill you yet.
Big problems. I need to have the enemy class headers include the player headers in order to get reference to the player class. Also, I need to have the player class header include the enemy class header in order to detect if the enemie's bullets are hitting the player. Right now, that doesn't work too well. It's trying to reference to stuff that doesn't exist because one header didn't include the other while the other is already including the first one. Did that make sense?
Basically, right now, everything is a mess of one include after another. I think before I go any further I am going to work around with the architecture of the program. Right now I have everything in a simple header file, which worked well, but now that I am getting more and more complicated things don't want to play nice.
I have to stop having each header file include every other header file just to work. I'm sure I will start moving stuff into source files, which will patch things up a little bit.
Anyways, it's off to have some more fun smashing up the enemies that I have created. Yay!
Ok. So, I've done some work! The shooting system is basically comlpete. I just need to fix up some art.. which was done horribly for testing, and add in a few new functions to tell the bullets where to originate depenging upon where you are looking.
Right now, when you move the mouse around, the top half of the sprite will rotate around with it. This is very neat. You can shoot in any direction, and the bullet will fly in that direction, facing that direction. (The sprites are rotated).
I also added a new explosion system for bullets. I am still going to keep my little particle engine for use with other things in the game, but I decided to go with sprite explosions. Again, just as before, each different bullet can have a different exposion type. :)
Take a look at the screenshot to view the latest stuff.
Ahh! Four whole days without an update!! :)
Sorry about that. I got stuck going to college orientation without a chance to update before I went, so hence the lack of updates.
Anyways, I added a new shooting system to the engine before I left for my orientation. No longer must you turn around to shoot in the opposite diretion. I have made point-click shooting. Point to a spot, and you'll shoot there, straight through the cursor. I still need to implement some things to get it looking right: such as the animation for the body which will move according to where the mouse pointer is, etc. It's going to take a while, but I'm sure it can be done.
I have also figured out a way to get some "diagonal" tiles working. Tiles that the player can walk up, like it was a hill, instead of having to keep jumping all over the place. I think I may have a pretty effective way at doing it. I think it may work. I'm not sure. I'll have to try implementing it and then see what happens. I'm sure there is some kind of flaw in my thinking, but almost anything can be overcome. Heh. I fixed up my collision detection because of a little flaw in it, and now it's completely different, way more efficient, and just better.
Good things will happen. As for right now, I'm too tired to do anything else. No programming for me today. I need a break to recoup.
Today was ultra productive. I added some totally new things.
First of all, I scanned the concept picture which I drew, and pixelated it. It's not complete, and I'm still trying to fix some things up. I'm having some people critique it. That will be available soon.
Next up, I did some major conversions with my collision detection with tiles. Prior to this new method of detection, I was using a very hacked style of detecting collisions that would only work with a 64x64 sized sprite. It was a weird combination of bounding box by each individual 32x32 sized box the player took up. I fixed up this old terrible code by adding a true bounding-box style collision detection. Now I can just change the size on the fly and it will still work. It can be changed even if the size of the sprite it larger, or smaller than the box. Totally modular. I can change it any way I want now, and it works fine. I'm happy with this. Now I have no constrains on the player's size.
Also, I fixed up how the jumping works. I changed around the code and made it way more efficient. In the old style there were two different falling types. One for if you kept holding the jump button, and another if you were just falling... It was very intricate, and quite annoying. I changed that around so that it will just call only one falling type. Also, instead of your falling speed starting off extremely fast, I added a nice "gravitational" effect to it. Now you truly jump, slow down, stop, speed up, and finally fall. This makes jumping a lot smoother.
I'm very glad with the way things are looking with the engine now. It's progressing along wonderfully.
I also completed the song which I will be using for the game. No previews on that. Just informing the crowd.
I worked on some new media for the game. I am currently in the process of writing a new song for the game. It's coming out pretty good. I need to add a few more patterns, and it will be all set.
Also, I drew a half-decent rendition of the character (that ninja helmet looking character). It's a full body rendition, and it looks really good. I'll be uploading that in the very near future, after I touch it up a little bit. Touching it up still isn't going to make it look wonderful, but it will look better.
I added logging to my game. After discussing the level time loading, he suggested I should test the amount of time it takes to load a level. Well, he helped me out with some code, and I enventually ended up making my own custom function for calulating the time elapsed.
I also created a debugging log to basically log almost every action that the engine takes. This way I can read internal values of certain things. Just talking about it made me think of implementing a button press that would dump all values such as the player position, map, map offsets, bullet locations, etc. Hm. I think I may just do that when I am done with this post.
Here is what a piece of the debugging code looks like. Its
Quote:
Game Started
===
Initalized Allegro, Mouse, Keyboard, Timer, Sound, GFXMode
Loaded data\d_system.dat
Loaded data\d_fonts.dat
Loaded data\d_sounds.dat
Loaded data\d_music.dat
Loaded data\d_tiles.dat
Loaded data\d_sprites.dat
Loaded data\d_backgrounds.dat
Initialized Player
Initialized Enemies
Title Screen Started
Starting up Game Selection Screen
New Game selected: data\save\save3\save.usv
Loading Map: data\maps\default.map
Load Ok.
Title Screen Exited OK.
Saving Game File: data\save\save3\save.usv
Save Ok.
And, actually, after looking at this output file and realizing something was missing, I found out that I had a major bug, and some old non-updated code.
Well. That's all fixed now. Thank you log file! This is going to make things way easier.
Complete fixes were added to the running in the game. Instead of automatically starting off at your run speed when you hit the run button, it now takes a little while. You get faster and faster over time until your reach the top running speed that can be achieved. This works much better, and it also plays the running animation much faster. It's really nice to be able to run around all over the place now.
I also added support for a single paralax background. This basically blits a single screen sized bitmap as the "background" of the map, if wanted. When you're walking around, it will move also, creating the illusion that it is off in the distance somewhere.
Check out the screenshot, you'll see how it looks :)
I fixed up a couple of glitches in the game today. I noticed that if you walk into a wall, the animation will keep playing. Well.. I stopped that from happening. It was a task and a half because of the fast that when testing if the tile to the left is blocked, trying to test by one pixel to the left it would not detect since I am doing a divide by 32 on an integer, which would just round up. It pobably does not make much sense, but think of it this way.
If the player is just about on the edge of one tile and another, subtracting one from the players x position and dividing by 32 to get the tile position would just result in the same tile position, thus saying that the character could move left. It's very compliated, but I finally fixed it.
I also made a fix for the "running". Now, when running, the player is no longer at a higher speed after running into a wall. This only seems to make sense, so I added that in. That's about all for today.
Hrm. Still no news on those enemies. *grin*

Anyways, I worked on making a couple new tiles to spice up the little world of Untitled.
Here they are. It's supposed to be some sort of weird organic tree like thing. The tiles are out of order, so you'll have to figure it all out for yourself.
As you can see, there is really no "top" to the tree like-thing. I guess so far they will all just have to extend to the top of whatever map you're currently on. I'll make some kind of "topper" for it later on. I was just doodling around and came up with something good, so I kept going with it.
Well, this post isn't about the enemies, sorry :)
I added a new option to my options menu which allows the user to play around with the buffer size of the music. Some people had problems with the setting I currently had, and allowing them to play around with the buffer size will fix things up. It's actually pretty neat. I am using this music system called DUMB to play the IT format modular music. It's a nice tool. Works perfectly in conjunction with allegro.
Anyways, I made another little slider bar to allow for changing the buffer size. If you put it too low, you'll get crackle, and if you put it too high the program will stall out. I guess it's up to the user to figure out which setting is best for them. Don't come to me when the music is all funked out, because now you can adjust the volume and make it sound the way it should :)
The saving system is basically complete, now.
I scracthed the idea that the player will be able to save to any of the three slots during save time. I realized that it would be a pain in the butt just to have to select which save file every time when saving.
I still haven't created a "copy this save to this slot" type of scheme, but everything else works. You can select whatever file, and load whatever file. You will get a little window popup if you try to load an empty game, or attempt to create a new game over an existing one.
Also, there is a nifty little button to nuke out all the information from the saves and render them all "empty".
It sounds like not much was done, but really, it took almost all day to get everything working correctly. It was a little tough getting the directories to work perfectly and nice with eachother. The whole system is basically complete, and it will delete files from previous saves when creating a new save game.
It's really nifty. Too bad I can't explain it more than that. It's not something that you just drop your jaw at.
Next up: enemies :)
A lot of work was done on Untitled today. I totally reworked the saving system. I had to do a lot of work with getting it to save to the correct directories and whatnot. I wanted the player charts to save in the current "save game slot"'s directory, instead of in the maps directory with appended names. It was a big hassle getting all of that to work. Lot's of pointer to array conversions. Anyways, that works fine and I am quite pleased.
I also got the function for deleting the minimaps working correctly. This way, when a new game is started, the minimaps do not say mapped out. They will be recreated.
I'm pretty glad about how things went today. I found out that I am using a horrbile conversion method to convert a char pointer into a char array. I was just copying character by character. I learned that I could just use this nice C-style funcion: sprintf(); to copy a char pointer into a char array in just one line of code.
I'm quite happy about this. This will make things much easier. I already converted all the code that are able to use this system. Many other functions, however, still rely on counting how many characters are in a char pointer, so I'm kind of stuck still using the old method.
And now, it's time for a break. It's 4:30am. What a coding session.
After receiving a request (from the
allegro.cc message boards) to make my tutorials available offline I decided to go ahead and do so. I had some free time, and was taking a break from working on Untitled, so I went ahead. Don't want to keep my viewers hanging, now do I?
You can grab the zip file for each tutorial at it's respecive page. Have fun!
I continued work on the saving and loading system. I created a little screen, and a nice little function to pull general data from the save file. The screen shows a different button for each different save "slot" displaying information like health, and ammunition amounts. In the future it will display much more, but none of those items have even been programmed into the actual engine yet.
Take a look at the current screenshot, which displays what I have done so far with the system. I am quite positive I will add a "Data Clearing" button in order to erase saved games. I believe I will allow, once the player has been given the saving option, the player to save to any file they wish. If they previously saved in slot one, they could save in slot 2, or slot 3 during the next saving procedure. This would prevent the player from having to copy one save data onto another just in order to have a second game. It would be simple. The player loads up the game, and then goes right back into the save screen, and just saves in on of the other slots. All can be done from within game. I think that would be pretty nifty.
Now, all I have to do is read mouse input, and have the engine load the correct data, and test out how all that works. After that, I need to implement some sort of saving sheme into the editor that the engine will also be able to read. I'm not quite sure how I want tackle this task. I don't even know how I want saving to occur. I'm not sure if I want to have save "pod" type things, that the player walks up to and is given the option to save, or to only allow saving on exit. This is something I have to think about before fully implementing the saving.
About one minute after posting the previous one, I decided to make my next tutorial. It wouldn't take that long, so I just went right ahead. I don't know what gave me the impulse to do it, but, I got it and I did it.
This tutorial is on the most simple, basic animation you can do in allegro. It uses the least lines of code to to it (in my opinion), hence it looks kind of silly. Anyways, check it out in the
Allegro Tutorial section!
Well, today I started work on the saving/loading system. The game is only going to allow for 3 save "slots". I've basically set up the main structure for the whole thing, now I have to get it to be able to pick and select which file you want to write to. It should be finished soon. Once I have that fixed, I need to figure out just exaclty how I am going to allow saving in the game. I might actually wait until I'm a little further in the dev process for that, but for now I could just use a nice big white tile for the "save-spot" just to test it out.
That should be done in the next couple of days, If I stick to working on it. I might be jumping around from place to place, however. Currently I'm working on three things: the enemies, the saving/loading, and the dev document. It's fun, because when I get fed up or bored with one thing, I can switch to the next and feel like I'm starting off fresh with something new.

I've been adding more and more to the dev docs. I did take a big break and do a lot of other things, other than working on the game, so there wasn't too much of an addition. Here is a little image for you. I've been slacking with giving you stuff to look at :)
This is what the dev doc looks like so far. As of now I have four sections set up, and two of them aren't anywhere near completion.
Time to get back to work!
As of this posting, I have started working on the "big" development docs for Untitled. I started out only with how the "map" system will work, and I've been on a roll. I didn't even finish writing about the maps and I am already over a page.
I am going to see how much information I can think up right now. I'm on a roll, and I don't want to lose this burst of... information, if you want to call it that.
Well, first of all: the demo release went very well. I have received some wonderful input, and some critical input, too. Both of which will help me make the game better. Thank you to all the players (so far) who took the time to get back to me on what you thought about the game!
Now, on the programming side of things: I started to make the structure for the enemies. I decided that I am going to have two separate classes for the enemies. Since I don't want to be blitting from the allegro datafiles directly, I am going to create two instances for each enemy. One which can be an array, and hold general information such as position, etc. The other instance will just be one single instance for each enemy type which will hold any information that was held in the datafile.
I want to just copy all the information from the datafile to the enemy structure, and then just unload the datafile. This way, I don't have to deal with references to the datafile index. Instead, I can just call up any frame of the animation I want directly from the enemy "media" class. It's a nifty idea. I'm not sure if it will be able to pull through or not, but so far it seems to be working well. I have set up enough to be able to display the enemy on the screen in it's standing position. Next I need to get it animated.
I also need to think of some sort of way to set the number of frames per enemy without wasting memory on unused frames. We'll see what happens!
The demo is finally here! This is the first public release of anything from Untitled. Remember that this demo is more like an engine test, than anything else.
This release of the demo only supports Moving, Shooting, Weapon Changing, Map changing, and Minimapping. A simple particle "engine" is in effect when bullets hit the walls. Sounds are also used for the bullets. There are no "enemies" yet, and there is really nothing "to do" in this demo. It's just a walk-around engine test right now.
It has been tested by multiple sources, and no bugs seem to be present. Be sure to send me an email (jay(at)loomsoft(dot)net) or just use the quickmail link if you find any!
Well, what are you waiting for? Go to the Untitled page and download it!
I've been chopping away. I made my own custom sprite! It's just a stickman, but it looks really good! I wrote up a readme file, and am getting the engine prepped for a release. I'm fixing up little glitches here and there, adding demo-specific items in certain places. It's really exciting.
Expect the first public demo to be released very soon. Keep a watch out!
Well, I've finally fixed that bug. It was a problem with my custom "LS Window" class. I was creating a bitmap of zero width and height. Well, for some reason, it would work once, but when I tried to do it again, the program would dump out.
It was very hard to track down, but I finally found it. This makes me want to clean up my code now, a lot. Just to put things in some sort of order rather than all over the place. I have initializers for the menu window far away from the initializers for the buttons, but they should all be around the same place in the code, since they both work within one another.
*whew*
I'm glad that bug is gone. Now when I play it's so much nicer to be able to see the menu screen when I hit escape, instead of the program just quitting. Much better looking. Yay!
I've upgraded my computer to windows XP. Untitled is having some compatability problems which I am working on right now. Some of them include destroying bitmaps and then recreating them under the same name. For some reason, things are going out of scope in the wrong place, and it's deleting bitmaps which it needs to blit. :/
Also, I have one error where when the player hits escape from the in game stuff, it will return to the menu. The player can then return to the game. However, if the player returns to the title screen again by hitting escape -- the game just quits. I need to figure out what's going on with that, and that is exactly what I am going to do right now!
Everything else works fine. The only problem is that Allegro on WinXP has some flickering problems within the first 15 seconds of starting up a program. I guess I can live with that.
Well, surprisingly, I actually don't have an update for "untitled". Instead, I have an update for my
allegro tutorials. I added the next tutorial, number six, which covers timers. Make sure to check it out! :)
It was fun to take a little break and code something new. I don't think I'll do two tutorials straight in a row, so it may be a little bit before I work on the next one. I still need to draw a new sprite for the character in my game. I think I should do that before I start anything else. That way, I'll have to do it
Well, I fixed the key problem. Now you can assign any function to ANY key, except for lock keys, and "special keys".
There are a lot more features getting pumped into what will eventually be the demo release than I had hoped for. I think I may beef up the engine a little more before releasing a demo.
This is so exciting. The game is looking better and better with each new thing I add to it.
added key customization to the options screen. I also created the beginning of the game saving/loading function. Right now, it just stores the user's defined keys. You can't tell it when to save them, or load them - it just does it automatically. When you start the game up - the keys will be loaded in. Each time you start a new game, the keys will be saved. Therefore, if you change the keys, they will stick for the next time you will play.
Hey, it's better than changing them every time you want to play the demo! :)

It's pretty simple. You just click the button for whatever key you want to change, and then press the key. Right now it doesn't support shift,controls, and caps lock. I'm still not even sure if I want to allow these keys to be used. We'll see. Once I learn how to implement that I'll decide whether they can be used or not.
Also, it will not let you set any keys to ESC, F1, or F2, since those are "special" keys. :)
Not wanting to start drawing the custom sprite animation, I went ahead and did something a little nifty. I went ahead and used my very versatile bullet class to create a new type of projectile that the player can "shoot": missiles. They have their own sprite, and create a unique explosion type. The user hits a defined key in order to switch between "weapons". That's all for the day, so far.
It's about time I archived that old may news. :)
So, I've added an awesome introductory sequence to the game. This is the first game where I've made such an 'intro', and it came out quite nice. It lasts over a whole minute, and all you (as the player) do is sit back and watch. How interesting!
After getting the intro to play exactly as I would like it, I created some fading functions for map switching. Instead of it being a pure cut from one map to another, it will fade out the screen, load the next map, and then fade in the screen. This proves to be much less disorienting, and it works like a charm.
After doing such, I decided it was about time to start working on some demo content. Upon this decision, I wanted to get rid of any content that wasn't originally created by me. The first thing to go was the music. I wrote a couple of songs to go along with the impending demo release. Yay for me!
Next on the agenda was to get rid of any tiles that weren't mine. I did that, and made probably about double the amount of tiles I used to have, and now they are all original.
The last thing I need to do is draw the character animation. I want it to look somewhat decent for the demo release, so that's going to take quite a while.
Ah, another thing. I also updated the minimap to show a little cursor for where the player is. I don't know why I didn't think of that before...
Other than that, check out some screens of the new maps and tiles!