Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (498)
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 09:23:27
Quote
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 bufferstrategy.show(), and after it - it's still going at full throttle!

Quote
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 15: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 14:16:29
Hi,
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 21: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 14: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 11:47:24
Hi,

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]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (18 views)
2014-04-15 18:08:23

BurntPizza (15 views)
2014-04-15 03:46:01

UprightPath (28 views)
2014-04-14 17:39:50

UprightPath (13 views)
2014-04-14 17:35:47

Porlus (29 views)
2014-04-14 15:48:38

tom_mai78101 (54 views)
2014-04-10 04:04:31

BurntPizza (111 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org 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‑gaming.org
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!