Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (731)
Games in Android Showcase (217)
games submitted by our members
Games in WIP (798)
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 ... 363
1  Game Development / Newbie & Debugging Questions / Re: Why AnimationTimer and setTranslate on a ImageView node create jerky movement? on: 2017-06-13 10:45:14
Unfortunately the timestamp does not quite match up with monitor sync rate so it'll always be a teeny bit juddery. JavaFX still has a ways to go for games.

Cas Smiley
2  Game Development / Newbie & Debugging Questions / Re: How do I iterate through a list that is modified outside of the current loop? on: 2017-06-09 09:47:08
It's perfectly fine.

You can even cut out some cruft:

CopyOnWriteArrayList<DevEntity> des = new CopyOnWriteArrayList<>(handler.getDevWorld().getDevM().getDevEntities());

No need to redeclare the generic type.

In any case you've got completely the wrong end of the stick. If you're just going to take a copy of your DevEntities list anyway, you have already done all the work the CopyOnWriteArrayList was going to do for you anyway. The idea is that the list returned by getDevEntities is already a CopyOnWriteArrayList, which means you can iterate through it and modify it to your heart's content.

Cas Smiley
3  Game Development / Newbie & Debugging Questions / Re: How do I iterate through a list that is modified outside of the current loop? on: 2017-06-07 14:36:34
If you actually need to iterate a list that is modified outside of its current loop, you need a CopyOnWriteArrayList, or if it's certainly going to be modified every time, just iterate through a copy of the list instead.

If you actually need to iterate through the newly added elements, you can't use an iterator. It's also probably not the design you're looking for though there are sometimes good reasons to do that.

Cas Smiley
4  Java Game APIs & Engines / JInput / Re: Jinput with 32bit on: 2017-05-30 14:55:28
How did you get it to work so far?

Cas Smiley
5  Java Game APIs & Engines / JInput / Re: Jinput with 32bit on: 2017-05-28 18:07:57
Are you sure it's not that the jinput library you've got there is compiled for x86 rather than ARM?

Cas Smiley
6  Game Development / Newbie & Debugging Questions / Re: Lwjgl 3 - difficulties trying to use VBO's on: 2017-05-18 15:14:53
Aside: Never use Java's LinkedList! And in any language, you'd never willingly use LinkedList::get(index), as the whole point of LinkedLists is that they are not random access.

Another aside: why project the 3D coordinates yourself when OpenGL can do this for you? Then you simply update the camera's frustum matrix every frame instead, and the coordinates of your vertices never actually change.

Cas Smiley
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-04-28 15:15:25
Indeed, one giant monitor would be better than two smaller ones but for most of us that's a slightly expensive luxury Smiley

Cas Smiley
8  Game Development / Performance Tuning / Re: Pathfinding over too large grid on: 2017-04-26 08:30:14
Also why not make life easier for yourself on the job ID idea and instead just used a packed bit array for the closed list. 4MB. Clears so fast that you won't even notice it. (At the expense of instantly and temporarily ruining all caches)

Cas Smiley
9  Game Development / Performance Tuning / Re: Pathfinding over too large grid on: 2017-04-26 08:27:46
So what's wrong with a sparse grid? It'll only require a tiny fraction of the memory most of the time.

Cas Smiley
10  Discussions / General Discussions / Re: Coding music! on: 2017-04-24 23:22:55
Currently listening to Spacemen 3, Locust Toybox, Daniel Avery, Goto80, Textures (Patterson/Emerson mixes), Sphongle, Wardruna, Yes, and the Butthole Surfers.

Cas Smiley
11  Discussions / Miscellaneous Topics / Re: Annoying Interview Q on: 2017-04-24 21:24:41
Hehe Cheesy

I was working in Broadcast Production Labs Research, doing hi-def video stuff and tape recorder controllers with RS422. Not exactly groundbreaking work. It was 7 years ago now though!

Cas Smiley
12  Discussions / Miscellaneous Topics / Re: Annoying Interview Q on: 2017-04-24 19:56:36
After 25~ odd years programming I was asked in an interview at Sony to reverse an array of 10 floats. That was the only question. I kid you not, but apparently most of the applicants couldn't actually do it. I got the job.

