Author Topic: Streetwalker's RPG engine  (Read 2355 times)

0 Members and 1 Guest are viewing this topic.

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Streetwalker's RPG engine
« on: March 24, 2013, 03:16:31 pm »
Hi !
I've been working on a smooth scrolling grayscale tile mapper for an RPG.
Don't ask info about the game, I'm still trying to find a good storyline.

Features :
-8*8 3 level grayscale tiles
-Pokémon style scrolling
-Hayleia's interrupt gray method for really smooth gray
-Couple ASM routines for fast horizontal scrolling
-The code is as optimized as I can alone. It's very fast and fits in 2.4k (speed optimized).
-8 frames walking animation + 4 directions for the character implemented but not visible since I put the same sprite 32 times.

To try it, send both progs to your calc, run MAP to create the data appvars then ATILE.
The source is in the SRC dir (the assembly routines are in THEGAME.z80 and compiled as an Axiom). Never mind the empty makefile. :P I was about to set it up but I didn't.

The gray actually looks better on calc. ;) You may want to calibrate it : change the value of Z under Lbl INTI).
Hold Alpha to run.
« Last Edit: March 24, 2013, 03:59:16 pm by Streetwalker »

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Streetwalker's RPG engine
« Reply #1 on: March 25, 2013, 06:13:12 am »
That looks great o.o Is that 6MHz or 15MHz?

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Streetwalker's RPG engine
« Reply #2 on: March 25, 2013, 08:15:50 am »
It runs at 6 mhz. I'd like to keep compatibility with the 83+BE. It's actually slowed down unless you run, which just removes the delay. Full speed gives insane scrolling speed. :P
To do :
-Chunk handling
-Scripting engine
-NPC handling on the map (rendering + collision)
-Battle engine (I have some pretty neat ideas including a research system for spells instead of learning on level-up)
« Last Edit: March 25, 2013, 08:25:57 am by Streetwalker »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Streetwalker's RPG engine
« Reply #3 on: April 05, 2013, 10:30:29 am »
Can someone help me optimize the quad buffering renderers ? I feel it's not optimal at all (even though I spent quite some time on them).

Code: [Select]
:Lbl LIN
:-4→r6
:r1*°MAPW+X+MPTR-6→r5
:For(13)
:¦ Pt-Off(r6,-4,{r5}*16+TPTR→r4,L1)
:¦ Pt-Off(r6,-4,r4+8,L1+144)
:¦ Pt-Off(r6,4,{r5+°MAPW}*16+TPTR→r4,L1)
:¦ Pt-Off(r6,4,r4+8,L1+144)
:¦ r5++
:¦ r6+8→r6
:End
:Return
:
:Lbl COL
:-4→r6
:Y-4*°MAPW+r1+MPTR→r5
:For(9)
:¦ Pt-Off(-4,r6,{r5}*16+TPTR→r4,L1
:¦ Pt-Off(12,r6,r4+8,L1
:¦ Pt-Off(4,r6,{r5+1}*16+TPTR→r4,L1
:¦ Pt-Off(20,r6,r4+8,L1
:¦ r5+°MAPW→r5
:¦ r6+8→r6
:End
:Return

These routines are basically speed optimized tile mappers that respectively draw two rows or columns (respectively).
« Last Edit: April 06, 2013, 05:34:23 am by Streetwalker »

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: Streetwalker's RPG engine
« Reply #4 on: May 10, 2013, 07:25:14 am »
I recently started an ASM rewrite of this, you can find the source on GitHub here.
I'll try to keep you updated on progress here. Right now, I'm trying to write the tilemapper sprite routines and this is going pretty well.