Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Isometric engine - fps.

Started by Polydone Sep 14, 2004 at 2:42 AM 18 replies 4.6k views
Original Post
Polydone
Polydone
I'm currently working on a graphical mud in Java, with an isometric graphics engine. I used an old isometric engine I wrote for another game that performed badly. Now that I'm using Swing I get much higher framerate, since it's hardware accelerated - I don't think I'm even gonna bother messing with volatile images manually. At the moment I'm working on the map editor (The days of manually writing map text files and then compiling them into binary format are over :)) I would be happy if someone would try it out and report back what framerate they're getting, including the size of the isometric panel and their system specs. DownLoad
happybara
happybara
Exception in thread "main" java.io.FileNotFoundException: editor.prp (Nie mo┐na odnalečŠ okreťlonego pliku)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(Unknown Source)
at mapeditor.Editor.main(Editor.java:66)

"Nie mo┐na odnalečŠ okreťlonego pliku" part means "file could not be found"
Dolphins - The sharks of the sea.
happybara
happybara
i got fps=22-30 and size=(671,550)
system : duron 800/ 256 mb/ radeon 8500/ win xp

when i pressed 'full' it escaped with following error:
Exception occurred during event dispatching:
java.lang.NoSuchMethodError
at mapeditor.SideBar.actionPerformed(SideBar.java:47)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknow
n Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour
ce)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
Dolphins - The sharks of the sea.
Polydone
Polydone
Ah yeah, don't do that if you don't have Java 1.4, hehe.
Full screen mode isn't supported by Java 1.3
Sion_
Sion_
It runs perfectly on my system.
I get ~90-200 FPS (it's quite jumpy) in windowed mode, and 39-45 FPS in fullscreen mode (same framerate when maximizing the window as when "Full" is clicked).

But why, oh why, do you make your game in Java?! It's way too slow for decent game development. Well, that's my experince anyway.

Good luck with your game! :)

My system specifications:
Athlon XP 2500+ (really a ~1866MHz)
1024 MB Duel Ram
128 MB Radeon 9500

Windows XP Professional w/Service Pack 1
DirectX 9.0b

EDIT: I should probably mention that I have "Java 2 SDK 1.4 Enterprise Edition" installed.
--------------------------Visit my blog at AndersNissen.com
Polydone
Polydone
Thanks.
Yeah it's jumpy because when you press "fps" for the framerate test you basically turn off the timing. I suppose I'll have to get some work done experimenting with decoupling model update rate and framerate.

In the game the isometric panel will only be part of the user interface that'll also feature a chat and control panel. If I can get 60 fps in the finished game I don't see how it's "way too slow for decent game development" :)

Anyway, if I ever finish this game by then computers and graphics cards will be a lot faster than they are today *eg*.
pammatt
pammatt
I must say, I give Java a lot more credit now than I used to. I'm working on a highly complex GUI for a job related project and I was so impressed with the ease of UI development that I decided to build my 3D world designer / level editor in Java using JOGL. So far it is definantly been working out great!

Good job using Java. I think it should at least be an avenue worth exploring nowadays.
Foobat
Foobat
kinda jumpy 70-80 in window and 40-50 in full screen? using Althon 1400 256 ram 64mb ati something can't remember now. But i a running quite a bi of junk in the back as well
if you like programming, you like maths, you just don't know it yet
Sion_
Sion_
Hey Anonymous Poster

I'm sorry if I've made myself appear as a "moron" and "look stupid".
I have roughly a years worth of experince with Java 1.4.1 and 1.4.2 from 2002-2003, and found it to be a very nice language to work with, but suffering from too many downsides - among those also issues concerning speed and performance.
That is just my experince, and optimizations and taking advantage of 3rd party technoligies may give a considerable performance improvement.

I find this quote on http://grexengine.com/sections/externalgames/java-content.html:
"Since around 2002, Java on average is less than 5% slower than the best C++ code. For most applications (including games) java is within 1% of the speed of C++ code; many of the improvements of the last few years have concentrated on making up the performance gap, so that now - finally! - Java is a realistic practical alternative even in games development - where RAW SPEED is usually the most important factor."
I don't know where they've got their infomation from (there is no sources), but it sounds too good to be true.
Nearly the speed of C++, one of the fastest high-level programming languages availiable? Then how come almost all commercial games being developed in C and C++, when no (to my knowledge at least) commercial games have been developed in Java? That is, disregarding games for cell phones, palm pilots and the like.

I just find it hard to believe that Java should be *this* fast. My experince with Java tells me the completely opposit. In fact, the Java game I started 10 minuttes ago has been hanging ever since it managed to finish loading.

I'm no expert in Java, so don't flame me for arguing on behaf of me previous experinces with Java.

That's just my 2 cents.
--------------------------Visit my blog at AndersNissen.com
happybara
happybara
It's me again, i've downloaded the newet java VM and framerate jumped to 50.
Dolphins - The sharks of the sea.
grekster
grekster
I tried it out, got 63-64 FPS both in full screen and out of it.

AMD Barton XP2800
1Gig of RAM
ATi Radeon 9800pro
Windows XP

looks good so far :)
Quote: Original post by BosskIn Soviet Russia, you STFU WITH THOSE LAME JOKES!
NicolasX
NicolasX
Dual 2.0 GHz
GeForce FX 5200
512 MB RAM
WinXP Pro

212-322 fps
Polydone
Polydone
@happybara: You went and downloaded Java 1.4 just for me ? :)
Yeah the hardware acceleration introduced by 1.4 really does a nice job when it comes to blitting.
Still the framerate is lower than even C++ with GDI, one important reason for this is that Graphics.drawImage() is asynchronous, which is great for event-driven GUI applications if you don't want hanging buttons but bad news for game developers. Of course this is of no concern to people using Jogl etc.

But anyway, I'm happy with the framerate people are getting.

Why am I coding games in Java?

1. I know Java a helluva lot better than C/C++, and if I had to worry about memory allocation, dangling pointers etc. I would never get anything done - I'm not an army *eg*.

2. I'm aiming for Java Web Start. That's really a great way to play games. I wish it was as easy to find and install the Java plugin as it is to install Flash plugins.
But perhaps there is hope. Now that MS no longer distributes their sucky 1.1 "Java" VM perhaps people will get REAL Java instead :)
NuffSaid
NuffSaid
Powerbook 12" 1.33 GHz
1.25 GB RAM
fps = 17 - 20 windowed, 11 - 17 fullscreen

Reason for this is that the Java implementation on OS X sucks for games. :(
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
Woody FX
Woody FX
http://www.javaengines.dk/

Is that you site Blackone?

Are you making the arenabots game?

Brian
Polydone
Polydone
Yeah that's my site, I originally created the isometric engine for the ArenaBots game, which I was creating as a project at the university for the compiler course. I don't know if I'll be working on that project again any time soon. I'll probably port to Swing if I do.
My goal now is to create a graphical mud.
Sion_
Sion_
Wow, the editor is looking better and better all the time! It's really starting to shape up!
--------------------------Visit my blog at AndersNissen.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.