Author Topic: Axe Parser  (Read 494060 times)

0 Members and 1 Guest are viewing this topic.

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Axe Parser
« Reply #2025 on: November 04, 2011, 04:50:58 pm »
I feel pretty stupid because i cant even write a decent tilemapper in axe at the moment, so bitmap() will help. My problem is that i'm starting out too advanced. Im trying to make a tilemap with nibbles instead of bytes. Something always goes wrong.

I use nib{}. what's the division/modulus trick?

Code: [Select]
[A3]->GDB1
{GDB1}/256 == A or 3?
{GDB1}^256 == 3 or A?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Parser
« Reply #2026 on: November 04, 2011, 05:16:53 pm »
Try it and see :D

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Parser
« Reply #2027 on: November 05, 2011, 02:02:34 am »
Code: [Select]
[A3]->GDB1
{GDB1}/256 == A or 3?
{GDB1}^256 == 3 or A?
Wouldn't you want to divide by 16 instead of 256 ??? ?
Personally I never use those but I think it is 16.
« Last Edit: November 05, 2011, 02:03:49 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Parser
« Reply #2028 on: November 05, 2011, 02:04:23 am »
If you want to get high/low nibble, /16 is what you want to do.  If you want to get high/low byte, /256 is what you want to do.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Parser
« Reply #2029 on: November 05, 2011, 09:35:43 am »
uh, what does the question mark do?
I'm not a nerd but I pretend:

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Axe Parser
« Reply #2030 on: November 05, 2011, 09:59:26 pm »
Tilemappers are hard until you've written at least six gazillion of them like i have :P I swear i've had to rewrite a tilemapper for every project i've ever done, even the ones that have died...idk why. I really should reuse more code.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Axe Parser
« Reply #2031 on: November 06, 2011, 06:53:50 pm »
Thanks for your help!

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Parser
« Reply #2032 on: November 06, 2011, 08:34:54 pm »
Tilemappers are hard until you've written at least six gazillion of them like i have :P I swear i've had to rewrite a tilemapper for every project i've ever done, even the ones that have died...idk why. I really should reuse more code.

I have no idea what that is, but if you have to create a fake number to describe how many times you've used it, it must be important. :P
I think I should learn that

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Axe Parser
« Reply #2033 on: November 06, 2011, 08:42:06 pm »
lol

A tilemapper is basically a program that lets you edit data in such a way that it makes levels for games really easy to make. I think there's some tilemapping tutorials around...
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



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 Parser
« Reply #2034 on: November 06, 2011, 08:45:08 pm »
Tilemappers are hard until you've written at least six gazillion of them like i have :P I swear i've had to rewrite a tilemapper for every project i've ever done, even the ones that have died...idk why. I really should reuse more code.

I find myself archiving different bits and pieces of some codes as separate programs. Then I reuse them with RCL later on when needed. :)
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Axe Parser
« Reply #2035 on: November 07, 2011, 07:21:38 am »
I just use 2 for loops for my tilemapper XD
Sig wipe!

Offline C0deH4cker

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 258
  • Rating: +11/-1
    • View Profile
    • iNinjas Forum/Repo
Re: Axe Parser
« Reply #2036 on: November 10, 2011, 09:54:21 pm »
I just made a working one with a moving character and x256 precision. Working on jumping and collision detecting. Atm, it is a nibble-based tilemapper. 0 is empty space, and 1 is a block. E is entrance and F is finish. Havent implemented any more tiles yet.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe Parser
« Reply #2037 on: December 01, 2011, 02:46:39 am »
Two things:

First of all, I have been very busy recently so I've had much less time to work on this than in the past.  But the good news is I'm about to have a week off before finals so I'm going to make a promise to release "what I have" by then.  I've fixed almost every bug reported so far and added some new features, both requested, and some I think everyone will find useful.  So expect either 1.1 or 1.0.6 by no later than Dec. 9 depending on how many more things I add.

Second, I've always wanted to include a tilemapper in the language, at least for rendering and collision detection.  Unfortunately, the reason I haven't added this yet is because tilemapping is so specific to games it would be impossible to find one 'universal' solution for everyone's application.  With every extra 'feature' added to a tilemapper, it just makes it larger and slower which you might not want if you just need something simple and fast.

But now I've decided, why not just ask?  What I want to know is how useful some commands for this would be if you had to have just one routine.   Would you actually use it or would you be required to write one yourself because you need something faster or with more features?  So I'm going to compile a list of features in order from smallest/fastest to biggest/slowest.  I want to know what you use in your current games right now, and what you would plan on using in the future.  Let me know the name/names of your Axe games or even assembly game if you happen to be an asm programmer because the same principals apply.

Tiles:
 Byte tiles (256 tiles per set, 1 byte per tile)
 Nibble tiles (16 tiles per set, .5 bytes per tile)
 Compressed tiles (Some type of RLE or something)

Scrolling:
 Static (no scrolling)
 Block (scroll one tile at a time)
 Smooth (scroll one pixel at a time)

Buffer:
 Restrict to buffer (~760 bytes max)
 Any RAM location (~4000 bytes max realistically)
 Any File location (~24000 bytes max)

Color:
 Monochrome (1 buffer)
 3-Color grayscale (2 buffers)
 4-Color grayscale (2 buffers)

Sprite Size:
 8x8 (fixed)
 4x4 (fixed)
 Custom (specifiable)

Obviously I can't just make a compressed 4 color grayscale smooth scrolling tilemapper with custom sized sprites read from archive because it would be very slow, a pain to initialize, huge, and take forever to code.  There are some compromises I can make however, such as Monochrome drawing to a specifiable buffer, meaning you can have 2 tile sets and draw them once to each buffer if you need grayscale, but this is a slightly inconvenient representation for sprites because you have to separate the gray layers into different data sections.  So anyway, lets just say if you had to choose some even distribution of features, what would they be?  And would/could you use this configuration in your current games?

Another thing to keep in mind is that because a majority of the time spent rendering a tilemap is sprite drawing and not the tilemapping itself, any speed increase from this routine will be very tiny compared to if you wrote it in native Axe.  Most of the advantage will come from reduced size of code and simplicity of the programming.

My personal preferences are:
Nibbles, Smooth, RAM, Monochrome, 8x8
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Freyaday

  • The One And Only Serial Time Killing Catboy-Capoeirista-Ballerino
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1970
  • Rating: +128/-15
  • I put on my robe and pixel hat...
    • View Profile
Re: Axe Parser
« Reply #2038 on: December 01, 2011, 02:52:28 am »
What's a tilemapper again?
In other news, Frey continues kicking unprecedented levels of ass.
Proud member of LF#N--Lolis For #9678B6 Names


I'm a performer at heart; I stole it last week.
My Artwork!

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Parser
« Reply #2039 on: December 01, 2011, 03:09:10 am »
Custom sprite size? Could come in handy for my cemetech contest entry...
EDIT: Owait... I did not read the whole post :P
My preferences are:
Bytes, smooth, RAM, monochrome, 5*5/8*8/16*16 (depends on the type of game)

EDIT2:
But eh, couldn't you also create a routine for accessing arrays? such as size([10][12])->str1 for defining the size then using str1[1][6] to access the array? That would be much less hassle to code.
« Last Edit: December 01, 2011, 03:14:22 am by aeTIos »
I'm not a nerd but I pretend: