Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (801)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
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 ... 99
1  Games Center / Contests / Re: End of 4K. Thanks all! on: 2014-12-04 16:51:20
12 years is a long time. I was there when it started and now I'm here again to "press F to pay respect". Hah. What a timeless joke.

Thanks for getting this rolling, mlk.

Thanks for running the site for all these years, appel.

I had fun those two times I actually participated. It was a great competition. Smiley
2  Discussions / General Discussions / Re: History of JGO? on: 2013-02-14 22:41:15
Sun actually had some game related sub forum. The 4k stuff also started there. I don't really recall how the transition from Sun's forum to this one happened. I think Chris just announced it there and we happily abandoned the old forum.

I joined JGO over 10 years ago. Wow. Cheesy
3  Discussions / General Discussions / Re: Why java over other languages? on: 2013-02-10 21:08:30
[...]  Looking at the pre-and-post Java works of various early Java folks:

Gilad Bracha: Smalltalk

FWIW, he and Lars Bak (HotSpot & V8) are now working on Dart. Smiley
4  Games Center / 4K Game Competition - 2013 / Re: Rainbow Road on: 2013-01-29 01:13:18
Cool stuff. Smiley
5  Discussions / Miscellaneous Topics / Re: What music do you listen to while you code? on: 2012-11-20 03:19:19
For me, I *have* to have *non-lyrical* music, lyrics throw me off when I read anything.

I mostly prefer electronica, dubstep, and a little classical. I would love to get some suggestions for more artists in those (and other genres) too!

Traitor. Tongue
6  Discussions / General Discussions / Re: Java is pretty cool on: 2012-11-01 01:24:20

>Google are attempting only now to do something called Dart but of course it won't work anywhere outside of Chrome.

You can cross-compile it to (modern-ish) JavaScript. Right now you get about 75% of the speed of hand-written JavaScript, but I'm certain that they will reach at least 90% in the not too distant future.

You also get source-maps, which means it's still somewhat debuggable in this state.

Furthermore, there is tree-shaking (=dead code removal), which allows you to use large kitchen-sink libraries without having to pay for it. This is something which always bothered me with JS: every feature of your library is just dead weight in most cases.

Well, there is also some overhead for every language feature you use. So, there is quite a bit of initial overhead, but you still break even somewhere at the 50-100 kB mark.

>Browsers would probably have been far better off if they used some sort of bytecode [...] Maybe LLVM

It's funny that you say that. Wink

"Google already works on a multi-language bytecode: LLVM bitcode in PNaCl."


>If it weren't for Google pushing to great lengths to keep JavaScript relevant

Fun fact: Compared to 2007, JavaScript is almost 100 times faster now.

