Still hardly any games, why entity systems suck, and why 4k is good

I think I’ve been here for 10 years now. Java gaming has never really taken off in all that time - one or two notable exceptions, er, excepted. I am sort of surprised actually, given the sheer levels of success of various games that germinated here on JGO, that more attention never got focused on Java as a solution for gaming. Minecraft’s sold 4 million copies, even I’ve shifted 300,000 copies of Revenge of the Titans, Spiral Knights by OOO (unknown numbers but basically huge), Puzzle Pirates by the same, and there have been a few other notable smaller successes such as Blocks That Matter, Tribal Trouble, er… and a some others. And of course some other really big successes that grew entirely outside our ecosystem like Runescape and Popcap in the early days and… er… well. There are probably some others but as they don’t hang out here or make much of a fuss over using Java I don’t know about 'em.

Occasionally I’ve wondered why there aren’t more successes, especially given the obvious capabilities of the platform especially when enhanced with a smidged of enabling technology (I should probably make a strong point to note, much to gouessej’s obvious chagrin, that every single one of the games that have made it are based on LWJGL). Actually on the LWJGL vs JOGAmp subject it’s getting pretty difficult to make the case for JOGAmp in the light of the statistics of successful games that have made lots of money, although without any specific concrete reason I still couldn’t specifically recommend one over the other except for the fact I had a hand in kickstarting LWJGL.

A quick scan of the various topics that have come up over the last, oh, I dunno, year or so maybe, does point me in the direction of a theory or two as to why Java is failing to gain traction.

Firstly, this obsession with entity systems is the pustulent boil of a symptom which I used to call “object oriented wank”. This is where people get so bogged down designing systems to scale to 1,000,000 simultaneous players they never actually sit down and write a bloody game. This is probably Java’s greatest weakness and of course its greatest strength. It’s massively powerful and flexible. So powerful and flexible that people generally tend to get confused about what they’re actually trying to achieve, what they’re capable of achieving, why they’re doing it, and who gives a shit.

I’ll tell you this for free: an entity system will not get you on Steam. It will not make your code easier to understand. It will not finish your game for you. It is not as easy to understand as just having Some Entities In An ArrayList that all extend a base Entity class. The language does not make it easier to write the code. It does not really even solve a problem you should be having. Entity systems were developed for dealing with hundreds of thousands of entities, with vast numbers of permutations in ability and operations. You can use them in your space invaders game if you like, with all 100 entities in it (with just 5 sorts of entity). But your space invaders game will forever remain a hazy idea wafting away in your bong smoke. Get a grip on reality! Why is your game not finished yet?

This sort of thing is endemic in Java and is expressed in all sorts of silly ways. There’s obsessions with 3D scenegraphs when most people can’t even code a 2D game. There’s obsessions with using NIO (the API designed for thousands and thousands of simultaneous IO operations) when people can’t even write a server that handles 4 simultaneous realtime players.

This is why Java4k is so good.

With 4k you can barely do anything really. You can’t fit an entity system in to 4k. Well, you can, but there won’t be much of a game. In restriction there is freedom. The less you have to work with, the more you can actually achieve. Restriction is liberating. With a pencil you can’t be expected to paint the Sistine Chapel murals.

I implore you budding developers in here to lower your sights, stop wanking about, and get some prototyping done. For what it’s worth, I’ve noticed that Android phones are an awesome introduction to limited programming environments. With miserable performance and somewhat limited APIs you are nicely restricted in your ambitions. You should be able to design some pretty neat games and finish them on Android.

My trusty flameproof pants are, of course, washed and donned, but in my arrogance I choose to ignore your derision, from atop my mound of cash, as I write my next game.

Cas :slight_smile:




I should probably also place this card upon the table: I don’t even have time to write a 4k game :slight_smile:

Cas :slight_smile:

Oh, finally someone said it :slight_smile:

I love restrictions, because there are also pushing you to your limits and even open a new perspective on programming imho.

I agree with you. But I don’t think finishing games has to do with the power of Java or entity systems. Overengineering is a problem, but you will find these traits everywhere where people have high ambitions and where they use a programming language like Java or C++. Users of GameMaker or similar systems finish personal projects with a much higher rate. In my experience failing and aborting projects is the result of megalomania, the reluctance to use shotcuts and libraries, lack of discipline, and the general will to do everything on your own. This is why you choose such a powerful language in the first place. I often failed for similar reasons. I am an active “member” of the german hobby game programming scene for 10 years and I think more projects would have been finished if they would have used Java instead of C++. The average hobby game programmer in my orbit starts with writing an engine and gives up in the middle of this. C++ with its many pitfalls comes on top of that.

The motto is “Write games not engines.” and “Productivity over performance.”! Java4k and similar contests help people to realize constraints that they normally ignore when developing in their free time.

