Author Topic: thydowulays's Complete n00bs guide to Tilemapping in Axe  (Read 15443 times)

0 Members and 1 Guest are viewing this topic.

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: thydowulays's Complete n00bs guide to Tilemapping in Axe
« Reply #15 on: January 29, 2012, 10:27:06 pm »
I like this, it's very well explained
But to make it simpler,
When you use
Code: [Select]
If T
T--
Pt-On()
End
to check if the space is not a zero, you could instead delete that loop and instead define Pic1 as
Code: [Select]
[0000000000000000]->Pic1
[FFFFFFFFFFFFFFFF]
[F0F0F0F0F0F0F0F0]
so it's just
Code: [Select]
Pt-On():)

This works but it also changes the program slightly. The tilemap will move noticeably slower (well maybe not since you're not smoothscrolling) with this since it will be drawing a tile for every 8x8 juncture on the screen. Before, the tilemap would be drawn faster or slower depending on how many tiles are on screen. Both methods have their advantages/disadvantages- basically it's speed vs consistency.
could you attach a source code for this so I don't have to retype it into my calc?
You can copy it into Tokens or SourceCoder and export it that way :)
« Last Edit: January 29, 2012, 10:27:50 pm by squidgetx »

Offline thydowulays

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 184
  • Rating: +12/-1
  • Don't gimme dat lip
    • View Profile
    • Thy Gaming Forum
Re: thydowulays's Complete n00bs guide to Tilemapping in Axe
« Reply #16 on: January 29, 2012, 10:47:24 pm »
@saintrunner Yes I will do that first thing tomorrow morning!

EDIT:@squidgetx Okay, that makes perfect sense, although for n00bs like me, I'm going to keep the !If in the example. But I will be using this instead of !If from now on :)
« Last Edit: January 29, 2012, 10:49:31 pm by thydowulays »
Current Projects:
-Sparta GUI Library: 25% - Alpha Stage
-Grapher - 75% - Beta Stage *on hiatus




Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: thydowulays's Complete n00bs guide to Tilemapping in Axe
« Reply #17 on: January 29, 2012, 11:11:56 pm »
This works but it also changes the program slightly. The tilemap will move noticeably slower (well maybe not since you're not smoothscrolling) with this since it will be drawing a tile for every 8x8 juncture on the screen. Before, the tilemap would be drawn faster or slower depending on how many tiles are on screen. Both methods have their advantages/disadvantages- basically it's speed vs consistency.
Ah, okay, that makes sense.  That must have been the way I saw it at first, and it just stuck.
Thanks for explaining it :D

Offline animaaron

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
Re: thydowulays's Complete n00bs guide to Tilemapping in Axe
« Reply #18 on: April 25, 2015, 05:20:18 pm »
The collision detection isn't working properly for me!!! :(

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: thydowulays's Complete n00bs guide to Tilemapping in Axe
« Reply #19 on: April 25, 2015, 06:10:37 pm »
What are you having problems with? What is your code?

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline animaaron

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 9
  • Rating: +0/-0
    • View Profile
Re: thydowulays's Complete n00bs guide to Tilemapping in Axe
« Reply #20 on: April 26, 2015, 08:39:03 am »
@Sorunome I have more than one tile I want to test for, so instead of writing !If ... I wrote
Code: [Select]
If getKey(1) and (sub(GT,X,Y+8)=0 or sub(GT,X,Y+8)=3)
Y+8->Y
Pause 500
End
And so on for the rest of the arrow keys

When I write this, my sprite doesn't move at all

Offline ben_g

  • Hey cool I can set a custom title now :)
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +125/-4
  • Asm noob
    • View Profile
    • Our programmer's team: GameCommandoSquad
Re: thydowulays's Complete n00bs guide to Tilemapping in Axe
« Reply #21 on: April 26, 2015, 09:08:14 am »
Code: [Select]
If getKey(1) and (sub(GT,X,Y+8)=0 or sub(GT,X,Y+8)=3)
...
Axe doesn't know the order of operations, so it evaluates everything from left to right, meaning that it will check if key 1 is pressed and (sub(GT,X,Y+8)=0 or sub(GT,X,Y+8)) equals 3.
Try this instead:
Code: [Select]
If getKey(1) and (sub(GT,X,Y+8)=0 or (sub(GT,X,Y+8)=3))
Note the extra parentheses around the last conditional.
My projects
 - The Lost Survivors (Unreal Engine) ACTIVE [GameCommandoSquad main project]
 - Oxo, with single-calc multiplayer and AI (axe) RELEASED (screenshot) (topic)
 - An android version of oxo (java)  ACTIVE
 - A 3D collision detection library (axe) RELEASED! (topic)(screenshot)(more recent screenshot)(screenshot of it being used in a tilemapper)
Spoiler For inactive:
- A first person shooter with a polygon-based 3d engine. (z80, will probably be recoded in axe using GLib) ON HOLD (screenshot)
 - A java MORPG. (pc) DEEP COMA(read more)(screenshot)
 - a minecraft game in axe DEAD (source code available)
 - a 3D racing game (axe) ON HOLD (outdated screenshot of asm version)

This signature was last updated on 20/04/2015 and may be outdated