Author Topic: Graviter  (Read 165966 times)

0 Members and 1 Guest are viewing this topic.

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #255 on: March 10, 2011, 01:54:40 am »
Could I achieve the same effect doing something like

{L2}r/256*256-->{L2}r?

I don't quite understand how yours works.
In-progress: Graviter (...)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Graviter - Axe
« Reply #256 on: March 10, 2011, 01:57:47 am »
not quite, since that makes the variable smaller, when you want to be making it larger.  adding 255 would work though.

If this: 23.156 is your Y value, you are on the 23rd pixel, and 156/256 the way down the pixel.  We want to be at the very bottom, we want to be at 23.255, so we want to set the second half to 255.  We can do OR 255, we can try /256*256+255, or 255->{oY}. whatever we like

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #257 on: March 10, 2011, 01:59:12 am »
Ah I think I see now. I'll try this when I have time.
Is the o symbol the same one in the section with the r token? I'll try it and if it doesn't work I'll use your other method.
In-progress: Graviter (...)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Graviter - Axe
« Reply #258 on: March 10, 2011, 02:00:41 am »
yeah, its the symbol used to find the address of the Y variable, that way I can set the specific byte that corosponds to it

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #259 on: March 10, 2011, 02:06:47 am »
Wait so how does the Or work? I thought it's a boolean, so it wouldn't be adding anything to y? Or am I wrong?
In-progress: Graviter (...)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Graviter - Axe
« Reply #260 on: March 10, 2011, 02:09:42 am »
It is a boolean, but it works on each individual bit of the number :) Since your number is 10101001.10010010 , and since we want the second half to be 11111111, we just OR your number with 11111111 (255), which sets all of the bits to 11111111

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #261 on: March 10, 2011, 02:12:23 am »
It is starting to make some vague sense in my mind. Sorry, I'm just used to thinking of boolean as 0 and 1 xD
In-progress: Graviter (...)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Graviter - Axe
« Reply #262 on: March 10, 2011, 02:14:15 am »
It still is boolean :) remember the calc only operates in 1's and 0's no matter what, this just acts like a whole bunch of boolean OR's for each bit in the number

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #263 on: March 10, 2011, 02:16:30 am »
Alright, so now I just need to find the exact value that will jump exactly one block without hitting the ceiling.
Sounds like fun.
In-progress: Graviter (...)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Graviter - Axe
« Reply #264 on: March 10, 2011, 02:17:42 am »
I'm guessing 255 will do it, since that will put you at the lowest possible spot without moving into the next pixel, but i cant be sure o.O

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #265 on: March 10, 2011, 02:23:20 am »
No my jumping works by setting a y-velocity to -value, so it adds up rather than just moving upwards by 255. So it's something like

x(x+1)/2>=255

or something, then use x.
In-progress: Graviter (...)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Graviter - Axe
« Reply #266 on: March 10, 2011, 02:25:21 am »
No i mean lowest possible spot on the screen (i've been talking about Y position) since higher numbers move down the screen

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #267 on: March 10, 2011, 02:26:04 am »
Oh yeah 255 works for that. I got it working, so now I"m trying to figure out jumping.
In-progress: Graviter (...)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Graviter - Axe
« Reply #268 on: March 10, 2011, 02:26:54 am »
yay ^^

Offline leafy

  • Project Author
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Graviter - Axe
« Reply #269 on: March 10, 2011, 02:36:04 am »
Wow I just realized I spammed this thread a whole lot >.< I'll stop now and go sleep or something.
In-progress: Graviter (...)