I would love to spend my working hours on writing games:/ Unfortunately, I don’t have the luxury (yet… I hope).
Else, I agree.

These are wise words, sir :slight_smile:
Don’t waste time with too much theory, just get your hands dirty as quick as possible.


Also, I’d been making proper games for 7 years entirely part-time before I released Revenge of the Titans, and now I’m “full time”. You do not need to work full time on games to finish games, or even produce really good games. Kev Glass has never been full time. Markus made Minecraft while he was still working somewhere (he quit in fairly short order when he couldn’t open the door for all the money being shoved through his letterbox).

Cas :slight_smile:

I like this post, because open a good discussion, but for newbie start with J4K is too limited.
My experience was to build a pacman clone, some shooters and a platform. All this little games, all 2d!, helps me a lot. Again, I’ve found myself in building a little library and share it online. So I’m between: some “dirty” work and “theory” too.
It’s right? It’s wrong? I don’t know!
For me game development with Java is an hobby, go and sell 4 million copies on Steam is not my main goal. What I want is build games.

For anyone play with Java, try other languages, see differences and experiment!!

I agree with main point: do one game game, from start to end, polish it and see how much is diffucult make it fun and not only a “demo”

edit: as programmer, I’m stuck with graphics. I’m not a pixel artist and I think Java development needs more tools to simplify graphics use. I’m not sure to be clear :-/

It is a bit more complicated and depends on social and cultural aspects too. For me part-time is a no go and I have to divide my free time between different subjects and objectives. So I am managing as good as I am, but writing games fulltime, is still a small dream of mine.

I call bullshit on this one; this isn’t a java problem, this is a ‘95% of developers are self absorbed, incompetent wankers’ problem. Language has nothing to do with it. As some one stated; it’s endemic in c++ game dev as well. Also, there’s an experience component involved; you learn the futility of over complicated designs from experience. No one can tell a doe eyed newb fresh from an OOP/Java course otherwise.

I agree with this 150%. The j4k is awesome, it’s akin to hacking assembler on a game boy color.

To those who say; just use libraries to shorten the path; there’s a cost there as well. Namely learnign api’s you didn’t create. Plus where does it end? At some point game development using 3rd party engines and frameworks turns into a content creation exercise.

Ten years huh? So what now, another 10 years beating this drum or join the ranks of people shipping games for multiple platforms in c/c++/obj c?

10 happy years :slight_smile: And I wouldn’t call bullshit on that first part, as it’s still actually true despite your expansion. But this is a Java games forum and the post is about Java games developers in here. Or Java not-games-developers as the case may be.

I agree about libraries. They are two-edged swords. Usually they’re far bigger and more powerful than you need, don’t quite work right anyway, generally unsupported, and difficult to learn. I’d stick with a very basic API and write a very basic library for yourself on top of that, and that’s as much as you need to do.

If there’s any advice I could really give about which library to learn, it’s OpenGL, which will do you well everywhere. Know OpenGL and you know LWJGL.

I don’t mind beating the drum, though I’m much quieter about it these days. The handful of absolute successes should probably be enough for you to know that the language or even platform are largely irrelevant to your success as a games developer. So: here we are in a Java gaming forum, about making games in Java. It can be done, and it’s not even hard. In fact it’s quite easy compared to C++.

Cas :slight_smile:

  1. Have a realistic design: game first, code based on game.
  2. Stub out a realistic schedule of tasks. If you start to slip, step back and figure out why and what needs to be done about it.
  3. Remember that it’s pretty rare for “the code” to be all that important. Game design, sound and art assets almost always make-or-break a playable game. We programmers what to think “awesome code” is much more important that it really is.

Logged in just to reply to this (hi, Cas!)

I can field this one. It’s failed to take off because of the segments of game developers:

  • Professional teams who know how to get publishing contracts and who specialize in desktop apps (i.e. not console): they already know C++, have C++ toolsets, and no-one ran a marketing campaign to change their minds. Microsoft spends $$$ every year persuading those people to “stay where you are”
  • 1-person Indies hoping to make a breakout success: Flash gives you 10x the opportunity on websites (e.g. Kongregate is still Flash-only. Any new indie developer who does NOT use Kongregate is a fool).
  • (recently) Indie teams trying to make cash out of iPhone: No JVM in the OS, and no-one of sufficient size/wealth offering to provide one (including all the support required). Meanwhile: Unity. If you want to use Java, you use Unity instead, and write in C# - it’s similar enough that java developers feel at home.

EDIT: missed one, the segment that are actually using Java:

  • 1-3 person “teams” that use Java but don’t have a strong intent to finish / launch their game. Mostly doing it (“programming”/“developing”) as a hobby - doesn’t actually matter if they ever launch it. Although they tell themselves otherwise. If you don’t believe me … go speak to some Flash developers, find out how aggressive they are in shipping games, every single month (or more often than that)

