Author Topic: Axe tile mapping! HELP!  (Read 31373 times)

0 Members and 1 Guest are viewing this topic.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe tile mapping! HELP!
« Reply #15 on: November 23, 2011, 10:36:28 pm »
So It seems like I misinterpreted the other guy's tutorial and Im now back to confusion.  :P
« Last Edit: November 23, 2011, 10:37:15 pm by epic7 »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe tile mapping! HELP!
« Reply #16 on: November 23, 2011, 10:37:55 pm »
No. You did not, since I use a slightly faster way to draw a map: If there is a zero, draw no tile. Gives a speed gain :D
I'm not a nerd but I pretend:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe tile mapping! HELP!
« Reply #17 on: November 23, 2011, 10:39:32 pm »
Uh.... So then how does the mapping work?

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe tile mapping! HELP!
« Reply #18 on: November 23, 2011, 10:41:18 pm »
In words:
Loop through the map.
Check if there is a tile.
If there is , subtract 1 from the tile number and draw the tile
end
end
end
I'm not a nerd but I pretend:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe tile mapping! HELP!
« Reply #19 on: November 23, 2011, 10:42:46 pm »
No the part before that with the gdb

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe tile mapping! HELP!
« Reply #20 on: November 23, 2011, 10:44:19 pm »
Oh that.
Just easy: add 1 to all tile numbers then type all the tile numbers in in hexadecimal.
I'm not a nerd but I pretend:

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Axe tile mapping! HELP!
« Reply #21 on: November 23, 2011, 10:45:09 pm »
:.TILE
:Repeat getKey(15)
:[01010101]→GDB1  
:[01000001]
:[01000001]
:[01010101]
:[FFFFFFFFFFFFFFFF]→Pic1
:For(B,0,3)   
:For(A,0,3)   
:{B*4+A+GDB1}→T   
:If T
:T--
:Pt-On(A*8,B*8,T*8+Pic1)   
:End
:End
:End
:DispGraph
:ClrDraw
:End


so this is my code for my tile practice, and as you see it displays a box in the upper left hand corner of the screen, but I can't figure out how to make this a bigger box! What do I adjust?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe tile mapping! HELP!
« Reply #22 on: November 23, 2011, 10:47:42 pm »
Oh that.
Just easy: add 1 to all tile numbers then type all the tile numbers in in hexadecimal.
But it's still the part that confuses me the most

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe tile mapping! HELP!
« Reply #23 on: November 23, 2011, 10:47:53 pm »
Wait, take the data parts out of the loop.
so
(blargh)->pointers
repeat getkey (15)
for a,0,3
etc.

What should you modify?
The map and
:For(B,0,3)      ;max number is number of rows minus one
:For(A,0,3)      ;max number is number of columns minus one
:{B*4+A+GDB1} ;max number is number of columns

Try to make the box 5*5.
« Last Edit: November 23, 2011, 10:50:06 pm by aeTIos »
I'm not a nerd but I pretend:

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: Axe tile mapping! HELP!
« Reply #24 on: November 23, 2011, 10:48:11 pm »
« Last Edit: November 23, 2011, 10:48:25 pm by mrmprog »

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Axe tile mapping! HELP!
« Reply #25 on: November 23, 2011, 10:51:13 pm »
ok so


:.TILE
:[01010101]→GDB1 
:[01000001]
:[01000001]
:[01010101]
:[FFFFFFFFFFFFFFFF]→Pic1
:Repeat getKey(15)
:For(B,0,3)   
:For(A,0,3)   
:{B*4+A+GDB1}→T   
:If T
:T--
:Pt-On(A*8,B*8,T*8+Pic1)   
:End
:End
:End
:DispGraph
:ClrDraw
:End


ok now how do I make a bigger box?
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe tile mapping! HELP!
« Reply #26 on: November 23, 2011, 10:52:44 pm »
So If I had
[border]->Pic1
[grass]

How would I make a simple thing to make a border on the outside and grass on the inside. (just the beginning pic and gdb stuff)

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe tile mapping! HELP!
« Reply #27 on: November 23, 2011, 10:53:07 pm »
Change (for example)
[01010101]

to
[0101010101]

and change
for(a,0,3)
to
for(a,0,4)

and
{B*4
to
{B*5

that does the trick, now try to figure out how it works!



Epic:
It would be (3*3 map)
[010101->GDB1
[010201
[010101
but in this case, there is no whitespace so you could leave the if T:T-- part out and subtract one from your tile numbers.
« Last Edit: November 23, 2011, 10:56:33 pm by aeTIos »
I'm not a nerd but I pretend:

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe tile mapping! HELP!
« Reply #28 on: November 23, 2011, 11:03:49 pm »
So how do you know which 2 numbers to use with the pics?

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe tile mapping! HELP!
« Reply #29 on: November 23, 2011, 11:05:24 pm »
basically if you have empty tiles you add 1 to all numbers and later on use the if T:T-- trick, if you do not, you count from zero and leave if T:T-- out.
I'm not a nerd but I pretend: