Author Topic: Ash: Phoenix- Reboot  (Read 66282 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- Reboot
« Reply #15 on: October 30, 2012, 11:35:23 pm »
The map is just drawn before the first frame and the rest is shifted in :) See the first post for installation instructions/what the source is. I'm very happy with how it turned out, since I think it has the potential for lots more abuse (For example, I'm using the bitmap command for the initial map-draw LOL but hey, who cares, you can't see it) especially I think for the ability to call sprites in from archive allowing me to use a full range of 256 tiles for every map :D Thanks for all your help!
« Last Edit: October 30, 2012, 11:35:38 pm by squidgetx »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #16 on: October 31, 2012, 05:16:31 pm »
That was pretty quick ! Nice to see you already made some progress in code.
I don't think spriting directly from archive will be possible, but copying one singme sprite to RAM before displaying it is.

(Off-topic edit) : I'm pretty proud of my new sig BTW. :w00t:
« Last Edit: October 31, 2012, 05:18:50 pm by Streetwalker »

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #17 on: October 31, 2012, 10:33:01 pm »
Well, what happens is that the scrolling/movement routine requires the next row of sprites to be shifted in to be copied into RAM (about 384 bytes worth). Right now it's set up so that at the beginning, when I load the map, about 1kb of tiles are imported from archive into RAM, and the shifting routine "spritebank" is created by referencing that 1kb. I'm planning to "cut out the middleman," and see if I can create the spritebank by drawing on the tiles in archive. That way I can effectively have access to any and all tiles in archive :) The spritebank creation copy routine is only run once per button-press, so I'm hoping that the speed difference will be negligible.

Progress for today: shifted the extra 4 pixels to the top of the screen, since I realized the character (being 12x16) will appear more centered that way. Began writing custom assembly aligned-masked-16x16 character display routine.

Edit: It works. Every map now has access to 256 different tiles.
« Last Edit: October 31, 2012, 11:08:58 pm by squidgetx »

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #18 on: November 03, 2012, 02:37:43 pm »
Major mapping update :D



-Finished custom asm mask routine (although I need to change it a little to draw to any tile once I implement NPCs) Yeah, the routine is kinda poorly written; I'll eventually get around to optimizing it. Don't look! But the important thing is that it works for now lol
-Sprited character and animations
-Optimized/modularized movement code to allow tap-to-face-direction and improved speed with one change.
-Draws black automatically if shifting in non-existent data
-Last, but most definitely not least, implemented seamless map transitions. Remember in the demo and in Embers, in order to change areas you HAD to go through a door or something? No longer; now you don't notice anything when you move from one area to another (well, if you look really closely the grayscale flickers a tiny bit). Effectively, the world the player inhabits is 9216x9216px or 768x768 tiles...That's 589,824 tiles, or over 13,000 screens of world all seamlessly put together. The screenshot shows the character walking around on the edges of 3 areas. It only takes 2kb of RAM to run this mapping system :D

As usual, the build and source can be found in the first post

To-do:
-Collision detection + map switching via portals/doors
-Fix up mask routine
-NPC render engine (then I'll be done with all the overworld stuff...)
« Last Edit: November 03, 2012, 02:41:27 pm by squidgetx »

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Ash: Phoenix- Reboot
« Reply #19 on: November 03, 2012, 02:50:12 pm »
Woah, that's amazing! I made something similar for a project of mine in Axe, but it has nowhere near the fluidity of yours - excellent work! Does it constantly archive and unarchive areas that it loads in/out?
In-progress: Graviter (...)

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #20 on: November 03, 2012, 03:01:41 pm »
Does it constantly archive and unarchive areas that it loads in/out?
I guess it keeps all in Archive and uses files to not waste time with archiving ;)

But I agree, that looks great and fast, especially for a greyscale tilemapper :D
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #21 on: November 03, 2012, 03:02:39 pm »
No, it's copied into ram from archive. That's why it's so fast :D edit:  ninja'd by hayleia lol

Each region is 24x24, stored in archive. There exists a meta-map, or tilemap of tilemaps (32x32) that determines how regions are placed in relation to each other.

When the loadmap routine is called, it takes metamap X and Y coordinates as arguments to determine which 24x24 tilemap is needed to be copied in. However, the amount of memory I allocate for the "active" tilemap is 32x32-- so that the edges of other maps can be easily scrolled in and out. The routine takes (X-1,Y-1),(X,Y-1),(X+1,Y-1),(X-1,Y),(X,Y),(X,Y+1) etc. and copies in the appropriate parts of each surrounding map to RAM, creating a 32x32 tilemap where the center 24x24 is the "active tilemap." When you walk off the 24x24 section, your metamap coordinates are updated accordingly and the loadmap routine is called again.

Note that this means that all the maps are static; and that they can only be changed temporarily. But that's the way the engine's always been so whatever.

One unavoidable issue is that if you change maps in the X direction, you will automatically take 2 steps. You will only notice this is you aren't holding down the button, so I don't think it'll be a huge issue. It's because a 32x32 area can only hold 4 tiles extra to be scrolled in on every side, and when walking to the left (due to the way the map is aligned) you would need 5 tiles. So I force map change a tile early when walking this way, then force another step so it doesn't get messed up. You can probably observe this by playing with it a bit in the build :D
« Last Edit: November 03, 2012, 03:03:56 pm by squidgetx »