…the chance of salvation for many of the small developers. For some definition of “entity system”.

I’m inherently biased, but … for MOST developers, the massive shortcuts in iteration time for game design that a good ES provides outweigh any and all downsides.

Forget performance; this lets you get 5 versions of your game design done in 5 days - instead of in 5 months.

I’ve tried many different routes to achieve those things, and watched them be tried by other people’s teams too. An ES - used sensibly - empowers you to do those things, and greatly increases the chances of you achieving them.

I feel you’re shooting the messenger here: the problem is not the ES; rather, the ES merely exposes the real problem.

The problem is that most people doing java games don’t actually want to finish their game. They make games for the joy of the “continuously writing code” part - not for the “shipping a final, working, version that other people play” part.

I recently wrote an Android game and started publishing the builds after every 2-3 hours of development. The first build was already playable (although completely boring) - because I used an ES. I’ve never had a game playable (from scratch) in less than about 12 hours previous to that.

So. The problem is not the (use of) ES. PEBKAC (Problem Exists Between Keyboard And Chair)

TL;DR: Follow the money.

On the whole, the people who are genuinely interested in making a living out of game development find it easier / more profitable to use “things that are not Java”.

Either they should use Java but no stakeholder/owner of Java has ever bothered to persuade them otherwise … or they shouldn’t use Java, because no stakeholder/owner of Java has provided a viable JVM for them to use.

WRT: Component based entities. If you don’t care about speeding up temporal access patterns in your code (and all the related issues), then why on earth would one use a component based system? To my mind, in that case, one would be faking prototype based OO in a class-based OO language and pretty much getting the worst of both worlds. (yeah, yeah I’ve said all of this before) Really most people here don’t need to look any further than a reasonably well designed data-driven model. If one needs a little extra flexibility for scripting, simply add by name lookup of dynamically typed variables.

On Java as a viable user-end platform: I have found that Java is an exceptional language, by developers and for developers. As soon as end users get involved, Java is a mess: JVM,JRE,JWS,JNLP are all things users are exposed to when faced with a Java application. I’ve tried to make Island Forge into a single-file, download and double-click experience, but it’s ultimately impossible to hide the fact that you have a Java application. End users should not have to care what language/platform the software was developed under.

My game development experience writing Island Forge (client, server, everything, all from scratch in Java):

I (well, Potential Games LLC) have recently released Island Forge into open beta, and I encountered many of the issues raised in this discussion. Much of my code is over-engineered, just as princec and others have described. I’ve always wanted to create a MMO game engine, which is what I’ve done. I also have several other game designs I want to develop. Initially, I tried to make them all together (the one game to rule them all).

It took me a while, but I have learned (and continue to learn) to sharpen my focus. For me, the key to completing Island Forge was a mantra of simplicity (in game design and code). The game is so much more playable for it. It could even be simpler yet, and still be a fully-featured MMORPG. Think simple and playable.

Island Forge is a simple, yet fully playable MMORPG, offering many unique concepts and capabilities (and I’m very proud to have crafted it). Now, if I can just find people to play it, I might be able to get on with my next great game idea (I already have a really nice engine to run it on)…

On Entity Systems: I agree that the software philosophy is not important to the game, but I do insist on good software design. I was taught that OO design implied clumping together data and logic, and that all specialization was through inheritance. Then I read Design Patterns [Gamma, et al.].

I started Island Forge with a rather traditional approach, eventually eschewing inheritance from my game data model. (Inheritance still has a strong presence in Java development, but must only be used when the proper tool for the job.) Separating data objects from control logic greatly improved the overall maintainability (and sanity) of my 100k+ source lines of code.

An entity system is just a term for one (good, IMnsHO) approach to software design. I love to think about design patterns and frameworks, but in the end (actually, in the beginning), just come up with a consistent and clean model that allows you to implement your game. Don’t worry so much about what it’s called.

And indeed, my users don’t. It’s basically not a valid excuse! Our stuff "Just Works"TM on Windows and Mac OS. Remarkably it seems to work on Linux as well but they deserve all that happens to them. Only those inclined to pry know our games are written in Java.

@blah^3 - well, you know I’m fundamentally in agreement with you as to why Java is a general failure in the clientside games market. But I’m rather getting at why here, the nexus of Java games development, there’s an awful lot of talk and not much trousers. The Flash developers have got it right. They concentrate on shipping, largely within the fairly strict confines of what is available in Flash to keep them quite focused.

I don’t think I’ll ever agree with you about entity systems. At least, not until I a) start writing in javascript and b) start making the next World of Warcraft. Where an entity system would make the job easier. To the rest of you: you have Entities, and each entity will be one of Player, Bullet, Alien, Powerup, and EnemyBullet. This is almost exactly a perfect fit for inheritance. Now get on with the rest of your game!

Cas :slight_smile: