Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (711)
Games in Android Showcase (213)
games submitted by our members
Games in WIP (785)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Performance Tuning / Re: threads on linux on: 2002-11-30 08:23:27
Note that your fps numbers may be off on *nux unless you do Toolkit.sync(); after each frame.

Thanks, I'll try that. However, judging visually, it does seem to be going faster on linux than it does on my windows machine.

Does toolkit.sync() make any difference on windows? I'm using a buffer strategy to do my graphics in both full screen and windowed mode. I've tried inserting it before i draw my graphics, before I call, and after it - it's still going at full throttle!

To get info on the cpu open a shell and run `more /proc/cpuinfo

I tried this -  the linux machine I'm testing on appears to be an Athon 1.5GHz 1800+ with 512 meg of ram.

One other question. Does anyone know why in full screen exclusive mode, the framerate is limited to the refresh rate of the screen mode I'm in, whilst in windowed mode, it just goes as fast as it possibly can? (with tearing of course)

2  Game Development / Performance Tuning / Re: threads on linux on: 2002-11-28 14:39:18
Actually I just got home and tried out the code on my windows machine (1ghz with geforce2 mx 32mb) and was rather dissapointed to find i (only?) got 150fps!  - that was with a sleep time of 0 again.

The computer with linux on is one at Uni - it's pretty new (does anyone know how to find out the processor speed/type on Linux?) It must be quite a beast to outperform my computer without any h/w acceleration!

Can anyone think of a reason why there should be such a speed difference between sleeping for 1ms and sleeping for 0ms?

3  Game Development / Performance Tuning / threads on linux on: 2002-11-28 13:16:29
I'm developing a platform game using java 2d. I'm working mainly on windows, but also testing on linux.

Speed is not an issue on windows, since java can use my graphics card - but linux seemed to be a lot slower.

I'm doing rendering on a seperate thread  (a while loop in the run() method), and using thread.sleep(x) to control the speed.

I was getting about 33fps on linux with scrolling and a few sprites moving around. I was sleeping for about 12ms per frame. Then I set the sleep to 0 and I started getting 200fps!! But if I set the sleep to 1 I only get about 50fps.

I assume this is to do with how threading is handled on Linux - is there a better way to control the speed in my game?

4  Java Game APIs & Engines / Java 2D / Re: volatile image with bitmask transparency? on: 2002-11-12 20:52:23
that's a shame. and I was quite pleased with that scrolling routine  Roll Eyes

I guess it won't really matter redrawing everything with hw acceleration on windows, however I'd like it to run well on Linux as well. Without acceleration, every blit matters.

Any other ideas welcome!
5  Java Game APIs & Engines / Java 2D / Re: volatile image with bitmask transparency? on: 2002-11-12 13:22:47
yeah, I thought of that. However that's not ideal, because of the way I do my scrolling.

The actual platform layer only scrolls by a whole tile width at a time. I do pixel scrolling by changing the offset of the layer when I blit it to the screen. This means that the platform layer only gets redrawn every time I scroll past the edge of a tile (say 1 in 16 frames). Even then, only a bit of it gets redrawn, since I use a copyArea to move the part that stays onscreen and just draw the newly visible row or column of tiles.

Would I have to scrap that way of doing things if I want parallax?
6  Java Game APIs & Engines / Java 2D / volatile image with bitmask transparency? on: 2002-11-12 10:47:24

I'm making a platform type game, and I've got fullscreen scrolling sorted so far. However I'd like to add some background layers that move more slowly than the scrolling platform layer to give a feeling of depth (i.e do parallax) .

I'm currently blitting the platform layer to a seperate VolatileImage. My problem is that I can't see any way to create a transparent VolatileImage so that my background layers will show though.

I've found createCompatibleImage(int width, int height, int transparency) but there seems to be no equivalent for a volatile image - only  createCompatibleVolatileImage(int width, int height).

Is there any way to do this?
Pages: [1]
Archive (21 views)
2017-02-27 19:41:49

Riven (32 views)
2017-02-27 17:26:59

numerical (406 views)
2017-02-21 07:32:16

numerical (408 views)
2017-02-21 07:31:46

theagentd (522 views)
2017-02-18 13:42:33

theagentd (518 views)
2017-02-18 13:35:16

h.pernpeintner (1683 views)
2017-01-24 22:39:11

h.pernpeintner (1664 views)
2017-01-24 22:38:32

Galdo (2230 views)
2017-01-12 13:44:09

Archive (2177 views)
2017-01-02 05:31:41
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!