Author Topic: Xlib-CelticIII TILE MAPPINGGGG!!!  (Read 3287 times)

0 Members and 1 Guest are viewing this topic.

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Xlib-CelticIII TILE MAPPINGGGG!!!
« on: June 17, 2009, 03:15:57 pm »
Okay, so i'm trying to make a platform game. and making a matrix to store the map in the program.. is very very large. And im pretty sure Strings would be easier. so here are my questions/options

First. make a string into a Matrice... HOW?

Second. the Celtic option.. *forgot exact name. but it uses a BINSTR instead of a Matrice*.. Can anyone tell me how that works?

Or.. any other suggestions?

*I might just make 1 BIGGG Map and have it scroll, or.. hit the end of the screen, and make myself appear in the other.. map.

Offline simplethinker

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 695
  • Rating: +16/-5
  • snjwffl
    • View Profile
Re: Xlib-CelticIII TILE MAPPINGGGG!!!
« Reply #1 on: June 17, 2009, 04:30:36 pm »
Okay, so i'm trying to make a platform game. and making a matrix to store the map in the program.. is very very large. And im pretty sure Strings would be easier. so here are my questions/options

First. make a string into a Matrice... HOW?

Second. the Celtic option.. *forgot exact name. but it uses a BINSTR instead of a Matrice*.. Can anyone tell me how that works?

Or.. any other suggestions?

*I might just make 1 BIGGG Map and have it scroll, or.. hit the end of the screen, and make myself appear in the other.. map.
If this is for the contest, we can't help you with #1 (turn string into matrix).  We can, however, explain how Celtic III's tilemapper works.

"Binary string" isn't quite the best choice of words.  For a tilemapper, each sprite is represented by a number, which is the entry in the matrix for xLIB's tilemapper.  Celtic III's string tilemapper uses the elements of the given string as these numbers.  It allows you to use tiles numbered from 0-255.

If you were to use base-10 numbers in the string, you would need three digits for element.  By converting those numbers to hexadecimal you make it two digits for each element (thereby cutting 33% off the size).  Each number from 0-255 also designates a token on the calculators, so by using those tokens instead of hex digits you're again cutting one digit per element.  This string of tokens (or "binary string") requires one byte per element, whereas the "hex string" requires two bytes, and a decimal string would require three bytes.

Does that make any more sense?
« Last Edit: June 17, 2009, 04:45:30 pm by simplethinker »
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the Internet, we know this is not true." -- Professor Robert Silensky



Chip's Challenge: ħ%

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Xlib-CelticIII TILE MAPPINGGGG!!!
« Reply #2 on: June 17, 2009, 04:32:03 pm »
No, i have decided not to submit it.. well first. I changed it from a platform.. to more of a Illusiat style. And im not going to submit it anymore either.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: Xlib-CelticIII TILE MAPPINGGGG!!!
« Reply #3 on: June 17, 2009, 06:38:15 pm »
ah well in that case I will post some code that for you that will show you how to change a string to a matrix and a matrix to a string wait for the edit
EDIT: ok this takes a string of any length and converts it into a matrix, this allows for 37 different tiles
Code: [Select]
:{Y,X→dim([A]
:For(A,1,16)
:For(B,1,22)
:inString("123456789ABCDEFGHIJKLMNOPQRSTUVWXYZθ",sub(Str1,XA+B-X,1
:Ans→S
:S→[A](A,B
:End:End
this one converts a matrix of any size and puts it into a string
Code: [Select]
:" →Str1
:For(A,1,Y)
:For(B,1,X)
:1+[A](A,B→S
:Str1+sub("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZθ",S,1→Str1
:End
:sub(Str1,2,length(Str1)-1→Str1
« Last Edit: June 17, 2009, 06:53:17 pm by Eeems »
/e

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: Xlib-CelticIII TILE MAPPINGGGG!!!
« Reply #4 on: June 17, 2009, 11:29:35 pm »
moved to Calc help and support

Offline Ti-newb

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 180
  • Rating: +3/-0
    • View Profile
Re: Xlib-CelticIII TILE MAPPINGGGG!!!
« Reply #5 on: June 18, 2009, 09:32:27 am »
Hey Eeems. thanks for that converter. but i don't really understand it and Simple already explained to me HEX. and BIN. and then the use of STRINGTILE. so i'm going to use STRINGTILE..