Author Topic: [Tutorial] Tilemaps in Axe Basic  (Read 49085 times)

0 Members and 1 Guest are viewing this topic.

Offline MRide

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 711
  • Rating: +14/-0
  • You can't see this.
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #75 on: July 26, 2010, 11:55:31 pm »
Is it supposed to do the following?

Uh...that's not right.  That's only a 2*4 map.  The data was for a 4*4 map.  I think one of the things that is confusing people (especially me) is the numbers used.  If the numbers are all the same (dimension of tiles and map), then we can't tell where those came from.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #76 on: July 27, 2010, 12:10:49 am »
hmm... this works on my calculator:

Code: [Select]
.A
[11111111->GDB1
[10011001
[10100101
[11111111
[0000000000000000->Pic1
[FFFFFFFFFFFFFFFF
For(Y,0,3
For(X,0,3
{Y*4+X+GDB1}->A
Pt-On(X*16,Y*8,A/16*8+Pic1
Pt-On(X*16+8,Y*8,A^16*8+Pic1
End
End
DispGraph

edit: i'm not sure which parts would be confusing to people, so i left out anything unnecessary. i'll respond best i can to anyone who posts though
« Last Edit: July 27, 2010, 12:29:10 am by nemo »


Offline MRide

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 711
  • Rating: +14/-0
  • You can't see this.
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #77 on: July 27, 2010, 12:25:29 am »
That same code gives me alternating black and white stripes of 8*32 pixels.  (and there are eight stripes)

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #78 on: July 27, 2010, 12:33:16 am »
hmm that's partially good, because the map's dimensions match the dimensions you described (8 8x32 stripes means the map is 64 pixels wide by 32 high, divide that by eight (the size of the tiles) and you get 8 tiles wide by 4 tiles high).

i think i found the bug. are you sure that the following line is typed correctly on your calculator?
Code: [Select]
Pt-On(X*16+8,Y*8,A^16*8+Pic1

because if you forgot the +8, you end up with alternating lines as you said.

Offline MRide

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 711
  • Rating: +14/-0
  • You can't see this.
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #79 on: July 27, 2010, 12:38:51 am »
Oh. wow......
Thanks. this whole thing was driving me crazy (sitting in a Dairy Queen with my calc, no access to a computer, and randomly changing numbers)
Sorry you had to track down the bug.  My mind doesn't seem to work right late at night.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #80 on: July 27, 2010, 12:51:32 am »
oh it's no problem. now i'm getting myself started on how to smooth scroll a half byte tilemap...


SirCmpwn

  • Guest
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #81 on: July 27, 2010, 10:58:08 am »
Wow, that one was tough.  What you have to do is draw an extra row and column, and then offset them all by the scroll value, and use the scroll value / 16 for the X offset, and the scroll value / 8 for the Y offset.

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: [Tutorial] Tilemaps in Axe Basic
« Reply #82 on: July 29, 2010, 03:10:56 am »
It would be nice to have a tutorial on how to do it. Something that is a bit visual with simple examples maybe, and maybe an example with single-byte so people can see the difference. Smooth scrolling is generally not too hard when you get used to modulus (if you redraw the entire tilemap every frame), but I am not sure how it works when using Horiz, variable scrolling speeds (like in Supersonic Ball) or half-bytes. Would it be fast enough for the regular 83+?

SirCmpwn

  • Guest
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #83 on: July 31, 2010, 11:50:36 am »
From my experience, it is not fast enough to use on a regular 83+.  It may be feasible, however, to use it in a casual game, where the tilemapping speed has little impact on the gameplay, such as Pokemon.

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: [Tutorial] Tilemaps in Axe Basic
« Reply #84 on: August 01, 2010, 12:48:54 pm »
Aaah ok. I guess it would be best to keep for RPGs if done on 83+ then. That said, half-byte scrolling in RPGs is almost a must in RPGs with simpler maps (16 tiles or below, for example), since it decreases the file size considerably

Offline collechess

  • LV3 Member (Next: 100)
  • ***
  • Posts: 93
  • Rating: +22/-2
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #85 on: May 18, 2011, 05:31:06 pm »
In
Code: [Select]
Lbl GT  ; X position in S, Y position in T.  Returns tile
S/7->S  // Swap 7 for the size of your tiles
T/7*7->T  // Yes, I know it is /7*7.  Leave it that way.  Unless you don't have 7x7 tiles, in which case you should change the values accordingly
If S^2
{(S/2)+T+GDB1}^16
Return
End
{(S/2)+T+GDB1}/16
Return
How do you access the value of the tile?

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: [Tutorial] Tilemaps in Axe Basic
« Reply #86 on: May 18, 2011, 05:34:43 pm »
Not trying to put Sir down, since he's an awesome coder, but this tutorial is outdated and the last post here was early August.  It may not work with current versions of Axe.

Try this tile mapping tutorial.  ;)

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 squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #87 on: May 19, 2011, 07:14:25 am »
Who stickied this? It's already listed in the tutorials thread :P

SirCmpwn

  • Guest
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #88 on: June 30, 2011, 01:21:13 pm »
This tutorial is outdated, but it still works fine for newer versions of Axe.

Offline nikitouzz

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 215
  • Rating: +22/-1
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #89 on: July 17, 2012, 01:24:11 pm »
where is sircmpwn ?  :o
« Last Edit: July 17, 2012, 01:24:24 pm by nikitouzz »
mes records personels :

2x2x2 : 2.18 secondes / 2x2x2 une main : 21.15 secondes / 2x2x2 yeux bandés : 47.59
3x3x3 : 5.97 secondes / 3x3x3 une main : 49.86 secondes
4x4x4 : 1.49 minutes / 4x4x4 une main : 6.50 minutes
5x5x5 : 4.10 minutes / 5x5x5 une main : 18.02 minutes
6x6x6 : 8.10 minutes
7x7x7 : 16.03 minutes
9x9x9 : 58.26 minutes

megaminx : 5.59 minutes / pyraminx : 7.91 secondes / square-one : 1.07 minutes