Tenuous Java connection:It's written in Defold, which is a 2D games development platform from King; the Defold IDE is written in Clojure and JavaFX.

Cas

Congrats on the release, looks polished.I checked out Defold and noticed that there's lots of references to Lua. Is this the language that you program in to make games in Defold? Or is it just a scripting language to connect things you've programmed in some other language? Would be interesting to hear about your experiences with it.Cheers,Keith

It is actually Lua, yes. I've not personally made FSH, it was Brian Kramer of Subsoap who did the game with his brother Matt. Brian draws, Matt codes. According to them it's been absolutely great to use. Lua is a very nice scripting language as well - very simple, but powerful.

Spent the entire week working on a high performance TCP handler/wrapper that does connect/disconnect/read/write asynchronously. Communication is done via packets (preamble-byte, payload-length,payload-bytes,postamble-byte) to give some structure to the TCP stream. Packets are passed around in ArrayBlockingQueues and get pooled to avoid allocations.

The packet-objects offer a ByteBuffer like interface to read/write primitives and primitive arrays, implemented with Unsafe.

I think it's pretty fast already, below is a screengrab of the impact it has on my dual core laptop cpu while there are 500 clients connected to a single server over loopback. The server gets bombarded with 10000 messages per second (with 1416 byte payload each). That's 27 kilobyte/s per client, resulting in 113 Megabit/s total, all running on the same machine.

The server process itself uses around 2 - 2.5% of the combined cpu resources while the 5 processes with 100 clients each hover around 0.15% per process.

Anybody know similar frameworks/libraries? Do you know something faster than ArrayBlockingQueues for inter-thread message passing?

@princec Thanks! Jocket does interesting stuff for IPC, i want to do network communication though so this sadly isn't applicable. I had look at disruptor some time ago already and had the impression that it contains lots of bloat specific to financial applications, i just need a fast SPSC queue to move stuff between two threads. After looking into it some more i found this talk by LMAX: https://www.youtube.com/watch?v=DCdGlxBbKU4 I need to see if i can extract just their ringbuffer implementation, the performance seems to be much better than what ArrayBlockingQueue offers.

@SpasiAeron and the serialization library it uses employ some techniques that i have already incorporated, thanks for the tip! This talk of theirs was kinda interesting, worth skipping through at least: https://www.youtube.com/watch?v=tM4YskS94b0

Edit: Just implementing the Ringbuffer from the LMAX talk gives me performance that is around an order of magnitude greater than ArrayBlockingQueue with high consistency at the cost of possible overflows if the buffer is to small, here's the code:

The latency has gone down from jumping between 1 and 40 us to below 0.8us consistently, it's so fast that the resolution of System.nanotime() isn't sufficient to measure it anymore it seems to use discrete steps of 411ns from what i can see and the ringbuffer put() is most of the time at or below that mark.

I can now fetch a packet from the pool, fill it's buffer with ~1400 bytes of data and send it back to the socket-write-thread in ~4 microseconds average.

Long time not posting any progress, but it is huge from the last point when I reported. Still some work to be done before releasing a demo, but already getting close there.In last two month the following was done:- Implemented and scripted small tutorial- Integrated new UI (bought one, I am not good in PS at all)- Implemented dialogues (so the story telling can be done)- Integrated shadows for game objects (had a difficulty, since Blender would render a huge shadow around the object with very small but noticable alpha, so had to implement additional step in my asset management tool to remove alpha below threshold and make blur the remaining shadow, otherwise it would look edgy).- Implemented traps (to be placed in the forest) and collect objects feature

Finally finished all of the features I wanted for ClearDialogue. Got scaling working with ClearVG last night (was a bit tough but it worked out in a way I like). You can adjust the program scale per component, so you can have one aspect of your UI be at one scale and another aspect at a different scale. Meaning that ClearDialogue's canvas can be scaled differently from the UI itself. It's extremely flexible and I'm quite happy with it. It was easier than I thought it'd be, honestly.

I also got ClearVG working in non-ClearWindows applications (as in, we got it working with one of our internal NNGINE projects). Meaning that it's confirmed that it works in contexts where the user wants to use ClearVG but not ClearWindows. So to summarize, ClearVG will work with any GLFW windowing solution (or really any OpenGL context) you want. Again, nice and flexible like I intended.

It's a shame that no one seemed to have seen them when I posted them, but hopefully it'll help at least one person down the line. They're both open source and contain a lot of utilities from NNGINE as well as some new stuff exclusive to them, so they'd be useful for anyone wanting to have a shortcut past the tedious GLFW stuff you usually have to do to get a project going. Here are the project pages I made for them if any of you want to check them out:

Added fallback font support to ClearVG's Font class and was able to add emojis into ClearDialogue:

Meaning that ClearDialogue has special character support for every emoji now, instead of only a select few like JDialogue had. Users that use ClearVG can also make fallback fonts that do whatever they need them to do now, too. So it's a pretty great addition for what was like five minutes of work! Haha.

You can also see my syntax highlighting at work in ClearDialogue in this screenshot. In ClearDialogue it's used so that users can set custom syntax highlighting to match their game so that they can see if they've entered the codes for their specific engine correctly.

Yesterday, from an article (cited below), I had a realization about JLINK which I tested. This could be helpful for people who'd like to package their older games with a custom runtime but are finding the process complicated and confusing. (Assumption: the older code runs under Java 11.)

The simple realization is this: that we can just build a custom runtime once and reuse it with various projects.

Let's say an old 2D game just uses AWT/Swing (requires java.desktop module) and maybe some XML (requires java.xml module). You can build a runtime with the two modules using the parameters below and it will take up around 71 MB though with additional compression parameters the size drops to 38 MB (see article for details).

The main thing is the list of modules specified by --add-modules, and the file folder name where this is built (I used "/dist"). If other modules are needed (which can be determined by the jdeps command, again: see the article), they would be added to the --add-modules list.

Once you have a /dist folder, you can reuse it with various game programs, as long as your source only requires those modules and can run under Java 11. Just add in the source jar and maybe a one-line BAT or BASH file to call it using the new runtime (e.g., "bin\java -jar myGame.jar"), and there you have it: a folder with a runnable and self-contained runtime. (Further packaging would be needed for commercial release.)

I zipped the /dist folder (without including added source code jar) and it came to just 26 MB.

wtf do you do with your IDEs, I have used eclipse for years (and it wasn't that unstable, only some plugins were) until I switched to idea and I'm powerusing idea for more than 5 years without any real issues.

java-gaming.org 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‑gaming.org