Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (724)
Games in Android Showcase (216)
games submitted by our members
Games in WIP (791)
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] 2 3
1  Discussions / Miscellaneous Topics / Re: New File Format for Games on: 2016-07-02 15:51:26
So you made absolutely no change to the decoder which provide any additional usability ... you just made a mess ...
2  Game Development / Shared Code / Re: Java Continuations and GreenThreads on: 2013-01-13 09:34:36
I started a HTTP client back in 2008 when I first wrote the lib, it is basically working - but I didn't do much testing on it.
3  Game Development / Shared Code / Re: Java Continuations and GreenThreads on: 2013-01-11 19:06:42
I added another update. Besides fixing methods which return 'long' - this version adds support to call suspendable methods as arguments for constructors (constructors itself are not suspendable).

This now allows constructs like this:
System.out.println(new StringBuilder(someSuspendableMethodWhichReturnString()).append(" Bla").toString());
// Eclipse generates the above code for the following Java statement:
System.out.println(someSuspendableMethodWhichReturnString()+" Bla");
4  Game Development / Shared Code / Re: Java Continuations and GreenThreads on: 2013-01-08 01:47:09
These warnings should now also be fixed (copy & paste bug).

While debugging these a potential issue with the JavaAgent was discovered:
It is possible that multiple threads load classes at the same time, which also means that these thread execute instrumentClass in parallel.
I did not add a synchronization to that method (to prevent potential dead locks with ClassLoader locks) as MethodDatabase might need to load additional classes (eg the base class) - so instead I protected the shared hash maps individually.
This might cause redundant work (if multiple threads analyze the same class) - but each thread should produce the same results or a warning is generated.

So I suggest to use the JavaAgent only while developing - and keep an eye on the console for warning Smiley
5  Game Development / Shared Code / Re: Java Continuations and GreenThreads on: 2013-01-07 22:21:09
I updated the Continuations library - all test cases work now without issues.

The latest sources can be found here.
And a compiled version is available on my website.
6  Java Game APIs & Engines / OpenGL Development / Re: Fontexturer - make .png images from TTF fonts for OpenGL textures on: 2012-03-09 22:39:05
For a more complete font support you can take a look at the BMFont format which also supports kerning.
The TWL Theme Editor has a font generator tool (Tools -> create font) with 3 different rendering methods:
- freetype2: best quality
- AWT drawString
- AWT vector: most effects
7  Java Game APIs & Engines / OpenGL Development / Re: How to display a color picker on: 2012-03-09 22:32:44
TWL has a color picker widget (in addition to many other useful widgets). You can test the color picker in the TWL Demo or in the TWL Theme Editor (both are webstart links). The editor is completely written using TWL.
8  Java Game APIs & Engines / OpenGL Development / Re: 2D - Restricted to appying sprite textures to shapes? on: 2012-02-26 08:35:45
MatthiasM has written some extremely awesome texture loaders spun off from TWL that don't require TWL itself.  It supports BMP, JPG, PNG, and TGA (no GIF that I can see).  It's asynchronous, so you get a callback when the texture is loaded and you can keep on doing your own thing in the meantime (like displaying a loading screen or downloading other resources) without having to manage any threads.
Well - it supports 3 modes of operations:
- fully managed by using the TextureManager.getTexture() function - this one is asynchronous (eg loads in a background thread)
- synchronous using Texture.loadTexture() function
- using the TextureLoader* classes to get the bytes directly

The asynchronous TextureManager method will render a transparent 2x2 pixel texture when the desired texture has not yet (or could not) been loaded.
Textures which are not used for some time are also unloaded.