The original goal was to make it 20 times faster. (Dart's goal is to be 2 times faster than V8.)
7  Discussions / General Discussions / Re: Java is pretty cool on: 2012-10-31 00:28:12
> I would actually be interested what kinda tricks you guys use to find errors [in JS].

I use JSLint (as a plugin). It's a static code analysis tool. It restricts you to a somewhat less insane subset of JavaScript (see: JavaScript: The Good Parts) and it will tell you if you did something obviously stupid. Unlike other static code analysis tools, it's 100% accurate. Well, it kinda cheats. It only includes accurate tests and most of its test are actually about conventions. The theory is that adhering to conventions, which improve the quality of the code by dodging or sidestepping common issues, can improve the quality equally well as targeting bugs directly.

From my own experience I'd say that, yes, this strategy really does work. I actually use the same strategy for CSS architecture. I use simple rules which can be verified by machines. Sticking to those rules automatically yields good results, because doing things in stupid ways would be a lot more work. Fortunately, people are lazy. I exploit this law of nature.

Self-correcting processes are the way to go. I also believe that we should use machines as much as we can. That's why we invented them, to do the same stupid brainless crap a million times a day.

Another thing you can try is TDD (via Jasmine or Mocha). I only used it for libraries so far, but I think it can be really worthwhile... well, with libraries at least. TDD is just plain perfect for this.

> larger js [...] codebase

Well, just look at Google. They made the Closure Compiler (which uses type annotations), they made GWT, and they also made Dart. They apparently think that writing bigger programs in JavaScript isn't feasible. They should know. They wrote some of the larges and most popular JavaScript applications (maps, gmail, spreadsheets, ...).

Even though my own experience is somewhat limited, I have to agree. With JS, everything is just hot-glued together. Literally. You have to concat your scripts and then run them through a minifier (congratulations, you now need a build script). You also need a way to avoid this during development, because you need to be able to debug things. Your IDE can't help you much either, because it just can't know what those things or constructs are. Structure which was added by conventions isn't accessible to tools.

It's okay up to 5 kloc or so. It's less annoying if you're working alone on the code. If it weren't for the retarded scoping, I'd say that it's pretty much perfect for small games.
8  Discussions / General Discussions / Re: Java is pretty cool on: 2012-10-30 20:32:06
JavaScript is okay. If you use a text editor with JSLint integration, that is.

However, the function scoping and the behavior of "this" is just bat-shit insane. There are also no proper namespaces, modules, or something like that. You can import stuff in CSS. You can't do that in JS. There are hundreds of ways to roll your own classes an inheritance. As a result, your tools won't have a clue that those weird looking constructs are supposed to be classes.

Well, it certainly has massive scaling issues. Your tools can't help you. It's all smurfs and foobars. For example:

var x = Math.round(5).length;

We can be fairly certain that this "Math" thing is the one provided by many environments. We can also guess that "round" is the usual rounding function which returns a Number. But... does a Number instance have a "length" property? Well, no idea. Someone could have added it to that... thing. I can't know. To be honest, we also don't know if "Math" and "round" are those things we think they are.

Dart, my current favorite language, doesn't have any of those issues. Just like in Java, there are proper namespaces and stuff. You know what all of those things are. If you use a function from the Math package, it's that function from the Math package. Real lexical scoping, a sane "this", built-in classes/inheritance, etc. Unlike JS, it was created with tooling and performance in mind. And, well, it works. The editor is already way smarter than any JS IDE ever could be, startup is already 10 times faster, and the Dart VM is also already about 25% faster than V8 (Chrome's JS engine). Their goal is to make it at least twice as fast as V8. They will easily reach that goal, no doubt.
9  Discussions / General Discussions / Re: 'Resumable' random number generation on: 2012-10-25 22:18:49
Just implement something like Xorshift or WELL512 and add get/set functions for the internal state.

I really like Xorshift. It's very fast and it passes most PRNG test suites (like diehard), too. Its internal state are just 4 ints.
10  Discussions / General Discussions / Re: Oracle vs Google on: 2012-05-08 08:29:32
I'm glad that I'm doing most of my stuff with ECMAScript these days. What Oracle is doing there is really horrible for Java. Android was the best thing which ever happened to Java.

>Obviously Google are in the wrong

How so? Sun was fine with it.

Besides, Oracle stole SQL's API.
11  Discussions / General Discussions / Re: Java Lambdas Finalised! on: 2011-12-13 03:09:54
It references the method "plus" from a class called "Integer". Well, it's just an example. The class isn't necessarily java.lang.Integer. (They might add this kind of methods though.)
12  Discussions / General Discussions / Re: Java Lambdas Finalised! on: 2011-12-13 01:19:08
Check Spasi's link. It's a method (or constructor) reference. It's kinda odd, but I guess this will work, too. (It's basically a workaround for Java's lack of first-class functions.)
13  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-12-12 14:03:43
>array access is unnecessarily complicated since there's no get(int i)

$foo = array('a', 'b', 'c', 'd');
echo $foo[2]; // c

$bar = array(
   'one' => 'ichi',
   'two' => 'ni'
echo $bar['two']; // ni

Apart from those awkward arrows, it's pretty straightforward.
14  Discussions / Suggestions / Re: is it possible to suppress the appearance of a given avatar? on: 2011-12-11 15:40:48

1,614 bytes instead of 80,099. That's -98%.
15  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-12-11 04:45:11
Please don't use w3schools. They are not affiliated with the W3C and there are many better resources. See:

Also, I recommend to use JSON instead of XML. It's a lot easier on both sides (PHP and JS).
16  Discussions / Suggestions / Re: is it possible to suppress the appearance of a given avatar? on: 2011-12-10 13:10:36
I liked your old one better. Emo

*points at Nate*
17  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-12-10 12:58:17
>So you had to display matrix mathematics in your survey [...]

Nah. It's just a term we used internally for things where you rate a few different things on a scale from 1-5 (for example). There were the rating labels on the very top, the topics on the very left, and a radio button in every regular cell (I used JS to make the whole cell clickable).

It looks pretty much like this: (just with readable text n stuff Wink)

>SCORM sounds good, but there's no demo on the site [...]

It's a standard. There are a zillion different sites. But yes, it probably is total overkill. It's meant to cover anything you might possibly need for your elearning course. However, it should be fairly simple to use if you use a simple editor and a simple player. I can't recommend any though.

>The tips about error checking (ctrl+shift+j which works in Chrome too) [...]

It's even better to prevent issues beforehand. Try JSLint. I f-ing love it. It's what made JavaScript acceptable to me. (A good editor like Komodo Edit/IDE also helps a lot.)

>I can't include it in the public html file or else they'll cheat by looking it up before hand,
>so I'm thinking I'll put the question and answers in a private html file [...]

The best way to do this is to put it into the response, because that's what the intended flow is supposed to look like. You hand in your answer and then you're told which answers are (or would have been) correct.
18  Discussions / Suggestions / Re: is it possible to suppress the appearance of a given avatar? on: 2011-12-10 01:49:48
Firefox... right click on the image -> view image info -> [x] block images from (affects the whole domain, mind you)

As a user style:

19  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-12-08 19:16:57
I also hate javascript, HTML, CSS, PHP and friends. I've been learning it over the last 5 days to try and make online multi-choice exam questions for my students and it's been frustrating.[...]

Oh boy. That's quite the project. I actually did something similar last week. It was a survey with several pages, additional questions which are shown if you select specific answers, 14-15 languages, matrix questions, radio buttons, checkboxes, textareas, optional stuff, nagging if required stuff wasn't filled in, and things like that.

Pretty complicated, really.

I used a data-driven approach, client-sided templating (with inline templates), and event delegation. I used jQuery as base lib and underscore's template engine (I'd use Handlebars or plain Mustache nowadays).

This really isn't something a beginner could have pulled off. Also, someone was willing to pay about 5000€ for that. It really was quite a bit of work which required quite a bit of experience.

Well, take a look at SCORM. It's some kind of elearning standard. There are tools for creating those SCORM files and there are also players which display them. This might be exactly what you want.

[...]Jquery seemed like bloat so avoided it but I'll have a closer look now.

jQuery is bloat. However, it makes DOM manipulation/transversal, events, effects, and ajax a lot easier. You'll need very little code for all these things. It also takes care of compatibility issues (aka "browser normalization").

In most cases, it's totally worth those ~33kb (1.7.1, minified, gzipped).
20  Discussions / General Discussions / Re: Rasberry Pi stuff... on: 2011-11-26 00:18:54
FWIW, V8 runs pretty great on somewhat recent ARM CPUs.

>Jazelle is closed source

Well, the specs aren't freely available. Also, Jazelle is only interesting for interpreters. Basically, you have a software implementation of every op and you use that one if a hardware implementation isn't available. You jump back and forth all the time.

It's slower than JIT, but there is no warmup and no memory overhead. It's kinda nice but also kinda pointless (nowadays, anyhow).
21  Games Center / LWJGL16k - 2011 / Re: Ogg Vorbis is a red herring on: 2011-11-22 21:13:07
On a related note:

Crazy stuff. Cheesy
22  Games Center / LWJGL16k - 2011 / Re: Ogg Vorbis is a red herring on: 2011-11-21 21:44:19
Ogg/Vorbis files got about 3.5k of header overhead. This overhead collapses inside a solid archive, because that whole thing is essentially the same for all of your samples (except for 12 bytes somewhere at the beginning).

Zip (or jar for that matter) doesn't allow you to create solid archives.

(Solid archive = everything is compressed in one go, not individually.)
23  Discussions / General Discussions / Re: Still hardly any games, why entity systems suck, and why 4k is good on: 2011-11-15 21:10:30
>[...] even I've shifted 300,000 copies of Revenge of the Titans [...]

Ace. Smiley

>Linux: ditto. Ignore people who don't have Java already installed for now. Head pains, hair loss, etc. result from supporting Linux.

Ubuntu is shipped with Java. Also, Open Office (or Libre Office) requires Java. I guess that Java is installed on >90% of the Linux desktops.
24  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-11-13 20:39:13
To be honest, I think that box-sizing:border-box would have been the better default. It's a lot more powerful and also more flexible.
Agreed. We already have one property for outer padding, the margin, we don't need two. So it's much more useful if padding works inside width/height then outside. Working around this model is also much easier then working around the default model.
The key point is that it can be used in conjunction with percentage dimensions. Additionally, you don't have to do the math yourself if you're using fixed sizes.

So yea, Microsoft did have the right idea here.

By the way, this wasn't the first nor the last time that specs were incorrectly interpreted, because that incorrect interpretation sounds saner (i.e. more useful).

Personally, I still think the current box model was a mistake. It's very inconvenient and very limited. Fortunately we now do have a choice. If we don't need to support anything below IE8, that is.
25  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-11-12 21:56:05
Well, that's UBB for you. Sometimes you need quotes, sometimes they are optional, and sometimes they don't work.
26  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-11-12 18:37:50
And still shafted, because it requires Microsoft to implement it and roll it out.

Depends on your market. IE is below 30% in some countries. Also, IE's share is generally a lot lower among gamers.

I hate the box-model, been CSS'ing a bit lately, and it still whacks my mind.

See box-sizing.

To be honest, I think that box-sizing:border-box would have been the better default. It's a lot more powerful and also more flexible.
27  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-11-06 01:38:53
[talking about Node]
Ok when your workload is like that but nothing I've worked on before has really fit that particular workload. I can see a lot of specific cases where it would be fine but... more cases that aren't.[...]

Well, the workload of generating websites is perfect for this. Your own code always waits for the database/disc/caches/network/whatever. With an event loop you can do something else in the meantime and there is virtually no overhead.

I'd never use javascript for anything but the web.

I like it for scripting/automation. I.e. things I used to do with Python, batch files, or even small Java programs.
28  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-11-04 19:38:25
You don't actually need == and != in JavaScript though. I for one don't use them. It's a lot easier this way.
One place they are useful is if your not sure you'll be receiving a number, or a string representation of a number, or either (i.e. "1.0" == 1.0). For that, it's useful.

That's not something you should be doing. It makes everything more complicated. Now you have to document that it also accepts strings. For the sake of symmetry, lots of other functions now also have to accept strings. (Why the f- would anyone want to pass numbers around as strings anyways?)

Also, that "1.0" == 1.0 example is kinda unusual. FWIW, I'd write something like that as +foo === 1 (coerce to Number and then check if that number is 1).

Well, that is if I would allow numbers as strings. I don't. It's always a bug. See some number in quotes somewhere? That's a bug. Fix it.

If it's some text input from somewhere else, I turn it into a number right away. I won't even store the original string anywhere. I don't have any use for it.
29  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-11-04 15:59:01
warts like the need for ===  aside.
Lots of languages have separate comparators for "is equal to" == and "is identical to" ===.  Not supporting both would be officially bad.

You don't actually need == and != in JavaScript though. I for one don't use them. It's a lot easier this way.
30  Discussions / Miscellaneous Topics / Re: JavaScript is a scam on: 2011-11-04 11:53:34
They couldn't agree, to this day, on a standard format for offline, office documents... so...

Bad example. It's very difficult to write specs for that stuff and it's also very difficult to verify the correctness of a particular implementation.

Something like a VM is a lot easier. People know how to write specs for this kind of thing and you can describe every detail very precisely. Furthermore, you can easily and accurately verify the correctness of an implementation - you can write tests for everything.

Even Microsoft's JScript thing was pretty accurate and they didn't have any specs for that. They reverse engineered it. I kid you not.

Runtimes and VMs are really a zillion times more straightforward than document formats, HTML parsing (with it's million gotchas), or CSS.
Pages: [1] 2 3 ... 99
Riven (353 views)
2019-09-04 15:33:17

hadezbladez (5191 views)
2018-11-16 13:46:03

hadezbladez (2076 views)
2018-11-16 13:41:33

hadezbladez (5413 views)
2018-11-16 13:35:35

hadezbladez (1128 views)
2018-11-16 13:32:03

EgonOlsen (4550 views)
2018-06-10 19:43:48

EgonOlsen (5413 views)
2018-06-10 19:43:44

EgonOlsen (3090 views)
2018-06-10 19:43:20

DesertCoockie (3986 views)
2018-05-13 18:23:11

nelsongames (4590 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08 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!