Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (744)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (825)
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 ... 369
1  Game Development / Newbie & Debugging Questions / Re: Newbie to Game Development on: 2017-12-11 17:31:07
THIS JUST IN! New Advice.

If you want to learn to write games and code in general... get Pico-8 from Lexaloffle.

Moving from there to Java will be a cinch. And it's the most fun I've had programming for years.

Cas Smiley
2  Java Game APIs & Engines / Java 2D / Re: How to have BufferedImages take up less RAM on: 2017-12-08 09:00:23
There is no way around graphics taking up the amount of system RAM that they do. The best you can do is pack them all tightly into a single big BufferedImage and blit out chunks when you want.
"Blitting" btw is an old term, "blit" being short for "block image transfer". In other words, copying a rectangle of pixels from one place to another. It's almost always hardware accelerated these days, even with BufferedImage, and BufferedImage is a perfectly sensible way to do everything.

Of course if you wanted to do something a bit more modern you'd use JavaFX. And if you wanted to get a bit more fancy, LWJGL.

Cas Smiley
3  Java Game APIs & Engines / Java 2D / Re: How to have BufferedImages take up less RAM on: 2017-12-07 23:37:27
All in the docs: https://docs.oracle.com/javase/7/docs/api/java/awt/image/VolatileImage.html

Maybe more trouble than it's worth though. Exactly how much blitting are you going to be doing?

Cas Smiley
4  Java Game APIs & Engines / Java 2D / Re: How to have BufferedImages take up less RAM on: 2017-12-07 22:42:28
Seems right. The problem with VolatileImage is that they can randomly lose their contents so you need to keep the original around anyway to restore it.

Cas Smiley
5  Game Development / Shared Code / Re: Fast Atan2 [Again] on: 2017-12-07 09:03:27
Math.hypot() is much more accurate (unnecessarily so for our purposes).

Cas Smiley
6  Java Game APIs & Engines / Java 2D / Re: How to have BufferedImages take up less RAM on: 2017-12-06 08:57:02
The part about writing to a new image is for making sure the graphics object is ideal for the graphics configuration on the system. So, it draws a compatible image onto the BufferedImage itself, replacing the other version. So, it's not simply for hardware acceleration.
As I understand it BufferedImage already does this under the hood, so you are essentially wasting your time here I think (could probably prove this to yourself with some benchmarks).

Quote
   1) Is there a JVM argument that prevents this waste?
No. This is something you've got to get down and dirty with yourself, and it's pretty much a rite of passage in games development. Use the biggest sprite sheets you can get away with - 1024x1024 is supported by all video hardware these days, and actual dedicated GPUs all manage 4096x4096.

Quote
   2) Is loading one large image like a spritesheet more efficient than loading multiple images?
Vastly.

Cas Smiley
7  Game Development / Newbie & Debugging Questions / Re: coming up on being ready to deploy a project on: 2017-12-05 22:03:53
Launch4j works, Jsmooth too. We use one of those at work but I forget which one exactly, which is funny because it was only 2 months ago and I was the one that did it, haha.

I've had perfectly fine results simply embedding the whole JVM and writing my own JNI launcher in C++ on Windows and shellscripts for Linux/Mac. You probably don't even need the C++ launcher on Windows but it looks a bit more professional than a .bat file Cheesy So just do this. I haven't tried Oracle's java packager yet but I'm prepared to expect it to be crap in some way.

Cas Smiley
8  Game Development / Performance Tuning / Re: Java 9 GC on: 2017-12-01 09:49:49
So glad I switched over to C/C++
I have to use C at work every day... it's like trying to build the Taj Mahal out of matchsticks.

Cas Smiley
9  Game Development / Newbie & Debugging Questions / Re: Newbie to Game Development on: 2017-11-30 16:10:53
Copy an existing, tiny, simple game. If you can get that right, and finish it you've figured out a hell of a lot.

Assuming you're talking about a "real time arcade game" and not something with discrete turns like solitaire or a roguelike, you could do worse than trying to create Space Invaders or Breakout first. These are simple single-screen games, with trivial graphics and very few "things" going on.

You should be able to make either of those in pure Java using plain Java AWT APIs, or fancier JavaFX APIs. JavaFX is the new hotness and probably more long-term useful.

Cas Smiley
10  Game Development / Newbie & Debugging Questions / Re: Hosting your game on: 2017-11-30 15:49:35
"Millionaires think both" - default the $10k entry fee, everyone else gets in line to await moderation by the moderators who have been newly employed by Valve with the $10k entry fees to salary them...

Cas Smiley
11  Game Development / Performance Tuning / Re: Java 9 GC on: 2017-11-30 15:06:43
We're reasonably multithreaded in some places but the heap is definitely much smaller (under 1GB). What interested me was its consistency and high speed. Maybe the serial GC is all I really need though.

Cas Smiley
12  Game Development / Performance Tuning / Re: Java 9 GC on: 2017-11-30 13:45:24
Currently not really up to speed on the project, being diverted. I will return to it in the next few months but will likely mention the issue again around then, as it is vexing.
I am particularly keen to try the Shenandoah GC which as I understand it is available in the OpenJDK builds.