Offline shmibs

  • しらす丼
  • Administrator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2132
  • Rating: +281/-3
  • try to be ok, ok?
    • View Profile
    • shmibbles.me
Re: Ash: Phoenix- Reboot
« Reply #22 on: November 03, 2012, 04:04:54 pm »
i don't have much to say, but wanted to mention that it looks beautiful! =D

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #23 on: November 03, 2012, 04:47:21 pm »
Major mapping update :D



-Finished custom asm mask routine (although I need to change it a little to draw to any tile once I implement NPCs) Yeah, the routine is kinda poorly written; I'll eventually get around to optimizing it. Don't look! But the important thing is that it works for now lol
-Sprited character and animations
-Optimized/modularized movement code to allow tap-to-face-direction and improved speed with one change.
-Draws black automatically if shifting in non-existent data
-Last, but most definitely not least, implemented seamless map transitions. Remember in the demo and in Embers, in order to change areas you HAD to go through a door or something? No longer; now you don't notice anything when you move from one area to another (well, if you look really closely the grayscale flickers a tiny bit). Effectively, the world the player inhabits is 9216x9216px or 768x768 tiles...That's 589,824 tiles, or over 13,000 screens of world all seamlessly put together. The screenshot shows the character walking around on the edges of 3 areas. It only takes 2kb of RAM to run this mapping system :D

As usual, the build and source can be found in the first post

To-do:
-Collision detection + map switching via portals/doors
-Fix up mask routine
-NPC render engine (then I'll be done with all the overworld stuff...)
Wow, that's an awfully large world you will have to play with. Very impressive! :D The mapper is looking quite smooth so far. Nice work!

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #24 on: November 04, 2012, 01:05:10 pm »
Major mapping update :D



-Finished custom asm mask routine (although I need to change it a little to draw to any tile once I implement NPCs) Yeah, the routine is kinda poorly written; I'll eventually get around to optimizing it. Don't look! But the important thing is that it works for now lol
-Sprited character and animations
-Optimized/modularized movement code to allow tap-to-face-direction and improved speed with one change.
-Draws black automatically if shifting in non-existent data
-Last, but most definitely not least, implemented seamless map transitions. Remember in the demo and in Embers, in order to change areas you HAD to go through a door or something? No longer; now you don't notice anything when you move from one area to another (well, if you look really closely the grayscale flickers a tiny bit). Effectively, the world the player inhabits is 9216x9216px or 768x768 tiles...That's 589,824 tiles, or over 13,000 screens of world all seamlessly put together. The screenshot shows the character walking around on the edges of 3 areas. It only takes 2kb of RAM to run this mapping system :D

As usual, the build and source can be found in the first post

To-do:
-Collision detection + map switching via portals/doors
-Fix up mask routine
-NPC render engine (then I'll be done with all the overworld stuff...)
Oooohhh my ! Things are coming along faster than I expected.
Are NPCs going to be peudo-objects (i. e., in an array) ?

*Streetwalker thinks it's gonna be better than the original
« Last Edit: November 04, 2012, 01:07:42 pm by Streetwalker »

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #25 on: November 04, 2012, 02:09:52 pm »
Thanks everyone ;D

Streetwalker; yeah.

Sadly, I think I'm going to have to cancel plans for compression of maps. It's quasi-avoidable, but I think we'd see some drastic slowdowns during map switching and a sizable exec size increase. :( sorry guys
« Last Edit: November 04, 2012, 02:10:04 pm by squidgetx »

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #26 on: November 04, 2012, 03:39:46 pm »
So... he got lost while playing checkers? Is that how the story starts? :P Lookin' good! The only thing is that the character is always one tile over to the right, will the map always scroll with the player or will the player have a little box to move around in in the middle of the map/when reaching the edges of maps?

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #27 on: November 04, 2012, 03:43:59 pm »
Yeah, he's always one tile over to the right :P Well, I could move him over a tile, but then he'd be off a little to the left, and this way the sprite routine gets to draw something aligned.

So yeah, the map always scrolls with the player.

Also I take back what I wrote earlier. Compression is still going to be implemented, although the total map area available will go down a bit (to 384x384 tiles which is plenty)

Offline squidgetx

  • Food.
  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Ash: Phoenix- Reboot
« Reply #28 on: November 05, 2012, 08:44:55 pm »
Update!

A lot of changes behind-the-scenes, but nothing really screenshot worthy. RLE compression has been added to the map system, hooray! Each chunk has been reduced to 16x16 instead of the old 24x24, and the overworld tilemap has been reduced to 24x24 (not that you'd notice anything, the world size is still massive at 384x384 tiles). The decompression routine was written in asm, and as a result, the map-transitions are actually less noticeable than they were before! (The map load routine is now writing over 2kb per map load as opposed to before where it was 1kb...And actually that could be optimized. Maybe later). Although the amount of ram needed to host the current map increased, total user ram needed went down because I altered the mask routine to read from archive (or was it like that already? I don't remember. Anyway, right now I'm using 2304+576 bytes of user RAM).

I also threw in collision detection which was laughably easy and am now working on stringing together map infrastructure with warp tiles, npcs, etc.
« Last Edit: November 05, 2012, 08:46:13 pm by squidgetx »

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: Ash: Phoenix- Reboot
« Reply #29 on: November 05, 2012, 08:46:44 pm »
That sounds pretty cool! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!