Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (565)
Games in Android Showcase (151)
games submitted by our members
Games in WIP (606)
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 ... 342
1  Game Development / Newbie & Debugging Questions / Re: Best Practise - Quad Trees on: 2015-03-30 15:44:01
Spasi did a nice optimisation and benchmark of a Java quadtree using a structs library in LWJGL.
2  Game Development / Newbie & Debugging Questions / Re: Best Practise - Quad Trees on: 2015-03-30 08:38:24
So, what Roquen was hinting at is that Java might not be a very good language in which to implement a quadtree structure. Of course if you have a box of nails and the only tool you have handy is a hammer,  well, there you are. But why did he say this?

Two aspects of most things in comp sci are the physical structure of things in memory and the algorithms to access them efficiently. Sometimes a thing works really well because the precise way it is laid out in memory makes it extremely efficient to work with, and quadtrees is one of these things. In C, quadtrees are densely packed structures  using pointers to bits of itself, all stored in a contiguous block of memory. It's as efficient as it can possibly be.

In Java, the best you can do is a great big sprawling heap of instances scattered all over memory. Each instance itself has a whole load of extra guff associated with it somewhere else in memory, too. So though on the surface of it, it looks like you've got a neat looking data structure and perfectly simple algorithms, like a swan paddling on a lake it's all serene on top but there's a lot of furious thrashing going on underneath where you can't see it. Then you wonder why it's slower and takes up vast amounts of RAM.

Cas ☺
3  Discussions / Miscellaneous Topics / Re: Python Load Balancing. on: 2015-03-27 14:39:29
Python explodes in flames!

Cas Smiley
4  Game Development / Newbie & Debugging Questions / Re: OSX 10.10 seems to have broken my games on: 2015-03-26 14:42:11
Hm, using 2.9.2 here. Maybe I need to get that updated.

Cas Smiley
5  Game Development / Newbie & Debugging Questions / Re: OSX 10.10 seems to have broken my games on: 2015-03-26 13:04:04
Er... is OSX 10.10 actually released then? Or is it still beta?

Cas Smiley
6  Game Development / Newbie & Debugging Questions / Re: OSX 10.10 seems to have broken my games on: 2015-03-25 17:57:30
Actually both Smiley Basically when launched, game does nothing at all. No output in Console allegedly.

Cas Smiley
7  Game Development / Newbie & Debugging Questions / OSX 10.10 seems to have broken my games on: 2015-03-25 10:07:47
... has anyone here got 10.10? Would you be able to do a bit of testing and sleuthing for me?

Cas Smiley
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-03-24 09:46:30
Sent my first DMCA violation report to Google. Titan Attacks has been out on Android in the Humble Bundle for just a few days and someone has already pirated it.

Cas Smiley
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-03-18 09:40:56
I used to have a bit of code in my games that went something like this:
1  
if (vendor.indexOf("Intel")) { return false; } // f**k Intel


Cas Smiley
10  Game Development / Newbie & Debugging Questions / Re: Going to build 2.5d Game on Facebook by JavaFX , your advice? on: 2015-03-15 14:36:19
Mostly it's because users just have it blocked, or have an ancient version of it, or it just plain doesn't work properly.

Cas Smiley
11  Game Development / Newbie & Debugging Questions / Re: Going to build 2.5d Game on Facebook by JavaFX , your advice? on: 2015-03-15 10:34:54
Java-in-the-browser is a world of pain - best avoided. The tech to use is HTML5/CSS3/JS with some sort of middleware library to make it less unpleasant.

Cas Smiley
12  Discussions / General Discussions / Re: The Khronos Group announces "Vulkan": the successor to OpenGL on: 2015-03-14 11:27:02
Yes, "draw calls" in Vulkan will be data inside a command buffer, not actual function calls.
The strange thing is almost all of the stupid hoops we go through right now to get performance are basically... building command buffers of objects which when executed in the main thread will run OpenGL commands  Cranky

Cas Smiley
13  Discussions / General Discussions / Re: The Khronos Group announces "Vulkan": the successor to OpenGL on: 2015-03-11 17:53:25
I think that might be the case with OpenGL driver calls too - they are "so cheap" that they don't add up to much (and they're in user space too unlike DX)... until you start to do 100,000 of them. Problem that JNI calls have is that they can't be inlined and thus have to go through the whole push stack & PC, call, return & restore bollocks that inlining basically eliminates.