And there is no need to manage threads - the only thing you need to do in your main loop when you want to use the TextureManager is:
// before main loop
AsyncExecution async = new AsyncExecution();
TextureManager tm = new TextureManager(async);
// main loop
while(!Display.isCloseRequested()) {
9  Game Development / Newbie & Debugging Questions / Re: Max and Min of Random on: 2012-02-15 22:23:21
    public float nextFloat() {
        return next(24) / ((float)(1 << 24));

Are you sure 24 distinct random values are enough for you? Lips Sealed is an internal method which takes the number of bits as argument.
10  Game Development / Newbie & Debugging Questions / Re: Problem with Slick 2d Image / Graphics on: 2012-02-12 18:13:18
GLContext.getCapabilities() return null when the current thread has no GL context active.
11  Game Development / Newbie & Debugging Questions / Re: Loading wav, MP3 and MIDI from INSIDE a .jar file on: 2012-02-11 09:50:26
You should not use getClass() for resource loading as this will break when the class is sub classed. Use MidiPlayer.class.getResource() to have a fixed starting point.
Also make sure that the resources are in the same JAR as the class you use as a base reference otherwise you could get issues depending on how the class loaders are setup.
12  Game Development / Newbie & Debugging Questions / Re: RPG inventory on: 2012-02-03 23:02:09
I have a Inventory Demo which shows 4 gems which you can drag around. The source code is available on my site.
13  Game Development / Newbie & Debugging Questions / Re: varargs question on: 2012-01-22 13:56:28
String.format expects an Object[] where each entry corresponds to one argument you want to format.
You could try this:
Object[] tmp = new Object[hex.length];
for(int i=0 ; i<hex.length ; i++) {
   tmp[i] = Integer.valueOf(hex[i] & 255);
return String.format(format, tmp);
14  Game Development / Newbie & Debugging Questions / Re: ConcurrentModificationException on: 2012-01-21 08:01:22
An easy way to remove (or add) entries while iterating over an array (or ArrayList) without using the for-each loop or Iterator is to use array indices and walk backwards through the array:
for(int i=list.size() ; i-->0 ;) {
   Entry e = list.get(i);
   if(someTest(e)) {

This works because any modification of the array/list at or after the current index won't affect the rest of the loop.
15  Game Development / Newbie & Debugging Questions / Re: ConcurrentModificationException on: 2012-01-20 12:47:21
ArrayList.clear() does null out all used slots. Where did you get that false information from?
16  Game Development / Newbie & Debugging Questions / Re: ConcurrentModificationException on: 2012-01-19 22:17:55
Iterator is nearly never thread safe. There are only very few collections (eg java.util.concurrent.*) which are thread safe on their own - everything else needs external locking.
17  Game Development / Newbie & Debugging Questions / Re: How to decide...short, long, int, byte, etc. on: 2011-09-21 06:09:07
Fields take only the required amount of storage - so a short is smaller then an int. Java will always align fields to a multiple of their size - so that you don't get unaligned access. Access to these fields is not slower then other fields.

On the other hand if you put small data types on the stack or as method parameters then it needs additional instructions to enforce the desired overflow behavior.
18  Java Game APIs & Engines / OpenGL Development / Re: Custom tooltips in games on: 2011-09-20 06:44:37
I was considering using TWL for the window system in my game but after I noticed that the jar was like 800kb I reconsidered Sad, the whole game is currently 500kb and seeing as it's an applet it can't take forever to download on slow connections...
Ever heard of pack200 & lzma ? Even with only gzip the file size is below 200KB - with lzma it should be below 150KB 172KB. And LWJGL's AppletLoader directly support pack200 + lzma or gzip.

Edit: fixed size (based on real value of nightly build server) - not sure if I stripped debug symbols or not.
19  Java Game APIs & Engines / OpenGL Development / Re: Custom tooltips in games on: 2011-09-17 23:31:39
Take a look, if suits your needs.
You can easily write a JOGL backend - it's all interface based. I even have a minimalistic Java2D backend Tongue
20  Java Game APIs & Engines / OpenGL Development / Re: Custom tooltips in games on: 2011-09-11 15:02:49
You could just use TWL for your UI - it has full support for tooltips - even including XHTML + CSS rendering including tables and floating elements.
21  Java Game APIs & Engines / Java 2D / Re: Fast Free Commercially Useable PNG Decoder? on: 2011-08-24 18:47:33
I did not write PNGDecoder to be used with BufferedImage - it is intended to be used with OpenGL and it decodes into formats understood by OpenGL. And for that it is probably the fastest decoder (and it is small).

As for the byte order - just look at the Format enum (eg RGBA, BGRA etc).
22  Game Development / Shared Code / Re: Easy readable PNG decoder on: 2011-05-15 12:02:25
Well - I wouldn't call this code readable Smiley

And I would say my PNG decoder is even more feature complete and has documentation Smiley
23  Game Development / Shared Code / Re: Simple "console like" chat on: 2011-03-01 01:32:10
You could also take a look at the TWL Chat Demo and it's source code.
24  Discussions / General Discussions / Re: Vote now in the official JGO logo contest thread with this topic on: 2011-01-04 22:11:05
b++ because the blue fits better with the current theme of the forum
25  Game Development / Shared Code / Re: Cuckoo hashing code[important update**2] on: 2010-12-30 15:26:27
Using an identity hashmap for wrapper classes together with auto boxing is a guarantee for failure. As long as your keys are within the cached range it looks like it will work. But once you use keys outside the cached range (mostly 0..255) you get different objects for the same integer.

So if you use identity hashcode you must use ==. Then you can't use auto boxing.
26  Game Development / Newbie & Debugging Questions / Re: simple interface within an opengl application on: 2010-12-18 18:39:27
If you're using JOGL, never mind TWL, but iirc it integrates with swing/awt nicer than LWJGL, so that would be the direction to look in.
TWL can also be used with JOGL. You just have to write (or port) a Renderer implementation.
TWL's rendering & input subsystem is completely abstracted. The provided renderer for LWJGL is a simple GL11 based renderer. With libgdx you can run TWL also on Android. If you want you could even render it using AWT :DD
27  Games Center / WIP games, tools & toy projects / TWL TextArea Demo on: 2010-06-15 21:29:57
This demo shows some features of TWL's TextArea widget.

(hint: click on the portrait in the demo) (This forum doesn't want to show the screen shots in full size, so just click on them to get the full size version)

These files are used in the demo:
Floating <div> demo HTML file
Table demo HTML file
CSS file for both HTML files
Java code
XML theme file for the demo

* text alignment
* images
* widgets (uses HTML's <button> element)
* tables (with column spanning)
* floating elements
* unordered lists
* inline styles
* CSS style sheets
28  Game Development / Shared Code / Re: TWL's PNGDecoder now available as standalone JAR on: 2010-05-19 17:48:40
The package is part of core J2SE - so that's always available.

What do you mean with only palettized?!? It supports every non interlaced format except 16 bit per component.
29  Game Development / Shared Code / Re: TWL's PNGDecoder now available as standalone JAR on: 2010-05-19 17:10:47
It uses Inflater from and I did not provide a hook to exchange it with another zlib implementation.

What's that all about custom zlib versions? Are there huge performance gains by using a Java based zlib (which I doubt)? The additional code size is an issue, I want to keep the library small.
30  Game Development / Shared Code / Re: TWL's PNGDecoder now available as standalone JAR on: 2010-05-15 22:27:38
Thanks Riven, it's fixed in the repository Smiley

And the main benefit of this PNGDecoder is the ability to decode into a NIO buffer in OpenGL compatible formats. This avoids unnecessary memory copies. To support NPOT textures it's also possible to specify the stride.
Pages: [1] 2 3
Archive (35 views)
2017-04-27 17:45:51

buddyBro (244 views)
2017-04-05 03:38:00

CopyableCougar4 (668 views)
2017-03-24 15:39:42

theagentd (666 views)
2017-03-24 15:32:08

Rule (715 views)
2017-03-19 12:43:22

Rule (689 views)
2017-03-19 12:42:17

Rule (691 views)
2017-03-19 12:36:21

theagentd (705 views)
2017-03-16 05:07:07

theagentd (637 views)
2017-03-15 22:37:06

theagentd (478 views)
2017-03-15 22:32:18
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 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!