Cas Smiley
13  Game Development / Performance Tuning / Re: Java 9 GC on: 2017-11-30 12:41:27
@Spasi - it's been quite a long time since I really delved into it in any depth. The point being though that simply changing the garbage collector to -Xincgc doubled my framerate and the amount of garbage I was generating was already quite modest really. I did in the end even have to do something data oriented just to get my A* stuff working fast enough - instead of allocating and forgetting tens of thousands of A* "Nodes", I instead used large expanding arrays of int[] instead, effectively mostly managing my own memory... crap.

@Nsigma - thanks for the link (obviously, it's Googlable, but it's good to have it recorded here for posterity) - I guess I'll try each combo out in turn to find out what's best for my usage.

Cas Smiley
14  Game Development / Performance Tuning / Re: Java 9 GC on: 2017-11-30 11:24:24
Unfortunately not - all I can tell you is that it halves the framerate of Battledroid, and Eclipse seems to almost grind to a halt under Java 9.
(All 64-bit stuff, compressed OOPS)

Cas Smiley
15  Game Development / Performance Tuning / Java 9 GC on: 2017-11-30 09:33:14
The new default collector in Java 9 is G1. This is bad, because G1 is hopelessly slow and everything runs like it's going through treacle.
Can anyone recommend a set of commandline magic parameters that mimics good ol' -Xincgc?

Cas Smiley
16  Game Development / Newbie & Debugging Questions / Re: Hosting your game on: 2017-11-30 09:26:14
It's dead hard to make any money at all on Steam now. It's effectively been nerfed over and over and over by Valve to the point where it may not be worth it for many of the games on there. TBH Valve should probably increase the entry fee to $10k which would instantly remove 90% of the titles being release and leave only the serious contenders; everyone else can rightly and sensibly go to itch.io, which tbh is better than now Steam anyway.

Cas Smiley
17  Discussions / General Discussions / Re: would any of you guys be offended if on: 2017-11-30 09:23:49
Actually a great angle - hits a particular niche that's not often served. Might even spark a bit of controversy which is always good.

Cas Smiley
18  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-11-29 09:09:47
Looks ace. Volumetric lighting is one of the nicest effects.

Cas Smiley
19  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-24 08:50:54
All of the functional stream stuff in Java is pretty hard to understand by looking at it to be honest. This has always been the main problem with functional programming in general - to understand what it is doing you pretty much have to evaluate the bloody thing in your own head first which rather defeats the object somewhat.

Cas Smiley
20  Java Game APIs & Engines / Tools Discussion / Re: assimp jvm porting on: 2017-11-20 11:34:22
Not directly right now, but it's quite probable at some point in the future thanks to Unity's ubiquity, and, er, Chaz insisting on continuing to use 3dsMax instead of learning Blender. Hmph.

Cas Smiley
21  Java Game APIs & Engines / Tools Discussion / Re: assimp jvm porting on: 2017-11-20 11:27:41
Any news on fbx format?

Cas Smiley
22  Game Development / Newbie & Debugging Questions / Re: Hosting your game on: 2017-11-18 11:20:43
If you're trying to make money - Steam. If you just want other people to be able to see it, itch.io or Humble Store.
You might be wondering why we haven't got our own games on itch.io yet - mostly because it means doing more builds. The more games you have x the more places they need to be distributed = one monumental headache every time you do a general release. As only Steam has ever made a measurable amount of money for us compared to anywhere else (Humble Bundle notwithstanding) that's the only one we take seriously going forward but we are increasingly aware of Steam's despotic benevolence and this will eventually lead us to support itch.io fully.

Cas Smiley
23  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-16 14:52:56
That's nothing really to do with the language or even platform at all, but all about what APIs you're using.

Cas Smiley
24  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-16 13:29:53
Yes, String? is shorthand for String | Null.

The devil is in the details but I think Ceylon is currently still the design winner.

Cas Smiley
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-11-16 12:46:42
The way Azul's Zing VM handles all this is quite remarkably sensible... start here https://www.azul.com/products/zing/pgc/

Cas Smiley
26  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-16 12:40:14
https://blog.jooq.org/2016/03/15/ceylon-might-just-be-the-only-language-that-got-nulls-right/

Cas Smiley
27  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-16 12:39:34
Sounds like there's a correlation between people liking/disliking Kotlin and choice of favorite IDE.
See also: the suspicious schism that exists between Java and C# amongst Visual Studio programmers.

Cas Smiley
28  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-16 11:46:15
It's worth mentioning that Ceylon has first-class language support in Eclipse. And IMO is much easier to come to from Java than Kotlin as it remains lexically very similar.

Cas Smiley
29  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-16 11:14:00
Musing anecdote: the reason I got into Java so fast and wholeheartedly is that I found myself in a contract where they were using IBM VisualAge... the precursor to Eclipse. And originally developed for SmallTalk.

Cas Smiley
30  Discussions / General Discussions / Re: Move to Kotlin? on: 2017-11-16 11:02:50
I know there's a ton of support for Kotlin but seriously, I'm more interested in Ceylon, which I find to be far less jarring and different for different's sake.

Cas Smiley
Pages: [1] 2 3 ... 369
 
Ecumene (143 views)
2017-09-30 02:57:34

theagentd (207 views)
2017-09-26 18:23:31

cybrmynd (291 views)
2017-08-02 12:28:51

cybrmynd (283 views)
2017-08-02 12:19:43

cybrmynd (293 views)
2017-08-02 12:18:09

Sralse (286 views)
2017-07-25 17:13:48

Archive (953 views)
2017-04-27 17:45:51

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

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

theagentd (1421 views)
2017-03-24 15:32:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

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
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
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!