Cas Smiley
14  Java Game APIs & Engines / OpenGL Development / Re: How to avoid duplicate shader code? on: 2015-03-09 14:37:17
Let us assume for now that it simply crashes Intel drivers, unexpectedly produces working results on Nvidia drivers despite incorrect inputs and assumptions, and doesn't work on AMD because of correctly implemented specifications which state "unspecified behaviour" in cases where Nvidia picked a sensible fallback.

Cas Smiley
15  Java Game APIs & Engines / OpenGL Development / Re: How to avoid duplicate shader code? on: 2015-03-09 12:34:23
You have 2 mains attaching one fragment and one vertex shader, have'nt you?
Clarification: one main() per shader type. So one main() in the total vertex shaders, and one main() in the fragment shaders.

Cas Smiley
16  Game Development / Newbie & Debugging Questions / Re: Issue with "old" lwjgl game on: 2015-03-09 11:26:57
It looks like in between then and now the display framebuffer format you get using "default" arguments is different. Maybe depth buffer or something. Amongst possibly other things.

Cas Smiley
17  Java Game APIs & Engines / OpenGL Development / Re: How to avoid duplicate shader code? on: 2015-03-08 23:54:39
+1 for CopyableCougar4's solution.

Alternatively as I understand it you can attach as many shaders as you like to a program provided there's only 1 main()... so correct me if I'm wrong here but you could stick your computation functions into "library" shader functions and just call into them.

Cas Smiley
18  Java Game APIs & Engines / OpenGL Development / Re: Using Slick2D's Image.getGraphics crashes on some machines on: 2015-03-05 16:19:41
Actually that looks like a driver bug to me.

Cas Smiley
19  Game Development / Game Mechanics / Re: Making GUIs on: 2015-03-04 16:06:41
There is indeed a little confusion here as to what you were trying to do, which is now clearer. Basically hijacking Swing to render itself on top of some other scene maybe rendered by LWJGL, am I right? Which is indeed possible, though what you probably want to actually be doing is rendering the Swing UI to a BufferedImage and then blitting that on top of the GL scene. It's fiddly though and requires some fun with event queues as hinted back along... and at the end of the day you'll have a fugly Swing UI on top of your pretty game which sort of defeats the point :|

The libgdx UIs seem very capable - see Spine for an example of a UI made entirely in libgdx and rendered with OpenGL. No Swing involved!

Cas Smiley
20  Discussions / General Discussions / Re: The Khronos Group announces "Vulkan": the successor to OpenGL on: 2015-03-04 16:01:43
For ARM platforms it doesn't matter as basically that means "phones", and the systems are pretty much shipped complete. Nothing else is really relevant. Playstation and Xbox obviously but they do their own weirdy things anyway.

Cas Smiley
21  Game Development / Game Mechanics / Re: Making GUIs on: 2015-03-04 14:54:23
There's nothing special about it. It's just designed primarily to be an OS-event-driven UI library for normal UIs, for which its design is perfectly optimal.

FWIW I've got my own UI library I use for making games UIs. It executes in the main loop, and renders in the main loop, and doesn't even use "events" (just a horribly complex load of state machines). As soon as I want to do anything asynchronous, I have to punt it out into another thread and I am only allowed to interact with my own UI in the main thread. It's a solution you'll end up with time and time again - it's best to accept that's the way it works.

At least with static import and lambda Runnables now it's nowhere near as fiddly and ugly as it used to look:
1  
invokeLater(()->{ setText("Finished!"); });


Cas Smiley
22  Discussions / General Discussions / Re: The Khronos Group announces "Vulkan": the successor to OpenGL on: 2015-03-04 14:48:33
Exposition:

There are exactly 3 consumer-level hardware vendors of any note: Intel, Nvidia, and AMD. They are all capable of or already have a unified driver model which is essentially the same set of binaries for most of their modern hardware.

The way I envisage this working is in a very similar way to DirectX: the game ships the driver installer with the game, just like you see whenever you install a DirectX based game (they always install DX first as part of the installation).

