Author Topic: Axe Q&A  (Read 600354 times)

0 Members and 3 Guests are viewing this topic.

Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
Re: Axe Q&A
« Reply #300 on: May 17, 2011, 02:29:12 pm »
I have a question, what is the x256 mode and can someone give me an example?

I have no idea of how to use it and would like to learn, can I have a sample? Thanks
256 mode?? Whoa.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #301 on: May 17, 2011, 03:41:51 pm »
Its not a mode, but more like a style of programming that gives you more precision.  The idea is that you multiply your position variables by 256 to give you a screen that is 256 times as big (and consequently has a *lot* more possible positions and a lot more precision) and then when you display your sprites you "zoom" back out by dividing by 256.

This has been written about a lot, I'm sure there has got to be a tutorial about this somewhere, or at least a more in depth explanation.

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 Q&A
« Reply #302 on: May 17, 2011, 11:06:54 pm »
The multiply by 256 thing has another name too that I'm sure you've seen: 8.8 Fixed Point. :)  Good luck!

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 Q&A
« Reply #303 on: May 17, 2011, 11:10:17 pm »
Is there a way to use the ON key?
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 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 Q&A
« Reply #304 on: May 17, 2011, 11:13:37 pm »
Yes.
getKey(41) will do it. :)
By the way, here's a nifty link: http://julosoft.net/ti/getkey.php

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 Q&A
« Reply #305 on: May 17, 2011, 11:14:37 pm »
getkey(41) is the keycode, but it doesn't register.
Nvm, I've eaten my words.
« Last Edit: May 17, 2011, 11:40:52 pm by Freyaday »
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 BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
Re: Axe Q&A
« Reply #306 on: May 18, 2011, 12:58:43 pm »
Its not a mode, but more like a style of programming that gives you more precision.  The idea is that you multiply your position variables by 256 to give you a screen that is 256 times as big (and consequently has a *lot* more possible positions and a lot more precision) and then when you display your sprites you "zoom" back out by dividing by 256.

This has been written about a lot, I'm sure there has got to be a tutorial about this somewhere, or at least a more in depth explanation.
Maybe I can fix my engine's "/\" jump. Not before I get a freaking tilemap routine.
* BrownyTCat has lost several brain cells trying to tilemap.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #307 on: May 18, 2011, 01:09:24 pm »
Is it a scrolling tilemap?

Offline BrownyTCat

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 420
  • Rating: +37/-8
    • View Profile
Re: Axe Q&A
« Reply #308 on: May 18, 2011, 01:14:33 pm »
Is it a scrolling tilemap?
Yes. I saw the tutorial, but it's hard to implement in a platformer game.

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #309 on: May 18, 2011, 01:41:35 pm »
Okay, so I saw this screenie, and I would like to know how Builderboy makes the box hanging at the rope.
Anyone knowing this?
« Last Edit: May 18, 2011, 01:41:56 pm by aeTIos »
I'm not a nerd but I pretend:

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 Q&A
« Reply #310 on: May 18, 2011, 03:54:19 pm »
He can't share any source code until the contest is over; that is his entry
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 Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Axe Q&A
« Reply #311 on: May 18, 2011, 03:55:11 pm »
I seriously have no idea how in Earth he freaking made that, seriously.

He can't tell you though.

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Axe Q&A
« Reply #312 on: May 18, 2011, 03:56:53 pm »
You could look at his Chainfire library, and see if he has similar code.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Axe Q&A
« Reply #313 on: May 19, 2011, 12:59:25 pm »
I have a question, I just made my first program to try and learn acceleration and more about physics.

here's my problem though:

Code: [Select]
0→Y
5→X
Repeat getKey(15)
  ClrDraw

  Line(0,63,95,63)
  Pxl-On(X,Y/256)

  If (pxl-Test(X,Y+1)=0)
    Y+128→Y
  End

  DispGraph
End

That's a little tiny dot but it doesn't move down as it was supposed to (due to gravity).

Any idea of what I'm doing wrong?

Thanks

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 Q&A
« Reply #314 on: May 19, 2011, 01:12:09 pm »
pxl-Test(X,Y+1) should be pxl-Test(X,Y/256+1)

Also you can save a lot of memory by doing !If pxl-Test(X,Y/256+1) instead of If (pxl-Test(X,Y/256+1)=0).