Author Topic: Some limitations of platformers using pxl-test  (Read 26196 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Some limitations of platformers using pxl-test
« Reply #60 on: March 19, 2012, 06:11:11 pm »
Could you use another variable for the two instances?

Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: Some limitations of platformers using pxl-test
« Reply #61 on: March 19, 2012, 06:12:26 pm »
???
Explain, in psuedo, please. :)

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Some limitations of platformers using pxl-test
« Reply #62 on: March 19, 2012, 06:28:13 pm »
Well, I mean instead of using V twice, why not use W or something for one of them?

Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: Some limitations of platformers using pxl-test
« Reply #63 on: March 19, 2012, 06:46:44 pm »
???
I sort-of understand... i think... maybe not...

So like this:

Game loop:
Move and stuff, uses W
Change W to V
Displays stuff and uses pxl-test stuff for variable V
End game loop:

Or would that even help fix the problem?

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Some limitations of platformers using pxl-test
« Reply #64 on: March 19, 2012, 06:55:46 pm »
That might. Why do you need to change W to V?

Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: Some limitations of platformers using pxl-test
« Reply #65 on: March 19, 2012, 06:59:12 pm »
Because V is what is used for pxl-testing. It is the output of pxl-test (Actually, the function I use is called isPixelSet, but, whatever)

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Some limitations of platformers using pxl-test
« Reply #66 on: March 19, 2012, 07:01:30 pm »
Ah, I see, now. Well hopefully that code above helps you :)

Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: Some limitations of platformers using pxl-test
« Reply #67 on: March 20, 2012, 06:01:26 pm »
So what are some other limitations and solutions?

EDIT: Yay! So the scrolling problem is fixed(Not sure if that was even a problem...). The problem was that the enemy would try to go up a hill, but it wouldn't work. So I still need that V and W update-thingy I asked a little earlier to get working. So, you can post in my thread in "Computer Projects and Ideas". My thread is about the game I am making that I needed help with. The topic is the one called something about my new NXT game about a square.
« Last Edit: March 20, 2012, 10:18:55 pm by nxtboy III »

Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: Some limitations of platformers using pxl-test
« Reply #68 on: March 23, 2012, 06:27:00 pm »
So what are some other limitations and solutions?

Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: Some limitations of platformers using pxl-test
« Reply #69 on: March 27, 2012, 10:06:52 pm »
So what are some other limitations and solutions?

Any?

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: Some limitations of platformers using pxl-test
« Reply #70 on: March 28, 2012, 10:32:47 pm »
move collision checking to before moving player, but still in the game loop.

Edit: Argh: Page turn fail.

Here's one I'm not sure was brought up: pxl-test doesn't work on black stuff, so you'll need a mask for collision unless you border everything. In fact, it's better in many ways so that you can have passable black stuff and such, plus background images don't collide.
« Last Edit: March 28, 2012, 10:34:24 pm by willrandship »

Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: Some limitations of platformers using pxl-test
« Reply #71 on: March 28, 2012, 10:34:18 pm »
So instead of doing this:
Loop:
Move
Check collision
end loop

Do this:?

Loop
Collision checking
move
end loop

?

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: Some limitations of platformers using pxl-test
« Reply #72 on: March 28, 2012, 10:36:43 pm »
yes, because then you'll get the closest values possible for the move command itself.

Offline nxtboy III

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 795
  • Rating: +26/-1
  • NXT!
    • View Profile
    • Program NXT
Re: Some limitations of platformers using pxl-test
« Reply #73 on: March 28, 2012, 10:39:28 pm »
hmm... ya maybe so.

Any other limitations and solutions?

Also, I am making a platformer that does use pxltest-like collision, so if you could help in any way, go ahead (please).  http://ourl.ca/15431

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: Some limitations of platformers using pxl-test
« Reply #74 on: March 28, 2012, 11:31:09 pm »
Well, looking over that it might be handy to have some form of basic compression, since most of your level data pics are blank space. You could save upwards of 50% space.