Cas Smiley
13  Discussions / Miscellaneous Topics / Re: Annoying Interview Q on: 2017-04-24 18:03:18
Sounds like you dodged a bullet then (assuming you weren't offered a placement)... interviewer was basically being a bit of a dick if they hinged any import on the answer to such a question.

Cas Smiley
14  Discussions / Miscellaneous Topics / Re: Annoying Interview Q on: 2017-04-24 15:50:13
The real answer is, it depends. What do you want the CIS to do? They do more than just run javac every 5 minutes.

Cas Smiley
15  Discussions / Miscellaneous Topics / Re: Annoying Interview Q on: 2017-04-24 13:54:04
Reminds me of this interview question:
Interviewer: Design a lock-free list.
Candidate: No.
Interviewer: Hired!

Cas Smiley
16  Discussions / Miscellaneous Topics / Re: Annoying Interview Q on: 2017-04-24 12:37:02
It requires someone else to set it up. Next!

Cas Smiley
17  Discussions / Miscellaneous Topics / Re: Silly Programming Mistakes on: 2017-04-24 09:56:04
That's why I set syntax colouring up so that static vars and methods appear in a completely different colour Smiley

Cas Smiley
18  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-04-20 13:49:20
Finally got access to internet with my laptop. For the last five months I've been in and out of jails and institutions. I am now a recovering addict and life is really looking up - I hate to drop such a bombshell on the community, but I'm accepting who I am and what I've done and now I need to move on. I'll probably contribute on JGO a little bit but not nearly as much as in the past. I love you guys.
Well done, you. Never look back.
My little brother relapsed. Now he's dead.

Cas :|
19  Game Development / Game Play & Game Design / Re: Graphics Backend Abstraction on: 2017-04-14 15:24:11
Well, JavaFX does not in any way attempt to abstract both DX and GL into a single lookalike API. It resolutely has its own set of constants and commands and a scenegraph type of structure, and it has a completely pluggable back-end on it.

Unity is the same: it presents an API geared towards doing what you want to do, not precisely how to achieve it; it takes care of the stuff at the back end using a pluggable architecture. Even the shaders are in their own special Unity language and compiled to GL, GLES, DX or whatever, depending on the backend.

It seems that pretty much all successful, in-use APIs follow the same paradigm: don't try and find a common ground between the backends you want to support and make the thinnest possible veneer between them; instead, totally hide it all away and present higher-level APIs to the end user.

Cas Smiley
20  Game Development / Game Play & Game Design / Re: Graphics Backend Abstraction on: 2017-04-13 18:20:40
I think the concepts in JavaFX have it right.

Cas Smiley
21  Game Development / Game Play & Game Design / Re: Graphics Backend Abstraction on: 2017-04-12 16:08:16
What I'm getting at is, why abstract this, when your "engine" API is already the abstraction? The underlying rendering API - Vulkan or OpenGL (or even DX12!) - is what your engine will be using to turn its own ideas about what it has to render into rendering commands for the specified low-level API. You write a specific plug-in to render what your "engine" contains using the specific API. There's no real point in abstracting the rendering APIs and then using that abstraction to feed to your engine... do it directly. I'm probably not explaining this very well though.

Cas Smiley
22  Game Development / Game Play & Game Design / Re: Graphics Backend Abstraction on: 2017-04-12 13:46:29
Given the hoops you have to jump through to register that's one determined spammer...

Cas Smiley
23  Game Development / Game Play & Game Design / Re: Graphics Backend Abstraction on: 2017-04-12 11:06:50
OpenGL and Vulkan are already abstractions... you probably don't want to abstract over them any more.

Cas Smiley
24  Game Development / Newbie & Debugging Questions / Re: Which do you prefer? on: 2017-04-12 08:57:57
Option 2 is clearer and simpler in the case where you have no other uses for x, y, or z.

If you subsequently need to use x, y, or z somewhere further down the line, you'd go for option 1.

Cas Smiley
25  Discussions / General Discussions / Re: Is it worth it to put my game on Steam for free? on: 2017-03-29 23:09:22
How about itch.io instead? Which seems much more aligned with you and your game and intended audiences.

Cas Smiley
26  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-03-29 15:48:17
That's looking really good.

Cas Smiley
27  Discussions / General Discussions / Re: C++/Java Engine without GC in graphics on: 2017-03-27 12:57:37
Well, I can halve my frame rate just by turning on G1GC... it does indeed still have noticeable irritating effects when you start really pushing things a bit.

Cas Smiley
28  Game Development / Newbie & Debugging Questions / Re: JMonkeyEngine on: 2017-03-15 18:46:29
Well, decide on a game first! Then think about what technology you need to realise it.
My stuff's simple enough to do in plain LWJGL but if I were starting again today, I'd probably go for libgdx.
Being risk-averse, and very thoroughly grounded in my appreciation of my skills and talents, I've avoided JMonkeyEngine because 3D = world of pain.

Cas Smiley
29  Game Development / Performance Tuning / Re: ArrayList$Itr and Escape Analysis on: 2017-03-06 15:43:12
JITWatch! Of course. I knew there was a tool I was missing but I just couldn't remember what it was. Thanks Spasi.

I've used Oracle's Mission Control thing and sure enough it's quite different in output to JVisualVM.

Cas Smiley
30  Game Development / Performance Tuning / Re: ArrayList$Itr and Escape Analysis on: 2017-03-06 13:00:05
(For your reference: my knowledge on the subject comes from this article but it is four years old and things change)

Cas Smiley
Pages: [1] 2 3 ... 363
 
Archive (335 views)
2017-04-27 17:45:51

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

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

theagentd (1011 views)
2017-03-24 15:32:08

Rule (991 views)
2017-03-19 12:43:22

Rule (972 views)
2017-03-19 12:42:17

Rule (968 views)
2017-03-19 12:36:21

theagentd (1068 views)
2017-03-16 05:07:07

theagentd (982 views)
2017-03-15 22:37:06

theagentd (758 views)
2017-03-15 22:32:18
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!