Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

[java] i don't understand java

This topic is 5926 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

yo. my game is shitty and i don''t know why. the thing is that i don''t get how java works. it runs good on some systems, and terrible on some systems. sometimes it''s jerky as hell, sometimes not. on some computers there is a giant lag sometimes (gc perhaps?). obviously i''m doing something wrong (threads, graphics, everything?) if someone has a few mins over and will have a look at my code, i''d appreciate it. since it''s too much to post here, download the source at http://mill.3dfxsweden.net/temp/src.rar for a playable version, http://mill.3dfxsweden.net/games/race

Share this post


Link to post
Share on other sites
Advertisement
Worked pretty well for me. I averaged around 50fps on a dual p2 333 gf2mx. A couple times, I don''t know if it is gc or something else, I got a second or so long pause and everything went to hell the second time it happened and the applet froze.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
thanks for trying it out. i''ve had a fair amount of testers, just nobody seems to be unemployed (read gots lots of free time to review the code) :/

i''m glad it went smoothly on yer systems. i got a tip about the gc at javagaming.org. they said i didn''t give the gc enough time to run, so instead it runs less frequently but to compensate it runs longer. i need to make it run more frequently by limiting the fps and by letting the threads sleep.

for the lazy ones, most of you that is, i''ll post pseudo code or atleast just post the most crucial code, how''s that? i''ll do that tomoz (or later tonight if i can''t sleep).

Share this post


Link to post
Share on other sites
thanks for trying it out. i''ve had a fair amount of testers, just nobody seems to be unemployed (read gots lots of free time to review the code) :/

i''m glad it went smoothly on yer systems. i got a tip about the gc at javagaming.org. they said i didn''t give the gc enough time to run, so instead it runs less frequently but to compensate it runs longer. i need to make it run more frequently by limiting the fps and by letting the threads sleep.

for the lazy ones, most of you that is, i''ll post pseudo code or atleast just post the most crucial code, how''s that? i''ll do that tomoz (or later tonight if i can''t sleep).

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It runs _mainly_ ok on my computer.
Time to time there comes a "lag" bursts, when car(s) jump to another position.

I have had very similar problems in my own (Threaded)applets, which have been done exactly right, so it''s not bad coding necessary.

btw. my computer: AMD 1200@1350, Voodoo3, 256mb.

Share this post


Link to post
Share on other sites
I think it might be less jerky if you increase the sleepTime to 50. Don''t quote me on that, though.

Share this post


Link to post
Share on other sites
i've been fiddling a little with high-res timers and some other stuff and here it works a little better now.

http://mill.3dfxsweden.net/games/race/index.html

note that it's a bit slow right now, just need to increase a few parameters. that's not important right now. i'd like to know if those who thought it performed badly think it's better know.

got lots to improve though. thank's in advance.

Edited by - mill-o on February 20, 2002 4:48:54 PM

Edited by - mill-o on February 20, 2002 4:50:06 PM

Share this post


Link to post
Share on other sites
I don''t know what you did but it wasn''t good. I got 0.6fps before IE6 crashed. It was going nuts on my harddrive. I don''t know how you managed that since I had 80megs of physical left.

The fanatic is incorruptible: if he kills for an idea, he can just as well get himself killed for one; in either case, tyrant or martyr, he is a monster.
--EM Cioran

Opere Citato

Share this post


Link to post
Share on other sites
basically all i''ve done is to use a high res timer and a little less temp variables and stuff like that.

it''s disturbing that it''s WORSE than before. those who had a louse 15 fps on a cel600 now get 35 fps (i''ve limited the fps to 35 and sleep more so that the gc gets happy).

i even tried it on an old sun ultra sparc 1 (167 Mhz, 128 Mb ram, creator gfx card) and i got ~18 fps.

about 300 people have tested it and only a few say something. thought i''d get a little more feedback :/

GKW: what OS and what vm are you using? 0,6 fps is really shitty so i must be doing something wrong

(yah i know, people keep telling me to NOT rotate sprites in real-time, but disabling that on my system have NO effect at all. i''ll change that when i get time)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!