Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
General Calculator Help
»
Some limitations of platformers using pxl-test
« previous
next »
Print
Pages:
1
2
3
[
4
]
5
6
Go Down
Author
Topic: Some limitations of platformers using pxl-test (Read 26437 times)
0 Members and 3 Guests are viewing this topic.
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4704
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: Some limitations of platformers using pxl-test
«
Reply #45 on:
March 15, 2012, 09:27:25 pm »
I am now back and have not had time to work this out, yet. (Also, I am distracted on the phone
) Still, I will try to figure this out <.<
As for limitations, all I can think of is memory. For systems with color screens, this is an extremely good system to use as you can generate scrolling maps easily and pack a few layers into each pixel.
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
willrandship
Omnimagus of the Multi-Base.
LV11
Super Veteran (Next: 3000)
Posts: 2953
Rating: +98/-13
Insert sugar to begin programming subroutine.
Re: Some limitations of platformers using pxl-test
«
Reply #46 on:
March 15, 2012, 09:59:07 pm »
A solution to the size issue is to use tile-based drawing, but pxl-test collision. That way, levels stay small and load fast, but you still get the precision of pxl-test collisions.
Logged
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4704
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: Some limitations of platformers using pxl-test
«
Reply #47 on:
March 15, 2012, 10:03:34 pm »
Yes, that is a great way and, also, enemies you just do by drawing their sprites to the layers.
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
nxtboy III
LV8
Addict (Next: 1000)
Posts: 795
Rating: +26/-1
NXT!
Re: Some limitations of platformers using pxl-test
«
Reply #48 on:
March 15, 2012, 10:12:11 pm »
So how can I fix the issue I had earlier, about the enemies not in the right place?
EDIT: BTW, my avatar is an NXT.
«
Last Edit: March 15, 2012, 10:14:53 pm by nxtboy III
»
Logged
Need some help with levels PLEASE!!
nxtboy III
LV8
Addict (Next: 1000)
Posts: 795
Rating: +26/-1
NXT!
Re: Some limitations of platformers using pxl-test
«
Reply #49 on:
March 16, 2012, 04:57:59 pm »
So, any luck with the enemy scrolling issue?
It might be because when the enemy's Y axis and the player's y velocity are subtracted for scrolling, since the enemy's y velocity is not a multiple of 64 or 32, the enemy's y axis rounds to a different number.
Hopefully that makes sense.
«
Last Edit: March 16, 2012, 04:58:29 pm by nxtboy III
»
Logged
Need some help with levels PLEASE!!
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4704
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: Some limitations of platformers using pxl-test
«
Reply #50 on:
March 16, 2012, 05:01:17 pm »
Ooooh, so the code will round. I did not know that. Is there some way to prevent it from rounding?
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
nxtboy III
LV8
Addict (Next: 1000)
Posts: 795
Rating: +26/-1
NXT!
Re: Some limitations of platformers using pxl-test
«
Reply #51 on:
March 16, 2012, 05:03:28 pm »
I was saying because, you cannot be at, for example, point(2.5,3.5). It's impossible to literally be at a fraction of a pixel point.
«
Last Edit: March 16, 2012, 05:03:37 pm by nxtboy III
»
Logged
Need some help with levels PLEASE!!
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4704
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: Some limitations of platformers using pxl-test
«
Reply #52 on:
March 16, 2012, 05:06:14 pm »
Yeah, I know, and rounding will indeed throw it off. So does it round when you divide or when you tell it the coordinates. If it is at the coordinates, then there should be a command called int( or floor(, I am assuming. You will want to use that on the coordinates.
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
nxtboy III
LV8
Addict (Next: 1000)
Posts: 795
Rating: +26/-1
NXT!
Re: Some limitations of platformers using pxl-test
«
Reply #53 on:
March 16, 2012, 05:27:42 pm »
Yeah, there are floor and ceil functions. So I use floor when dividing by 64? (Hey that rhymes
)
Logged
Need some help with levels PLEASE!!
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4704
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: Some limitations of platformers using pxl-test
«
Reply #54 on:
March 16, 2012, 06:49:11 pm »
Yep
And nice rhyme!
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
nxtboy III
LV8
Addict (Next: 1000)
Posts: 795
Rating: +26/-1
NXT!
Re: Some limitations of platformers using pxl-test
«
Reply #55 on:
March 16, 2012, 06:53:18 pm »
I didn't even try to.
I used floor, and it still messes up! I think it is because since the enemy's Y axis (not multiple of 32 or 64) and player's y axis (also not multiple of 32 or 64) subtract/add (whatever they do), it goes to a different number for the enemy Y from the player Y.
Logged
Need some help with levels PLEASE!!
nxtboy III
LV8
Addict (Next: 1000)
Posts: 795
Rating: +26/-1
NXT!
Re: Some limitations of platformers using pxl-test
«
Reply #56 on:
March 17, 2012, 05:36:16 pm »
So how can it be fixed?
Logged
Need some help with levels PLEASE!!
Xeda112358
they/them
Moderator
LV12
Extreme Poster (Next: 5000)
Posts: 4704
Rating: +719/-6
Calc-u-lator, do doo doo do do do.
Re: Some limitations of platformers using pxl-test
«
Reply #57 on:
March 17, 2012, 05:46:03 pm »
I'm not sure, I haven't had time to put together a good example
I've never worked on a game where the player stayed in the same position
Pretty much, here is the best idea I have, but I think you are already doing it or have done it:
When you jump, you change the Y-offset of the viewing screen. Form there, just plot the enemies by doing this:
Compute the Y-Offset /64 with floor. Then compute the location of the enemies /64 with floor. THen just add the two to get the location on screen.
Logged
My pastebin
|
Pokémon Amber
|
Grammer Programming Language
|
BatLib Library
|
Jade Simulator
|
Zeda's Hex Opcodes
|
FileSyst Library
|
CopyProg
|
TPROG
|
GroupRead
|
Lbl Read/Write
|
Z80 Floating Point Routines
(
z80float on GitHub
)|
Z80 Optimized Routines Repository
nxtboy III
LV8
Addict (Next: 1000)
Posts: 795
Rating: +26/-1
NXT!
Re: Some limitations of platformers using pxl-test
«
Reply #58 on:
March 17, 2012, 06:29:49 pm »
Yeah... That's what I'm doing.
I could make it so when the enemy hits a solid below (Stops moving), the enemy Y changes to a multiple of 64, then adds 32(since it's the middle of 64).
How do I do that, in code-like terms?
Logged
Need some help with levels PLEASE!!
nxtboy III
LV8
Addict (Next: 1000)
Posts: 795
Rating: +26/-1
NXT!
Re: Some limitations of platformers using pxl-test
«
Reply #59 on:
March 19, 2012, 06:09:46 pm »
So I need help fixing another problem:
The pxl-test stuff is checked in the graphic displaying part of the program. The pxl-test outputs (1 or 0) are saved to variables. When moving, it checks those variables for collision. However, they are not correct, because it checks the variables first, then uses pxl-test stuff and saves it to variables. So the variable checking is too early.
How do I fix it?
Here's some psuedo:
Game loop:
Moves player, checks collision using variables (V) (Lets call the variables V)
Displays graphics and uses pxl-test function and saves output to variables (variable V) it uses earlier
End game loop
Logged
Need some help with levels PLEASE!!
Print
Pages:
1
2
3
[
4
]
5
6
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
General Calculator Help
»
Some limitations of platformers using pxl-test