Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (565)
Games in Android Showcase (151)
games submitted by our members
Games in WIP (606)
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  Discussions / General Discussions / Re: Blogpost about Java for Game Programming on: 2013-05-06 13:23:24
Thank you for your feedback.
What you wrote about Java and C++ in terms of performance is simply wrong, these are just prejudices.
I really didn't want to go into discussions about Java vs other programming languages -there's already enough information to find on that elsewhere. I merely wanted to help people that are (planning to) write games in Java with things I learned along the way.

Objects pooling is often inefficient since Java 1.4 except in a few very particular cases
Agreed, you only need to consider pooling objects once you have problems with garbage-collector-stutters in your game. And even then, you probably only need to implement pooling in a hand full of methods to solve these issues.

I get excellent performances without using Java 1.7 try construct.

We use the Java 1.7 try construct purely for convenience, it makes sure that once the temp object goes out of scope its gets returned to the pool (instead of manually calling pool.push()). This is especially useful when you have multiple return statements within the scope of the temp object.

What you wrote about direct NIO buffers is very incomplete, you must release the native memory they use by yourself if you don't run out of memory on the Java heap, not on the native heap, I already wrote about that in my blog. Moreover, I modified Ardor3D so that you can free the memory allocated by this kind of buffers when used in VBOs in the renderer, you can simply override the method deleteVBOs(final AbstractBufferData<?> buffer) and call it between levels for example.

Well that is all a bit out of scope of the article. The only point I was trying to make is that you need to be more careful with Directbuffers in Java than with ordinary objects; garbage collecting them will lead to stutters in your game a whole lot sooner than with normal Java objects (and they are harder to find with the Java Visual VM as well).


2  Discussions / General Discussions / Blogpost about Java for Game Programming on: 2013-05-02 07:43:45
Hi there,

I just wrote a small blog post about my experience in working with Java for game programming. It is mostly things I stumbled upon while working on Caromble! for the last few years.
Check it out:


Pages: [1]
theagentd (13 views)
2015-03-27 23:08:20

wxwsk8er (54 views)
2015-03-20 15:39:46

Fairy Tailz (47 views)
2015-03-15 21:52:20

Olo (29 views)
2015-03-13 17:51:59

Olo (32 views)
2015-03-13 17:50:51

Olo (39 views)
2015-03-13 17:50:16

Olo (44 views)
2015-03-13 17:47:07

ClaasJG (58 views)
2015-03-10 11:36:42

ClaasJG (42 views)
2015-03-10 11:33:01

Pippogeek (50 views)
2015-03-05 14:36:23
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27 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!