Author Topic: Axe Parser  (Read 551901 times)

0 Members and 2 Guests are viewing this topic.

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 #2040 on: December 01, 2011, 03:20:36 am »
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.

Wait is your tilemapper just going to use the built in sprite display routine?  Because displaying tilemaps by looping around a sprite command is going to be just as slow as Axe (which is reallly slow).  There are much more optimized ways to do tilemapping that would be loads faster than the way you can do it in Axe.  I had a discussion with Calc84maniac earlier and he has some really good ideas and methods for making insane fast tilemappers, maybe you can talk to him?

And my preference would be:
Byte: Because limiting a tilemap to only 16 sprites seems like a bit *too* limiting to me
Smooth: Because all other types are easy and fast in Axe
RAM: Because its easy to set up, and tilemaps can span all of RAM if you really needed them to (App with appvar map)
Monochrome: Assuming you can draw to arbitrary buffers, there wouldn't be too much loss of functionality
8x8: Because 4x4 is barely ever used, and arbitrary sprite size would be way too slow.  16x16 might be a better option that 4x4 too, although I think 8x8 is still the best solution.

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 #2041 on: December 01, 2011, 04:41:06 am »
Hmm... I guess that's true.  I'm using the exact same type of optimization for the new bitmap command (which technically you can think of as a 1x1 smooth scrolling tile mapper, and it can actually be easily used for this purpose :P).  Its just that although the routine will be insanely fast, maybe up to a 2 times speed up, it will also be insanely large.  Just the subroutine of the bitmap command is already 210 bytes and the tilemapper would end up at least that size I'm sure.

Thinking about this again, I might make this an offical included Axiom like Memkit because then it could include multiple versions, convenient tokens, and use the Axiom variables for optimization...
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Parser
« Reply #2042 on: December 01, 2011, 10:34:20 am »
I generally end up using:
Byte tiles (Essence is the exception)
Smooth scrolling
Any RAM Location (this would mean pointers would work?)
Monochrome
4*4 tiles (could be just me, but pretty much every single platformer project of mine is 4*4 tiles XD)

Sounding epic, or should I say, "1337"
(137th page :P)
Vy'o'us pleorsdti thl'e gjaemue

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Axe Parser
« Reply #2043 on: December 01, 2011, 03:16:01 pm »
Byte, Free RAM, Monochrome, 8*8 sounds the best to me.

I agree that this should be an Axiom; it's "too higher level" in my opinion to be a regular Axe command.

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 #2044 on: December 01, 2011, 05:16:36 pm »
And Axioms could give you higher flexibility too, while still keeping speed up.  For example you could have 2 different Axioms for 4x4 vs 8x8

Offline ikemike

  • LV3 Member (Next: 100)
  • ***
  • Posts: 67
  • Rating: +4/-0
  • Hmm.
    • View Profile
Re: Axe Parser
« Reply #2045 on: December 01, 2011, 07:12:27 pm »
EDIT: Answered in chat.
« Last Edit: December 01, 2011, 07:14:34 pm by ikemike »
Anonymous Legend

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Parser
« Reply #2046 on: December 02, 2011, 01:09:01 pm »
Huh?
Maybe you should keep your question and the answer here.
I'm not a nerd but I pretend:

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Axe Parser
« Reply #2047 on: December 02, 2011, 10:10:54 pm »
Tiles: Byte or nibbles compressed with RLE. It really depends on the game.
Scrolling: Smooth. Always smooth-scrolling, but the number of pixels scrolled at a time varies.
Buffer: 768. It's a convenient number even when I'm not dealing with a screen.
Color: Three-color grayscale.
Sprite size: 5x5, 8x8, and 8x12 are my most common sizes.
« Last Edit: December 02, 2011, 10:12:41 pm by Deep Thought »




Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Axe Parser
« Reply #2048 on: December 09, 2011, 12:09:49 am »
Hmm, on the smooth scrolling thought: What about having arbitrary-sized (or large but fixed) graphics buffers, which you can draw a portion of which you point to? As in:

DispGraph(X,Y,Buf) would draw a 768-byte section of Buf, starting with X,Y as the top-left. Edge detection would be in-code, or it could even loop. Whichever. That way, you could tilemap or hand draw an entire area, very easily implement smooth scrolling and parallax effects, among various other features.

BBC Basic does it that way, but only has one graphics screen. The actual buffer is somewhere in the 32768x32768 range or higher, I don't really remember.

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Axe Parser
« Reply #2049 on: December 09, 2011, 12:23:03 am »
Actually BBCBasic uses a 768 byte buffer (the manual is a little ambiguous). It is just that coordinates range from -32768 to 32767 (I think). Commands are just scaled and clipped to that buffer according to some settings. Also, a buffer that big would never even fit in ram and rom combined (2^16 * 2^16 / 2^3 = 2^29 bytes > a theoretical maximum of 2^22 bytes (assuming there were actually 256 separate pages, which is not even close to true)).
Edit: Kind of like how TIOS does it, with a ridiculous graphing area, but a small viewing window.
« Last Edit: December 09, 2011, 12:26:45 am by jacobly »

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Axe Parser
« Reply #2050 on: December 09, 2011, 12:25:11 am »
That's too bad :(

Still, I liked the ability to draw as if there were. Also, it was *just* clipping, not scaling. The scaling occurs because the virtual screen res is 320*240 or thereabouts (depends on your MODE setting)

Offline jacobly

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 205
  • Rating: +161/-1
    • View Profile
Re: Axe Parser
« Reply #2051 on: December 09, 2011, 12:53:34 am »
Quote from: BBC BASIC.chm (Topic GBUF)
All drawing operations operate on a 768 byte buffer in memory.
So there *must* be scaling if there are more than one logical unit (coordinate) per physical unit (pixel).
« Last Edit: December 09, 2011, 01:03:12 am by jacobly »

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 #2052 on: December 10, 2011, 08:11:50 am »
I know I said I'd release it tonight, but I think it will have to wait until the morning.  I crossed every single thing off the list that needed to be done except for one thing which came up recently, which is the tilemap sprite format bug.  That and updating the doc/commands list.  I won't have time for table stuff until the next release, but everything else should be in this one as well as some other really cool features.  One thing I just added; you can now easily write a tiny program that can print its own source code using a more general var absorption (which used to be limited to just picture vars).  No you can can import Pics, Programs, Appvars, and Strings directly into the executable!

Anyway, its past 5am here now so I have to get to bed.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Parser
« Reply #2053 on: December 10, 2011, 08:50:36 am »
Release what?
* epic7 is expecting something awesome

Offline Anima

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 133
  • Rating: +4/-0
    • View Profile
Re: Axe Parser
« Reply #2054 on: December 10, 2011, 09:02:27 am »
Release what?
* epic7 is expecting something awesome
I think he will release a new version of Axe Parser.


Sorry for my bad English. I'm German.