Author Topic: I: VP tilemap help!  (Read 8126 times)

0 Members and 2 Guests are viewing this topic.

Offline c.sprinkle

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 221
  • Rating: +23/-1
  • There ain't no rest for the wicked? True indeed.
    • View Profile
    • The Corread on NationStates.
I: VP tilemap help!
« on: January 11, 2011, 05:28:42 pm »
Tilemap Problems:

1). What Format To Use
Option 1: Scroll 8 pixels at a time only when you reach the edge of the screen. The easiest, but it won't look as nice.
Option 2: Scroll 1 pixel at a time when you reach the edge. I would need to work that out a little more fully.
Option 3: Scroll 1 pixel at a time when 8 pixels from the edge. Beautiful, but I need some help with learning to do that.

2). How can I scroll without clearing the screen?

3). I would like better wall sprites. . .
« Last Edit: January 11, 2011, 05:28:55 pm by c.sprinkle »

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: I: VP tilemap help!
« Reply #1 on: January 11, 2011, 05:55:32 pm »
1)  well, its easier and looks pretty good if you only move the map and keep the character on the center of the screen.
2) You'll have to use a map display routine.  I can give you a specific example or someone else could if you elaborate more.  (I'm also interested in tilemapping routines from other people if they don't mind sharing.  I don't think mine's very efficient  :P)
3) same here.  :P  You don't really always need a wall though...

EDIT:  for #2, update the screen only when you move or when there is a moving person or something.  ;)
« Last Edit: January 11, 2011, 05:58:12 pm by yunhua98 »

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline FinaleTI

  • Believe in the pony that believes in you!
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1830
  • Rating: +121/-2
  • Believe in the pony that believes in you!
    • View Profile
    • dmuckerman.tumblr.com
Re: I: VP tilemap help!
« Reply #2 on: January 11, 2011, 06:15:55 pm »
For map formats, if you aren't using greyscale (which I believe you are), I can do some pretty wacky stuff with pics.


Spoiler For Projects:

My projects haven't been worked on in a while, so they're all on hiatus for the time being. I do hope to eventually return to them in some form or another...

Spoiler For Pokemon TI:
Axe port of Pokemon Red/Blue to the 83+/84+ family. On hold.

Spoiler For Nostalgia:
My big personal project, an original RPG about dimensional travel and a few heroes tasked with saving the world.
Coding-wise, on hold, but I am re-working the story.

Spoiler For Finale's Super Insane Tunnel Pack of Doom:
I will be combining Blur and Collision Course into a single gamepack. On hold.

Spoiler For Nostalgia Origins: Sky's Story:
Prequel to Nostalgia. On hold, especially while the story is re-worked.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: I: VP tilemap help!
« Reply #3 on: January 11, 2011, 06:22:37 pm »
2) You could try using the Horizontal and Vertical commands, then displaying only the necessary sprites to draw on the side that you need to fill.  I think Runer's uber-optimized tilemapper uses that method, although I personally haven't had the fortitude to attempt coding such a thing...
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline c.sprinkle

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 221
  • Rating: +23/-1
  • There ain't no rest for the wicked? True indeed.
    • View Profile
    • The Corread on NationStates.
Re: I: VP tilemap help!
« Reply #4 on: January 11, 2011, 07:06:16 pm »
Yeah, I guess I'll try that. Now for more reliable collision detection. . .

Ashbad

  • Guest
Re: I: VP tilemap help!
« Reply #5 on: January 11, 2011, 07:15:07 pm »
one thing that improved trio and niko's framerate from about 5fps to 45 fps was by only redrawing the screen WHEN YOU ABSOLUTELY HAVE TO.  If the screen doesn't scroll or the map doesn't change, then just store the buffer to the back buffer using storepic and then recallpci when no redraw is nessicary.

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: I: VP tilemap help!
« Reply #6 on: January 11, 2011, 07:18:51 pm »
Or just don't update the screen at all until you move.

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Ashbad

  • Guest
Re: I: VP tilemap help!
« Reply #7 on: January 11, 2011, 07:26:47 pm »
well, even wen your moving, if the screen doesn't scroll, no need to re-map :P

Offline c.sprinkle

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 221
  • Rating: +23/-1
  • There ain't no rest for the wicked? True indeed.
    • View Profile
    • The Corread on NationStates.
Re: I: VP tilemap help!
« Reply #8 on: January 12, 2011, 01:52:59 am »
Yup, I'll only redraw when I scroll. And even then, I'll just use Horizontal and Vertical commands and then redraw the new tiles. It's fast right now, though. My battle engine is coming along well, too.  :)

Offline c.sprinkle

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 221
  • Rating: +23/-1
  • There ain't no rest for the wicked? True indeed.
    • View Profile
    • The Corread on NationStates.
Re: I: VP tilemap help!
« Reply #9 on: January 13, 2011, 04:33:44 pm »
Look, a double post! (It's been more than 6 hours.)

For some reason I can't make store more than 110 bytes of data to one GDB location in Axe. Anyone know how to fix that?

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: I: VP tilemap help!
« Reply #10 on: January 13, 2011, 04:40:10 pm »
well, even wen your moving, if the screen doesn't scroll, no need to re-map :P

in my RPG, your character is fixed, and it always scrolls when you move.

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

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: I: VP tilemap help!
« Reply #11 on: January 17, 2011, 03:48:40 pm »
For scrolling the trick is to shift the screen content in the direction you want to scroll and only draw the new line of tiles instead of redrawing the entire 13x9 tilemap every frame. In a side-scrolling game (left-rigth only) I wonder if it's faster to simply move the content of L6 one byte up/down, though, then simply display the new line of sprite afterward.

Offline c.sprinkle

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 221
  • Rating: +23/-1
  • There ain't no rest for the wicked? True indeed.
    • View Profile
    • The Corread on NationStates.
Re: I: VP tilemap help!
« Reply #12 on: January 17, 2011, 06:10:53 pm »
Just wondering:
Ashbad, Squidget, how do you do the enemy moving routines?
I have an idea, but I'm not sure if it will work. . .  ???

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: I: VP tilemap help!
« Reply #13 on: January 17, 2011, 06:35:37 pm »
My enemies don't move in the overworld; the battles are more like pokemon :P

I would probably have a max number of enemies onscreen (lets say 4) then a byte determining what type, 2 bytes for x and y position, maybe a byte for health, and then randomly increment x,y positions. But I thought you were going turn based battle style?

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: I: VP tilemap help!
« Reply #14 on: January 17, 2011, 06:38:58 pm »
Well since he can swing a sword in the overworld, I guess he can.  TaN:F has overworld enemies though.

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>