Updates:
- Implemented particle effects for the various types of attacks and abilities. I decided that sprites simply weren’t enough; these animated effects are much better.
- Title music continues to play during character name entry.
- Battle log now has proper word wrap.
- Encrypted the data files. It’s a very simple encryption, and any programmer will be able to figure it out. I was going for something quick and simple – my goal is to prevent the casual user from editing “game01.sav” or “chests.dat” or “bosses.dat” in Notepad.
- Player names 2-4 can show up in dialogue and cut scenes now.
- Bosses and NPC’s have shadows on the overworld.
- Weather continues to move during attacks. This was a tough one.
- Antidote item cures poison for one character.
- Maps now have room for 30 door tiles instead of 20. This is important because most doors will be 2-4 tiles wide.
- Fixed water darkening at night to allow curved boundaries between grass and water.
- Got rid of brief weather glitch when loading saved games.
- Cut scenes can take place at night now, when I specify it. I also put in an option to have cut scenes take place at the current gameplay time, but I haven’t tested that yet.
- Changed tile sprites to one big array. This makes the code much cleaner and easier to work with. I ran some tests to see exactly how many tiles I can practically store in memory, and I found that there is essentially no limit. I ran the game with 2,000 tiles loaded into memory, and I think it used up an extra 10 megs of ram. No big deal. We actually have graphics for about 50 tiles so far.
- Changed the way foreground works. Now you can walk behind large multi-tile objects like trees. However, I had to sacrifice a previous feature to get this to work – now you can’t walk behind -small- objects like NPC’s. I’m okay with that. It was buggy anyway.
- Made the rest of the fake solid tiles. Basically, these are tiles that look like a neighboring tile, which you can normally walk on – but for these ones, you can’t walk on them. I’m using these in combination with layered effect foreground tiles to put objects on any possible background. This way, the same NPC can stand on grass, carpet, or whatever. There are four fake tiles – one that looks like the neighbor to the left, one that looks like the neighbor below… you get the idea. These are very useful for map making.
- Optimized the “darkened” function some more. This small function (about 20 lines of code) is the most important routine in the game. It is used to draw almost every pixel you see in the overworld. Lets do some quick math. The screen is 16×12 tiles in size, and each tile is 40×40 pixels. I’m aiming for 30 frames per second. So if the “darkened” function is used to draw each pixel you see, then it is used 16×12x40×40x30 = 9,216,000 times per second. As you can see, those 20 lines of code have to be as efficient as possible. I’ve almost got it the way I want. I’ll make a separate post about this soon, because I find it very interesting.
To do:
- Take away setup option for “slow PC.” There’s no need to cripple functionality to get it to run smoother when it already runs good enough on my 900mhz.
- Night sounds.
- Rain sounds.
- Desert shouldn’t have rain or clouds, but should have night and night sounds.
- View world map.
- Help feature from title screen.
- Lightning.
- Encrypt the graphics.
- Optimize more. This will always be on the to do list. I like going back and forth between adding new features to the game and optimizing old features. It keeps the old code from getting messy as new things get added in.
- Make battle damage more visible. I’m going to make a new font for this. It will be easy, because the font will only need numbers.
- Make battle log more visible. This is all about the timing.
- Test cut scene “run at current game time” feature.
- Make a walkable invisible block. This is going to be used behind things. Why draw a tile of grass if it’s just going to be covered up by a tree anyway? It’s more efficient to have an invisible block there.
- Investigate Error 11 that sometimes happens upon exiting the game.
- Get weather & night check out of the “darkened” function to speed things up approximately 1 fps.
- Optimize darkenedhalf, darkenedwater, and any other functions (grayscalemap, darkenedmap, etc.) the way I optimized “darkened”.
- Allow longer enemy names. Right now, I think 8 or 9 characters is the limit.
- Fix circle particle effects by using circles as sprites.
- Use different sounds for different “bashes”. There are 20 different types (ice, fire, slime, and so on), and it would be cool if each sounded different. Or, at the very least, there could be around 10 different sounds that get used (small ice and big ice can sound the same, etc.).
- Change character sprites to arrays.
- Change enemies to arrays.
- Add another foreground layer to allow trees in front of trees. Hopefully this won’t slow things down too much.
Known bugs:
- Screen blip after viewing map. Since I’m going to change the way the map works (it’s going to become a world map instead of local map), I’ll worry about this one then.
- Sometimes there’s a loud environmental sound when viewing shop hours, menus, etc.
- When loading a game near a door, the trail placement is buggy. I guess it puts the trail at the default start position for the map? I’ll look into this, but it’s not a big deal.
- After choosing all player attacks, there’s a quick screen glitch.
- The typesomething function is buggy. When asked to enter a player’s name, it often yells at you immediately as if you pushed enter without typing anything. Probably a simple fix.