Author Topic: Ash: Phoenix  (Read 118533 times)

0 Members and 1 Guest are viewing this topic.

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix
« Reply #135 on: November 21, 2010, 05:43:17 pm »
Oh, I see. Well my maps don't cleanly divide into 12x8 pieces, so I don't know how to answer your question that way.
To answer in terms of bytes, I have currently about 42kb of map to use. I am thinking about going back to nibbles to decrease the amount of user RAM and the amount of space the maps take up, so you can say 42000 bytes = 84000 squares then. However, depending on how large I decide to make the game, I could easily add or remove map data, so you could expect the final game to use anywhere from only 22kb to 66kb (I don't think I will need more than 66 kb...with nibbles that is 132000 squares O_O)

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Ash: Phoenix
« Reply #136 on: November 21, 2010, 05:49:07 pm »
squidgetx, could you post the data for a typical map? I could try to find a decent compression method for it.

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix
« Reply #137 on: November 21, 2010, 05:53:08 pm »
It is completely uncompressed :P so it's just an array...like
Code: [Select]
[7777777777777777
0211111111111110
0200000000000000
0200000000000000
0000000000000000
00A0000000000000
00A0000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000000000000
0000000030000000
0000000000000000]

or something similar where each nibble/hex digit corresponds to a tile.

(0,1,2,3,4 are all walkable tiles, the rest are solid tiles)

The example map posted would be mainly empty, with a random door towards the bottom, some rocks in the upper left corner, some trees on the top row, and some other random tiles towards the mid left

As for compression, I'd favor routines that are smaller in size and compress less over those that are larger but compress more :P
« Last Edit: November 21, 2010, 06:02:11 pm by squidgetx »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ash: Phoenix
« Reply #138 on: November 21, 2010, 06:22:08 pm »
Darn that seems impressive. I like long RPGs and exploring stuff

Offline Runer112

  • Moderator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Ash: Phoenix
« Reply #139 on: November 22, 2010, 08:52:50 pm »
Would most maps be filled with mainly one tile like this?



EDIT: How about RLE? I made a program (ASHCOSRC) to compress nibble tilemaps with 4-bit RLE for you :) To use it, change the width and height variables present at the start of the source program to what you want and put the hex for the uncompressed tilemap under GDB0M. Then run the program and the hex for the compressed map will be put into Str1. Your example tilemap compressed very well, from 120 bytes to 24. ;)

And of course, what compression algorithm is any good without the proper decompression algorithm? ASHDESRC is the decompression program. The part of it that is the actual algorithm, which is all you would want, is the code under the tag ".DECOMPRESSION" excluding the Disp "DECOMPRESSING..." line. The decompression algorithm is only 113 103 bytes.

Code: (120 bytes compressed into 24 with 4-bit RLE) [Select]
F70002C11002E002F0F00AE00AF0F0F0F0F0F0F04003F060
I hope I made it straightforward and user-friendly enough that you can simply stick all your maps into ASHCOSRC one at a time and easily retrieve the compressed map data. If you have any questions, feel free to ask.

EDIT 2: Uploaded a new, further optimized decompression program. The algorithm is now 103 bytes instead of 113.
« Last Edit: November 23, 2010, 09:21:03 am by Runer112 »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ash: Phoenix
« Reply #140 on: November 22, 2010, 11:25:49 pm »
Compression would be a good idea if maps have a lot of plain areas like this. Just decompress them to use them, though, else I assume this might be slow. :P

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix
« Reply #141 on: November 23, 2010, 07:18:07 am »
...That is very sexy Runer.

Thanks ;D

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Ash: Phoenix
« Reply #142 on: November 23, 2010, 04:27:36 pm »
That looks great!  Thanks Runer. :D

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix
« Reply #143 on: November 23, 2010, 06:03:01 pm »
Ok, update :) Thanksgiving is coming up which means that I'm going to be getting a lot of time to work on this :)
Updates
  • Merged map engine and battle engine into an app that is only 13kb :D
  • Ingame menu works
  • Saving and loading also works
  • Map engine is faster and less flickery
  • Free RAM requirement dropped to 6288 bytes
  • Character can change direction he is facing without moving
Planned updates for this weekend:
  • Make character sprite 12x24 to make it look better and improve animations (he will bob up and down with each step :D)
  • Battle transitions!!!! (looking at E:SoR for help on this)
  • Improve status screen to display current skills and give option to unequip equipment
  • Move status screen program to external appvar to test the copy-from-appvar-to-program-and-then-run-it-from-app method of circumventing the code limit
  • Fix tiles so they look better (have the dunes pattern 'behind' them to make it look more realistic)
  • Shops/inns

Also behold: the corrupted save file ;D

« Last Edit: November 23, 2010, 06:04:29 pm by squidgetx »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ash: Phoenix
« Reply #144 on: November 24, 2010, 03:10:26 am »
Looks nice, despite the glitches. The glitches reminds me some Pokémon TAS on Youtube ;D

Are you planning to put water around those rocks too or is it just a random map caused by a glitch?
« Last Edit: November 24, 2010, 03:10:50 am by DJ Omnimaga »

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix
« Reply #145 on: November 24, 2010, 07:12:13 am »
The glitches are actually caused by the loading of a nonexistent save file; it doesn't yet check to see if the save file exists or not :P
The random tiles towards the top of the map look like random pieces of memory, and they are, due to the fact that my mapping engine (to increase speed) doesn't bother checking if you're walking/viewing outside the map ;)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Ash: Phoenix
« Reply #146 on: November 24, 2010, 10:54:12 am »
Looks great!  I really like the fade in/out upon saving. ;D

my mapping engine (to increase speed) doesn't bother checking if you're walking/viewing outside the map ;)
You may want to change this for the final release. ;D

Use this transition: http://ourl.ca/4114 :P

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ash: Phoenix
« Reply #147 on: November 24, 2010, 05:21:43 pm »
The glitches are actually caused by the loading of a nonexistent save file; it doesn't yet check to see if the save file exists or not :P
The random tiles towards the top of the map look like random pieces of memory, and they are, due to the fact that my mapping engine (to increase speed) doesn't bother checking if you're walking/viewing outside the map ;)
Ah ok. Would adding checking for map boundaries slow down the engine a lot? If it does, I generally just do like FF1 through 4 and keep the character in the middle of the map and simply add a few more tiles at the top of the map.

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix
« Reply #148 on: November 25, 2010, 11:59:36 am »
I'm not sure how much it would slow it down by, but I don't really want to add it in, especially since not all the maps will have the same dimensions, so it would be a bit of a pain :P I'm just going to design all my maps so that it you can't get to the edges anyway.

So my calc needed a full mem clear last night :( because of a mysterious bug. However, it is fine now (I had a very recent backup) and progress is moving again. The title screen/save file loading works perfectly now, so now I'm off to work on shops/inns and improving the graphics a bit

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Ash: Phoenix
« Reply #149 on: November 25, 2010, 09:08:28 pm »
Ah ok. Personally I'm fine with the char staying in the center. It is a bit more realistic and it's more old-skool since most old RPGs worked like this. The only problem is that depending of the map design, sometimes you don't know when you're about to exit an area like a forest.

Also sorry about the mem clear, I'm glad you had a recent backup, though.
« Last Edit: November 25, 2010, 09:08:51 pm by DJ Omnimaga »