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

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55898
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #60 on: April 18, 2010, 05:34:11 pm »
yeah I kinda agree with AP. I think it's best to add a limit so the user won't need to code it himself. If he wants a greater limit then he just change a number. Less risks of messing up

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #61 on: April 18, 2010, 06:11:26 pm »
What does a tilemapper do exactly?
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #62 on: April 18, 2010, 06:18:21 pm »
It basically reads map information (stored however the tilemapper wants) and then displays a map on the screen based on that information.
Usually contains scrolling or map changing if scrolling isn't supported.
« Last Edit: April 18, 2010, 06:19:16 pm by {AP} »

_player1537

  • Guest
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #63 on: April 18, 2010, 06:21:25 pm »
it basicly just scrolls an 8x8 tile map, Pic3 holds the actual data for the tiles, pic4 holds the sprite you use.  so if the Pic3 says 0, it will use the first sprite in Pic4.  If it says 1, it will use the next sprite in pic4.  I'm pretty sure it is like Sir's, but I'm not sure if his scrolls.  yeah, I probably should have added a limit to the Y movement, but wasn't sure what it should be (and wanted it variable without actually using a variable, ie I'd like to change something at the beggining of the program instead of deep inside the program, without using a different variable, eh oh well).  give me a sec to update the code with a Y limit of 8.

Edit: beaten to it
« Last Edit: April 18, 2010, 06:21:49 pm by _player1537 »

Offline {AP}

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 981
  • Rating: +74/-3
  • I am Webmaster!
    • View Profile
    • Removed From Game
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #64 on: April 18, 2010, 06:24:06 pm »
Thanks, _player.
Sorry, if I sounded kinda like an asshole in my message, but it kinda had to be said.
I still thank you for the contribution. Minus the bug, it looks great.

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #65 on: April 18, 2010, 06:27:55 pm »
Ah ok, I think I get it then. That's cool. Thanks, both of you, for explaining :)
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55898
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #66 on: April 18, 2010, 06:41:30 pm »
Some programmers starts programming games by hardcoding collision detections. In some cases this works OK but in the end your code becomes massive because you have an entire program for per room and some rooms are considerably slower. I wonder if that's what games like Final Fantasy VII, VIII, Legend of Dragoon and Star Ocean 2 do
« Last Edit: April 18, 2010, 06:45:14 pm by DJ Omnimaga »

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #67 on: June 01, 2010, 07:49:18 pm »
i don't understand how this routine gets a tile. could someone explain it in depth?

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
sorry for bringing up an old post, but it seems like a useful topic to keep alive anyway.


SirCmpwn

  • Guest
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #68 on: June 05, 2010, 09:01:37 am »
Well, Axe doesn't support floating point numbers, or numbers with a decimal.  Therefore, if you have 7x7 tiles, dividing it by 7 will return the tile number, instead of the pixel number.  Then, {(S/2)+T+GDB1}^16 returns the second nibble, and {(S/2)+T+GDB1}/16 will return the first nibble.

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #69 on: June 05, 2010, 10:09:46 am »
For the half byte tilemap, you can only display total of 16 sprites per map, even if the sprite size is less than 8*8, right?
And for the one byte tilemap, can you display total of 16*16 sprites? (too lazy to do math :P)
How big are the data in the Axe tho? Like, let's say I want 30x50 map with one byte tilemap. How much memory does it take?


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

_player1537

  • Guest
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #70 on: June 05, 2010, 10:20:48 am »
30x50, 1500 bytes.  for the first question and the second, yes.  
Edit: fail, 30x50 is 1500 not 150 woops :P
« Last Edit: June 05, 2010, 10:23:14 am by _player1537 »

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #71 on: June 05, 2010, 10:46:22 am »
oh okay, and the half-byte 30X50 would be 750... lol i got it^^
I thought it would be more, like how in BASIC the matrix is huge :/


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55898
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #72 on: June 07, 2010, 04:38:32 am »
Btw I think Kindermoumoute would appreciate if someone could translate this tutorial into French. I could maybe do it but I suck at grammar and the french I would use isn't always understandable by non-Canadian users (the reason why I almost always speak English with Silver Shadow and Lionel Debroux, despite all of us speaking French as native language) :(

http://ourl.ca/4881/93140
« Last Edit: June 07, 2010, 04:39:23 am by DJ Omnimaga »

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #73 on: July 17, 2010, 06:19:52 pm »
Hey Sir, any chance of this thing maybe getting updated or anything? Just curious :)
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline DJ Omnimaga

  • Former TI programmer
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55898
  • Rating: +3152/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: [Tutorial] Tilemaps in Axe Basic
« Reply #74 on: July 19, 2010, 08:15:58 pm »
I think this was discontinued because he was working on a bigger and better tutorial including that stuff. However, I have some doubts it will be worked on soon, judging he last said that months ago and that he now focuses on his OS, IDE and maybe will revive his contest entry or something