Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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 ... 7
1  Java Game APIs & Engines / Engines, Libraries and Tools / Re: libgdx goes HTML5 on: 2012-03-14 16:43:11
All the major browsers except IE support WebGL now (with some caveats, e.g. Firefox blacklists some graphics cards).
Unless you consider that perhaps mobile browsers aught to be considered major these days (at least, they can't be ignored).
2  Discussions / General Discussions / Re: SCRATCH : An excellent tool for learning the basics of programming on: 2012-03-02 12:23:08
As Adobe is progressively dropping support of its products for GNU Linux, using Flash is a bad idea in my humble opinion.
Also mobile obviously, which is perhaps more of a pragmatic concern for many game developers (although of course you can build mobile apps with Flash).
3  Discussions / General Discussions / Re: SCRATCH : An excellent tool for learning the basics of programming on: 2012-03-02 12:20:48
Check out Microsoft's Kodu too.  Very high level, game-like interface.  Allows to very easily create environments, add agents with programmed behaviours, player controlled aspects etc and have it all turn out rather playable and pretty.
4  Discussions / General Discussions / Re: Getting things Done (Pimping my own blog) on: 2012-02-07 12:50:18
@theagentd sounds similar to TDD? heard lots of good things about that but never got around to actually trying it yet.
It sounds like an informal version of TDD (and a very sensible approach).  The way he describes it, the tests aren't automated. I suppose that is a fairly important distinction from what advocates would call 'proper' TDD.  Also the features he describes are relatively large and complex; one might combine the approach he describes with even smaller unit tests precisely defined aspects: for example, he might have specific tests for things like 'off by one pixel' type errors in his fog of war system as well as the program he can run to eyeball test the whole fog of war system.

Personally, I've flirted with unit-testing and indeed found it quite useful at times... I could see the benefit of doing it more properly, but haven't quite gone that far. Maybe on the next project...
5  Discussions / General Discussions / Re: Programming language decisions on: 2012-01-26 21:25:06
I think Java is the best platform available for most general tasks. It's fairly easy to use and you can produce excellent results in a reasonable time window with a fair amount of work. The resulting programs cover an amazingly wide area like servers, desktops (GUI), games, etc.

I've professionally programmed many years in assembler, C, C++, Pascal/Delphi, Java and even particpated in some 40 years old Fortran programs (that's not so funny). But Java was and is the only platform I see as a really smart tool to produce the software you actually need to, without too many restrictions and crazy hurdles.
(I.e. when you've to hunt "memory leaks" in a huge C++ application developed by a team of people including you in several years of work, you'll see that basically C is just another variation of macro assembler and C++ is just an object orientated macro assembler. So, no matter if a byte shifting program in C is 20% or 30% faster than a Java byte shifter, you really don't want to go back normally. And I didn't mention byte shifting accidentidally, because today's software usually is no byte shifter anymore because you've got your hardware or libraries for that. Using the correct algorithms and data structures (Collections) in your application is usually the key for performance.)  

By using Java as platform you don't get chained to a certain operating system and still have got a powerful programming language at your hands.
Usually as a software developer you're confrontated with certain tasks to solve in software for a certain platform, and the main question is: will you manage to develier the finished product? And for all that Java is the real "Software Swiss Knife" in my experience. It's still a knife, and work will always be work, but it's a smart tool for a good work.

Howgh. :-)

It seems most of what you say applies to C# / Mono, only I'm still not really aware of a way to bring Java code directly to iOS.
6  Discussions / General Discussions / Re: Programming language decisions on: 2012-01-16 18:53:18
Visual Studio is really quite good.  I wish I had it's debugging features in Eclipse.

Out of curiosity, what debugging features does it have that Eclipse is lacking?  I would have thought Eclipse would have been very comparable feature-wise to VS, at least for C#/managed code languages.  Especially with Eclipse's more rapid release cycle.

Off the top of my head (having not really done much Java for a little while), Eclipse lacks things like 'set next statement' and also isn't so quick to inspect items as you hover over them... tbh I find them both much of a muchness for debugging.

C# is IMHO a nicer language: properties, operator overload and delegates were already mentioned, also LINQ, some handy parallel stuff... I wouldn't want to write C# without ReSharper though (mostly because it does stuff similar to what Eclipse, Netbeans etc do for free), and that means not only paying for r# but also getting VS Pro as Express doesn't support extensions IIRC.

