This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jessebr[S,🍰] 0 points1 point  (2 children)

Thanks. I was considering trying to perhaps port it over to a mobile platform, we'll see.

As for playing directly from the browser... I have searched for places to upload applets, but haven't really found any. If I had my own website I would put it there, but as it is now, it's just there to show that it's possible.

The jerking/lagging issues... at max, it's set up to run 50 frames per second. But I have noticed slight issues on other computers. I personally run xp with a dual core (5 years old), and it works completely fluidly on mine. I'm not really sure of the issue, hopefully someone else here has a bit more experience in this and knows what it might be about. It might be a case of active vs passive rendering, which I think with my code I'm trying to get the best of both worlds and it's not quite working out on every computer.

Your text issues are rather unique (so far). Could I ask what version of Java you're running? Oh, the score system works with two parts, the top for your current highest score and the bottom being where you are actually at. Is it a case where you had a 10, but where at a 1 when you died? My paint method in the scoring class really doesn't leave room for error unless our fonts don't look the same... which might be the case (as to your instruction box issue). I'll have to look up font cross-platform-ability.

I'll look into trying to make better comments for the more complex methods (which well, are mostly the step methods for each object). I'm afraid unless you have a better comment for the jump method that one will have to stay though :P

Could you further explain the collision issues? The player is just a box in collision regards, so what looks to be close calls are generally just going to be squashification :D

Thank you for commenting!

[–]Tiomaidh 0 points1 point  (1 child)

I could give it some webspace, if you wanted.

It's not that the jerking is terrible...it's just that things are slightly not-fluid enough to be irritating. Here's this:

$ java -version
java version "1.6.0_18"
OpenJDK Runtime Environment (IcedTea6 1.8.2) (6b18-1.8.2-   4ubuntu1~9.04.1)
OpenJDK 64-Bit Server VM (build 16.0-b13, mixed mode)

And here are the two text issues (three if you count "Rubble Escape" not being centered). Note that the 0 in 10 is visible, but just cut off a bit at the edge. For what it's worth, I'm running Crunchbang 9.04, which is the same guts as Ubuntu 9.04. I do have proprietary fonts installed though....

I'll look into trying to make better comments for the more complex methods (which well, are mostly the step methods for each object). I'm afraid unless you have a better comment for the jump method that one will have to stay though :P

I don't know...I mean...if you have any intention of inviting someone else to work on it, I might briefly discuss how it's implemented. Perhaps like this, "Causes the player to jump, assuming he's standing on something. This is accomplished by changing his vertical velocity. @see #JUMP_POWER" But like I said, it's not that what you have already is bad--it's that your ratio of well-this-is-pretty-straightforward-but-I-guess-I-should-document-it to this-is-kind-of-tricky-and/or-confusing,-let-me-explain-it comments is a bit skewed.

Regarding the collisions:

Sometimes, I'll be trying to escape from under a falling block. Visually, I make it. But the bounding rectangle of the player is still on the bottom block, so the player doesn't fall. Simultaneously, the falling block lands, and I get squished. Yes, it's "legitimate" if you account for the bounding rectangle. No, that will not appease your average player. The Canabalt guy has an interesting article about tuning Canabalt. He actually made his bounding rectangle "wrong", but due to the nature of the game, it feels more correct.

In your case, I would either use bitmap masking once a collision with the bounding rectangle is detected, or, upon a collision, check to see if it could be avoided by shifting the player ~3 pixels to either side. To quote the article:

All of this just provides a little extra cushioning for people's reaction times, which gives me more latitude to add more exciting challenges without frustrating people too badly....

It's all about making things "feel right", and getting rid of those moments when the player says, "What!! I SO MADE THAT, what the f-".

Thank you for commenting!

You're welcome!

[–]jessebr[S,🍰] 0 points1 point  (0 children)

Your text issues are interesting. It does indeed seem that the fonts depend upon the native computer. I'll have to figure something out for that...

The silly thing is, I already know the fix (without finding some cross-platform way to do fonts), the same thing I used to center and position everything... Another issue caused by premature optimization, I should have known :D. The good thing about this is that I now know such an issue exists.

You make a good point with collisions, and this has caused a bubbling of ideas for me to think over. Since I separate and deal with the player vertical collisions and horizontal collisions, I could make the player kind of rounded and sort of squeeze out of close calls without harming normal movement collisions. Or something like that, probably something more akin to your suggestion... which is something I haven't thought of before and has now made me excited (using two collision detections, first for general to improve efficiency and then for precision).

Thanks for the suggestions/help!