123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|208|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Monkey -> Mutant Monty development being a pain in the chad.

Mon, 03 Mar 2014, 19:32
steve_ancell
In reference to my post on the Monkey-X forum, I have been proper banging my head on the wall with this Monty project.

monkey-x.com/Community/posts.php?topic=8081#80786


Anyone fancy looking at the source to see how much mess I've made?.

homepage.ntlworld.com/stephen.ancell/mm/mmsaucy.zip
Tue, 04 Mar 2014, 06:00
Jayenkai
Seriously, Steve.. What on earth are you using as your brower!? Netscape!?!

> Reveal 🔎

The HTML5 version is AMAZINGLY silky smooth, and even runs great in different resolutions and ...
Hmm.. actually, the game scales nicely, but the score-display ends up all over the place.

But, yeah, runs nice and smoothly, and scales to where it oughta be. No problems here.

As for your control issue, I suggest you set a "I Want To Go" value..
Whenever the player hits a key, store the "I Want To Go" value of that direction, and then whenever your game is ready to make the player go in a direction, use the last "I Want To Go" value, rather than scanning for keys. The "missing movement" thing is happening because, occasionally, the player taps the key inbetween two of your checks. So, if instead, you ALWAYS set the "I Want To Go" value, then check for THAT, you should clear up any quirky control issues.

.. But then you'll probably need to rejig some of the "Held" or "Released" code in order to get that working correctly.

-=-=-
''Load, Next List!''
Tue, 04 Mar 2014, 08:01
steve_ancell
I'm using FireFox, not sure what browser was on Howard's MacBook bt the controlls lagged proper on that.
Tue, 04 Mar 2014, 12:07
steve_ancell
Jayenkai As for your control issue, I suggest you set a "I Want To Go" value..

It already does, I used that method in the Blitz version also.
Tue, 04 Mar 2014, 12:10
Jayenkai
Sorry, I tried my best to figure out what was going on in your controller stuff! I swear, I can no longer read anyone elses code! Far too many bad habits learned from AGameAWeek!!

-=-=-
''Load, Next List!''
Tue, 04 Mar 2014, 12:17
steve_ancell
For the key-tapped part I check that the key isn't already being held down.

For the change direction part I first check if the "I want direction" is perpendicular to the current direction then wait for Monty to get within the range of the gap, give or take a few pixels to allow for the delta variation then snap Monty inline with that gap. I then do a quick (player.getX() Mod tileWidth) and (player.getY() Mod tileHeight) to see if both are zero, then pass the "I want direction" onto Monty if each case is true and if the direction is perpendicular.

Tue, 04 Mar 2014, 12:18
steve_ancell
Jayenkai I can no longer read anyone elses code!

My mind goes numb by reading my own code. LOL
Tue, 04 Mar 2014, 12:44
steve_ancell
Thanx for having a look anyway peoples. I may even need to also consult my facebook contacts to see if they have any issues.

I recall both rockford any yourself Jay, when you mentioned a problem on the bottom-right of the first level. The same thing happens on my nephew Dan's machine.
Fri, 07 Mar 2014, 15:59
Jayenkai
Still having the same issue in the latest test, although I've still no idea why. Currently doing a "Cram AGameAWeek into the next half-a-day!" paniccy coding thing, but once I'm done, I'll take another look through your source, and see if I can track it down.

... Busy day-or-so ahead, though, so no promises!!

-=-=-
''Load, Next List!''
Fri, 07 Mar 2014, 17:51
steve_ancell
OKies Jay, thanx.

It would be handy if I could do AGameAWeek, I'm having problems doing just one. LOL... If you need any help with testing what you're doing and stuff, let me know.
Wed, 12 Mar 2014, 15:59
steve_ancell
I've just upgraded to an 8-core AMD Bulldozer, I am now also getting that hesitation down the far-right gap and it seems it is being caused by the same damn problem that arises on test-level 41.

Maybe now I will be able to track the error now that I've got rid of that old Pentium-Fossil.
Wed, 12 Mar 2014, 17:13
Jayenkai
Sorry. I completely forgot that I was supposed to be poking around your code. I swear, I need to start jotting some of this stuff down. No memory, none at all!!!

-=-=-
''Load, Next List!''
Wed, 12 Mar 2014, 18:58
steve_ancell
That's completely OK, no pressure on you at all. Whenever you feel ready.
Wed, 12 Mar 2014, 19:01
steve_ancell
Woa!!!... This new Bulldozer system really proper does has some clout, beats the hell out of my old Pentium.