Sorry to say it, but in practice in terms of getting a game out there, C# seems better... Mono effectively allows you to reach desktop platforms similarly to Java, but also iOS which is not to be sniffed at.  I'd like to know what the performance of Monotouch / droid is really like though, since I'll be starting to prototype some iOS stuff soon and it looks like an appealing approach, but Monotouch is another chunk of money to lay down so it would be a shame if that was wasted...

Must admit, the culture around C# does feel rather less free...

XNA is mostly a nice API, though I do have some reservations.
7  Discussions / General Discussions / Re: New people, please comments! on: 2011-12-08 17:37:12
Greetings to the OP.

Sorry, this conversation reminded me of the Orz Grin (Star Control 2, for the uninitiated).

what a hellova game
and it lives!
8  Java Game APIs & Engines / OpenGL Development / Re: Getting out of the stone age - baseline OpenGL functionality on: 2011-12-05 18:38:11
just to prove my point - a friend of mine told me he is buying a "IBM T42" Laptop - because he doesnt need anything powerful

Intel  Pentium M (Centrino) 1,7 GHz 400 MHz
1 GB 400 MHz DDR1
and ATi Radeon 7500 32 MB  -> (which supports OpenGL 1.4)

And when doing 2D games I think of awesome games like Diablo 2 and their requirements - a game that would run on that laptop no problem
It's weaker than my PSP. I'm actually laughing my ass off at him if he's paying for that shit. Is he, and how much?
Not everyone is happy to ride the evil-capitalist-conspiracy planned obsolescence train.  Also, IBM Thinkpads are well regarded for being pretty reliable machines.
9  Discussions / General Discussions / Re: AMD Open Sources Aparapi! on: 2011-12-02 11:26:38
I thought this may as well have some code tags:
Here you go.

 * An example Aparapi application which demonstrates Conways 'Game Of Life'.
 * Original code from Witold Bolt's site
 * Converted to use int buffer and some performance tweaks by Gary Frost
 * @author Wiltold Bolt
 * @author Gary Frost

public class Main{

