Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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]
DesertCoockie (33 views)
2018-05-13 18:23:11

nelsongames (75 views)
2018-04-24 18:15:36

nelsongames (70 views)
2018-04-24 18:14:32

ivj94 (752 views)
2018-03-24 14:47:39

ivj94 (82 views)
2018-03-24 14:46:31

ivj94 (622 views)
2018-03-24 14:43:53

Solater (98 views)
2018-03-17 05:04:08

nelsongames (179 views)
2018-03-05 17:56:34

Gornova (405 views)
2018-03-02 22:15:33

buddyBro (1065 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!