Of course we can always hope and pray that customers have this new Vulkan thing pre-installed and all will be well but there is a reason why DX titles ship with the installer.

Cas Smiley
23  Discussions / General Discussions / Re: The Khronos Group announces "Vulkan": the successor to OpenGL on: 2015-03-04 14:18:05
3.

Cas Smiley
24  Discussions / General Discussions / Re: The Khronos Group announces "Vulkan": the successor to OpenGL on: 2015-03-04 13:11:05
Fundamental requirement for adoption and success: ability to ship drivers with client code.

Cas Smiley
25  Game Development / Game Mechanics / Re: Making GUIs on: 2015-03-03 10:27:27
When you switch to active rendering you're in control of paint() not the EDT.

Cas Smiley
26  Game Development / Game Mechanics / Re: Making GUIs on: 2015-03-03 08:22:54
@KevinWorkman and @PrinceC. While I appreciate both of your input on the forum since your posts are often very insightful and entertaining, in this case it's disappointing to see you repeatedly dismiss me as 'not really understanding how threading works' while failing to answer my question, which is: show me how you can make Swing render in your own thread without the event dispatch thread (EDT).
Dude, your whole response there continues to show me that you do not understand the problem you are trying to solve at all, and you really need to do some research (written by lots of other people) rather than insist we sit here and type lengthy multi-page treatises about it all.

But as a shortcut:

What you want to do with Swing is called Active Rendering. The nub of the gist is that you need to:
a) Paint in your main loop thread
b) Take any and all input events from the EDT and pass them in a thread safe manner to your main loop

or you could potentially just hop aboard the EDT and start running your game loop from there but I suspect trouble lies that way.

Useful link http://docs.oracle.com/javase/tutorial/extra/fullscreen/rendering.html

Your main issue is that Swing is designed as a passive event-loop driven system and it looks like you want to make a game which is almost always done in a totally different way. Games generally repaint the screen at a fixed rate or as fast as they can and do everything - direct input, logic, rendering - in a single thread "main loop", occasionally doing clever stuff with other threads but that tends to be somewhat advanced. They've hacked a bit at Swing to make it possible but it's not a smooth ride. If you want my advice, just stay away from Swing if you're writing a realtime game of any sort.

All this stuff about blocking, multiple EDTs, event queues, OS hooks, etc - all red herrings, none of you need it or even need to know about it which is why it's so well buried. Move along, nothing to see.

Cas Smiley
27  Java Game APIs & Engines / JInput / Re: Raw Mouse Input pre-acceleration? on: 2015-03-03 08:07:46
I had this same issue and unfortunately there isn't a workaround available AFAIK (at least not since I last properly investigated ~4 years ago).

Cas Smiley
28  Game Development / Newbie & Debugging Questions / Re: When can I start making games? on: 2015-03-03 08:04:14
Just start.

Try making Space Invaders.

Cas Smiley
29  Discussions / Miscellaneous Topics / Re: Good language for prototyping on: 2015-03-02 07:59:06
The language is rarely what is in your way when it comes to the cycles required to prototype something... they're all much of a muchness as we say. Really the question you should ask yourself is what libraries are there available for the language you want to use that makes getting the required stuff you want to play with easier to get working. I see KevGlass manages to churn out prototypes in just mere hours using libgdx for example.

Cas Smiley
30  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-02-28 10:59:23
Swinging wildly off topic here Smiley

Is this math library for OpenGL rendering or for pure mathematics? Aim for one or the other, or get either a poor fit for both or an overcomplicated library with loads of overloading.

Cas Smiley
Pages: [1] 2 3 ... 342
 
theagentd (13 views)
2015-03-27 23:08:20

wxwsk8er (54 views)
2015-03-20 15:39:46

Fairy Tailz (47 views)
2015-03-15 21:52:20

Olo (29 views)
2015-03-13 17:51:59

Olo (31 views)
2015-03-13 17:50:51

Olo (39 views)
2015-03-13 17:50:16

Olo (44 views)
2015-03-13 17:47:07

ClaasJG (57 views)
2015-03-10 11:36:42

ClaasJG (41 views)
2015-03-10 11:33:01

Pippogeek (50 views)
2015-03-05 14:36:23
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27
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!