    * LifeKernel represents the data parallel algorithm describing by Conway's game of life.
    * We examine the state of each pixel and its 8 neighbors and apply the following rules.
    * if pixel is dead (off) and number of neighbors == 3 {
    *       pixel is turned on
    * } else if pixel is alive (on) and number of neighbors is neither 2 or 3
    *       pixel is turned off
    * }
    * We use an image buffer which is 2*width*height the size of screen and we use fromBase and toBase to track which half of the buffer is being mutated for each pass. We basically
    * copy from getGlobalId()+fromBase to getGlobalId()+toBase;
    * Prior to each pass the values of fromBase and toBase are swapped.

   public static class LifeKernel extends Kernel{

      private static final int ALIVE = 0xffffff;

      private static final int DEAD = 0;

      private final int[] imageData;

      private final int width;

      private final int height;

      private int fromBase;

      private int toBase;

      public LifeKernel(int _width, int _height, BufferedImage _image) {
         imageData = ((DataBufferInt) _image.getRaster().getDataBuffer()).getData();
         width = _width;
         height = _height;
         fromBase = height * width;
         toBase = 0;
         setExplicit(true); // This gives us a performance boost
         /** draw a line across the image **/
         for (int i = width * (height / 2) + width / 10; i < width * (height / 2 + 1) - width / 10; i++) {
            imageData[i] = LifeKernel.ALIVE;
         put(imageData); // Because we are using explicit buffer management we must put the imageData array


      @Override public void run() {
         int gid = getGlobalId();
         int to = gid + toBase;
         int from = gid + fromBase;
         int x = gid % width;
         int y = gid / width;

         if ((x == 0 || x == width - 1 || y == 0 || y == height - 1)) {
            // This pixel is on the border of the view, just keep existing value
           imageData[to] = imageData[from];
         } else {
            // Count the number of neighbors.  We use (value&1x) to turn pixel value into either 0 or 1
           int neighbors = (imageData[from - 1] & 1) + // EAST
                 (imageData[from + 1] & 1) + // WEST
                 (imageData[from - width - 1] & 1) + // NORTHEAST                
                 (imageData[from - width] & 1) + // NORTH
                 (imageData[from - width + 1] & 1) + // NORTHWEST
                 (imageData[from + width - 1] & 1) + // SOUTHEAST
                 (imageData[from + width] & 1) + // SOUTH
                 (imageData[from + width + 1] & 1); // SOUTHWEST

            // The game of life logic
           if (neighbors == 3 || (neighbors == 2 && imageData[from] == ALIVE)) {
               imageData[to] = ALIVE;
            } else {
               imageData[to] = DEAD;



      public void nextGeneration() {
         // swap fromBase and toBase
        int swap = fromBase;
         fromBase = toBase;
         toBase = swap;

         execute(width * height);


   public static void main(String[] _args) {

      JFrame frame = new JFrame("Game of Life");
      final int width = Integer.getInteger("width", 1024 + 512);

      final int height = Integer.getInteger("height", 768);

      // Buffer is twice the size as the screen.  We will alternate between mutating data from top to bottom
     // and bottom to top in alternate generation passses. The LifeKernel will track which pass is which
     final BufferedImage image = new BufferedImage(width, height * 2, BufferedImage.TYPE_INT_RGB);

      final LifeKernel lifeKernel = new LifeKernel(width, height, image);

      // Create a component for viewing the offsecreen image
     @SuppressWarnings("serial") JComponent viewer = new JComponent(){
         @Override public void paintComponent(Graphics g) {
            if (lifeKernel.isExplicit()) {
               lifeKernel.get(lifeKernel.imageData); // We only pull the imageData when we intend to use it.
            // We copy one half of the offscreen buffer to the viewer, we copy the half that we just mutated.
           if (lifeKernel.fromBase == 0) {
               g.drawImage(image, 0, 0, width, height, 0, 0, width, height, this);
            } else {
               g.drawImage(image, 0, 0, width, height, 0, height, width, 2 * height, this);

      // Set the default size and add to the frames content pane
     viewer.setPreferredSize(new Dimension(width, height));
      // Swing housekeeping

      long start = System.currentTimeMillis();
      long generations = 0;
      while (true) {
         lifeKernel.nextGeneration();  // Work is performed here
        viewer.repaint();             // Request a repaint of the viewer (causes paintComponent(Graphics) to be called later not synchronous
         long now = System.currentTimeMillis();
         if (now - start > 1000) {
            frame.setTitle(lifeKernel.getExecutionMode() + " generations per second: " + (generations * 1000.0) / (now - start));
            start = now;
            generations = 0;


10  Game Development / Newbie & Debugging Questions / Re: Randomly Generated Terrain on: 2011-11-29 15:37:49
I have generated some random terrain a few days ago and posted a blog entry about it including my (bad) code.

p.s. your code looks pretty normal; good for you for being open and sharing it along with your thoughts.
11  Discussions / General Discussions / Re: Releasing a small library on: 2011-11-28 13:21:01
all those &@*(# .svn directories that litter every single folder in the checkout
Actually, since SVN 1.7 it doesn't use those folders.  This is a pretty recent change.
A key feature of the changes introduced in Subversion 1.7 is the centralization of working copy metadata storage into a single location. Instead of a .svn directory in every directory in the working copy, Subversion 1.7 working copies have just one .svn directory—in the root of the working copy. This directory includes (among other things) an SQLite-backed database which contains all of the metadata Subversion needs for that working copy.

Even though the data is stored in a structured format, the relationships between the data are complex. We highly discourage external tools from modifying the data held in this database, as such modification is likely to result in working copy corruption.

WARNING: It is not safe to copy an SQLite file while it's being accessed via the SQLite libraries. Consequently, duplicating a working copy (using tar, cp, or rsync) that is being accessed by a Subversion process is not supported for Subversion 1.7 working copies, and may cause the duplicate (new) working copy to be created corrupted. (See issue #3596 for details.)
12  Discussions / General Discussions / Re: AMD Open Sources Aparapi! on: 2011-10-15 11:38:57
I'm just making a little hello world (won't probably have a chance to do much more than that in the next couple of weeks).

I notice that Kernel has various scalar maths methods implemented... I wonder how non-scalar OpenCL primitives and operations could be used.  It seems performance will be compromised for things like graphics and physics if these are inaccessible, am I right?
13  Discussions / General Discussions / Re: Using GWT to go from Java to Java Script on: 2011-10-13 14:19:33

Works great in Chrome, I got a little hooked...

I take it that being mobile-friendly is one of your goals with this, so I tried it out on my phone (Moto Defy), and while it works (which is cool) there are a couple of problems.  All of these only apply to the phone.

One is that every tap causes the whole canvas element to be momentarily selected, so you see a translucent orange rectangle over the whole game...
The first time I ran it it seemed to be stuck on loading, although I looked at the phone again a little later and it was done.  I tried it on a different browser and the loading showed steady progress and happened fairly quickly, I seem to remember it not handling going down to dungeon well at some point, but I just gave it another go and it seems ok.
Actually, it seems to just become unresponsive fairly randomly... so that's not good.
I tried to enable music and it didn't work.

FWIW, the first browser I tried was Miren & the next Boat; AFAIK they are both just different GUIs on the same Android Webkit engine, not sure.
14  Games Center / Archived Projects / Re: Crabs! on: 2011-10-11 23:23:54
Just gave the version currently linked by the qr code in the first post a quick try on my Defy (which doesn't officially run 2.3).

Framerate starts to drop below 30 (to about 26) with 500 crabs.  1000 crabs is 15fps,  2000 crabs is sitting at about 5-7fps.
15  Discussions / General Discussions / Re: Eclipse vs. Netbeans on: 2011-03-24 13:47:39
Emacs?Huh you are insane!

vi is the way to go!  Smiley
I still chuckle to myself inwardly every time I type 'vi' into launchy to start Visual Studio.  Sad, I know.

I do use vim occasionally to make small changes to files on a webserver (even though pspad is more comfortable for that really since I never really learnt how to use vim very effectively).
16  Discussions / General Discussions / Re: Go on, ask me anything. on: 2011-03-23 01:34:53
Um i just started using Eclipse and i found the short discussion on the set up of eclipse very useful.. So you helped someone :/ Thx.

i'm using the Java Browsing mode and moved the panes to the right where there's empty space.
Myself, I prefer to use shortcuts to bring up browsers which you can then navigate with find-as-you-type search...
Ctrl+Shift+T: type browser
Ctrl+Shift+R: resource browser (for non-java files)
Ctrl+O: member browser

Ctrl-3: searches through lots of available options & commands etc.

Alt+left/right: navigate back/forward through history of where you've been
Alt+Shift+up/down: select progressively larger/smaller logical block from caret.
Ctrl+. / Ctrl+,: navigate through annotations (TODOs, warnings, errors etc).

As you can possibly gather, I find it beneficial to avoid switching to the mouse unnecessarily (or trying to find a particular thing by reading through lists rather than typing... ugh).
17  Game Development / Newbie & Debugging Questions / Re: LWJGL Beginning on: 2011-03-17 18:18:51
So would I not be able to use the old java classes such as Image and ImageIcon while using LWJGL?
Not directly.  You'll have to get at the actual Image data and take care of setting up GPU memory and transferring it to OpenGL.  I'm sure there are examples of that about.

I'm not actually familiar with LWJGL; FWIW JOGL has some helper classes for loading textures and such... in fact, the JOGL source might not be such a bad place to look for an example of how to load data from a Java Image into an OpenGL texture.
18  Games Center / Contests / Re: Sprite Shootout Contest Thread on: 2011-03-17 13:55:19
No reason not to do bubblemark, but would it not also make sense to at least try something that involves several different sprites, perhaps some animation, etc?
19  Discussions / General Discussions / Re: Go on, ask me anything. on: 2011-03-16 19:23:02
Various dumb implementations of algorithms that didn't scale well such as turrets targeting gidrahs every frame, etc. Quadtree was a crappy choice of collision manager as nearly everything is roughly the same size or smaller - changed that to a cell based collision manager, got loads more performance.
I guess I won't bother implementing that octree collision manager then Smiley
20  Discussions / General Discussions / Re: Go on, ask me anything. on: 2011-03-16 00:34:34
Hey, Cas is just down the road from me (Farnham).  I often go to Basingstoke and shop in Festival Place.  There's quite a good sports centre, although I haven't been there for a while.  There was a ice rink, which I staggered round a couple of years ago.
I live in Winchester, and often pass through on the train on the way to London... rarely have any reason to actually go to Basingstoke, though.  The Anvil (concert hall) is good.  I've been around the ice rink a few times in my childhood...
21  Game Development / Newbie & Debugging Questions / Re: Actually got past newbie gamedev programmers block last night on: 2011-03-11 23:30:14
Well, I'm not exactly a newb anymore, although I feel like one sometimes.

Encouraging to read some positive words Smiley
22  Game Development / Newbie & Debugging Questions / Re: Keeping a local disk-based cache of online resources (facebook images) on: 2011-03-08 19:46:50
I'm not talking about the caching in a browser, but rather implementing something similar in my own program (otherwise, I could just let the browser get on with managing its cache and probably not have to worry about it).  Thanks for the link though, that's probably what I should have read before.

I suppose my problem is probably to do with the indirection introduced eg
gets resolved to

Still haven't really looked into this all that properly.

@Eli, many thanks for the reply; ImageIO might be just the ticket.
23  Game Development / Game Play & Game Design / Re: I just realized something, i love bad games now! on: 2011-03-07 19:25:28
Sadly today most people only focus on the eye-candy instead of the game and basically the companies give them just that.

pffft, I'm sure people have been swaying that since before DOOM came out.  Not that there's no truth in it, but ultimately good games do well for being good games.
24  Game Development / Newbie & Debugging Questions / Re: Best choice for making a Graph Layout like this on: 2011-03-07 19:01:12
As well as springs for edges you might consider using a force to gently repel all nodes from each other (I have some stuff that is similar, unfortunately not in the form of an open source library that I can point you to just now).

EDIT: also, you might look at
25  Game Development / Newbie & Debugging Questions / Keeping a local disk-based cache of online resources (facebook images) on: 2011-03-07 17:44:08
So, I've tried StackOverflow and the facebook dev forum but no-one seems to be helping thus far. Cry

I must admit I could probably have done some more thorough research myself, but it seems like something that someone with the appropriate knowledge might be able to recognise and explain relatively easily (I hope).  I suppose if it was all that simple, someone in SO would probably have chimed in.

I'm doing some stuff with facebook which means that I want to keep a cache of pictures.  I thought that it should be correct to just use URLConnection.setIfModifiedSince() before connecting and then check for a 304 return code, but it seems facebook is using some other HTTP headers rather than last-modified to control caching and in my brief searches I haven't found anything that really helps me understand what or why.  I'm pretty naive when it comes to the nitty-gritty of HTTP, but looking at request details in Chrome's network monitor I see various X-* headers which appear to be relevant...

More details can be found on the Stack Overflow question, any help here or over there much appreciated.
26  Discussions / General Discussions / Re: Java web store is gone on: 2011-01-25 18:39:14
It was an example of everything that was wrong with Sun in regards to client-side Java; a cool ideas left partially implemented with no real business direction.
Sounds about right.
27  Discussions / Miscellaneous Topics / Re: Want to be linked by my site? on: 2011-01-14 19:32:08
table are good

div are great for many cases but table are just the best when needing "table like" presentation

you can look at that code too

Smiley I was only partly joking to begin with.  I think many of people's objections to tables are because they're caught up in all the orthodox religious fervor, rather than any actually thinking through what matters.  For example, separating content and presentation is indeed a good thing... but with a dynamic site the html markup generation is generally separate from the content authoring anyway, so it seems a rather moot point.

I won't say CyanPrime should have used tables, but I bet he'd have had less hassle if he did, without needing funny spacer images, or implicit constraints between the width of #sidebar and the left margin of #content...  CSS is intensely irritating in many ways, while tables would indeed have expressed the same thing in a way that was clearer to anyone reading the code, easier to edit, etc.

Not really a criticism of CyanPrime; you're following 'best practices' apparently.

@Topic... maybe if I get my site in a slightly less neglected state then I'll want people to link to it Smiley
28  Discussions / General Discussions / Re: Vote now in the official JGO logo contest thread with this topic on: 2011-01-14 13:45:10
Although I'm not changing my vote (don't really feel all that strongly), note that of course Oracle's branding and design is all very red / white / black fwiw.  Not that I think JGO should mimic Oracle's corporate identity, but it means lots of official Java documentation looks like that and so on...
29  Game Development / Newbie & Debugging Questions / Re: simple interface within an opengl application on: 2011-01-14 13:07:16
His look and feel API actively breaks apps that run swing code outside the EDT! Pretty crazy
Seems crazy in a way, but of course it's better to catch potential errors as soon as possible, and to know when you are doing something wrong... or not to be allowed to do something if it is wrong.  It would be even better if they made this feedback come straight from the compiler, but I'm quite grateful for the fail fast approach of Substance.
30  Discussions / Miscellaneous Topics / Re: Want to be linked by my site? on: 2011-01-14 12:23:30 Wink
(nb, view source on that page)
Pages: [1] 2 3 ... 7

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

The first screenshot will be displayed as a thumbnail.

pw (17 views)
2014-07-24 01:59:36

Riven (17 views)
2014-07-23 21:16:32

Riven (14 views)
2014-07-23 21:07:15

Riven (17 views)
2014-07-23 20:56:16

ctomni231 (45 views)
2014-07-18 06:55:21

Zero Volt (40 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (36 views)
2014-07-16 23:30:00

Cero (51 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22 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!