This weekend I disided to run a few test to see why I was having so much trouble programming the platform engine for Funland Lex. To begin, I made a platform engine with just blocks and the player, nothing fancy at all. Then to monitor some things about the character that would be important to the game I had GM draw the stats so they could be monitored in real-time. The engine works fine, but I found some intresting things that could possibly be the reason for my troubles.
As I started the test I saw that as I was standing on the floor of the room I kept getting different y values. So I programmed in that I could add the players y value to a list of all the different y values. I found that I got 4 different y values for my character just standing on the floor at different times.After finding this I added it in so that all the blocks that were below the players y would be partially transparent. Because of the different y values sometimes the blocks are considered below the player and sometimes they are considered above.Is this a GM screw up or is it something with my programming? You can download to file Here if you would like to see the file.—————————————–
Aside from that I have started to learn a bit of HTML to hopefully design my site later. It is suprisingly easy so far and I should have a working site within the next week.Images:by Foolby ptoingby Setzerby SnakeAbove pixel made in MSpaint.
I'm not sure but in the step event, at the end of the step event, put
Do you disable gravity when standing on ground, or just have the blocks move the player back to xprevious and yprevious or some such system?
HOLY CRAP
It's a conspiracy, I say!
Woah look at all the weird pictures.
Nice engine you have there.
Actually when I downloaded, the program doesn't detect any y's.However, in the coordinates, it give me a .25, instead of .75 at the same position.I don't believe this should be too big a problem however, as pixel's are measured in whole numbers.flashback-
Yes, I disable gravity when standing on the ground and I use move_contact_solid and vspeed=0 when colliding with the block.Running the program a couple more times, I noticed that every once in a while, the player sorta "hovers" one pixel over a block. This is due to the way you are calculating your falling event.
Awesome, now that problem is fixed maybe I can get something working. Thanks Carlos.
no problem, glad I could help :)