Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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 ... 13
1  Game Development / Newbie & Debugging Questions / Re: getting rid of "instanceof" on: 2017-01-12 21:54:00
I went off anything described as a design pattern in a big way after working at a company where they were considered sacrosanct.
Easily the most painful code I have ever had to work on, approaching levels of bad.
It is probably an overreaction to a single example of overuse of design patterns, but it left such a bad taste in my mouth that I remain wary to this day.

My personal opinion is that the advantage:

Super easy to see what's going on

Pretty much trumps everything else, until you need to optimize for performance with a profiler to prove where your bottleneck is.
An enum type member variable is what works for me these days.
2  Java Game APIs & Engines / Engines, Libraries and Tools / Oculus Development on: 2014-06-06 18:52:40
I've just order an Oculus SDK2 and was wondering what other peoples experiences were getting it up and running with lwjgl?
Any advice for getting a basic spinning cube demo working?

3  Java Game APIs & Engines / Tools Discussion / Re: 2.5D Modler on: 2013-12-30 03:22:03
Thanks for giving it a proper go.

Undo and redo would be next on my list, I found myself pressing ctrl-z constantly out of habit.
You can change any of the colors in the palette by double clicking, and I think 15 per model is enough.
A finer grid would be good but at the moment URL-encoded models really require compact coordinates (each shape is just 4 bytes at the moment).

If there is enough interest in the idea I would make a version 2 that runs on the desktop and has a more complete set of features and saves models to files.
4  Java Game APIs & Engines / Tools Discussion / Re: 2.5D Modler on: 2013-12-29 22:18:18
Unfortunately I can't do left to right cylinders with the current rendering engine, each vertical cross section has to be rectangular to make the boolean operations simple to calculate. I may look at doing a custom ray-tracer and allow many more shapes to be drawn.

I was hoping other people would make tilesets using it but I may have a go at some point when I get it working well enough.
5  Java Game APIs & Engines / Tools Discussion / Re: 2.5D Modler on: 2013-12-29 19:15:14
Swiss cheese:

It's great, makes very simple art look good with the shadows and smooth curves.
I couldn't control the primitive objects very well, for some reason I couldn't move them in certain directions, they would get stuck and not move. I suspect it's because they hit some boundary I couldn't see or maybe it's because I don't understand the reason for the dividing line between the upper and lower parts of the drawing surface.
Would also be great to have some more different angled primitives.
Nice job Shannon.

Yes I need to add a few more visual cues for bounding/moving objects. The lower half is the ground plane and the model is bounded to 16x16x16 cube.
6  Java Game APIs & Engines / Tools Discussion / Re: 2.5D Modler on: 2013-12-29 19:11:56
I agree about it being a bit laggy, it's because the rendering is a little slow (mostly because of the shadows). I've added a preview mode when moving/re-sizing objects that disables the shadows so it should be much faster now.
7  Java Game APIs & Engines / Tools Discussion / Re: 2.5D Modler on: 2013-12-29 08:48:36
New version up:

  • Grid for aligning shapes
  • Some rendering improvements
  • An output render for saving images

8  Java Game APIs & Engines / Tools Discussion / 2.5D Modler on: 2013-12-24 19:17:08
I finally got some free time over the holidays and was intrigued by the latest Lost Garden prototyping challenge so decided to give it a go.
Click to try:

To use:
  • Just click after selecting a shape type to add primitives.
  • You can re-order primitives by dragging them in the list.
  • Ordering is important for holes and primitives with co-planar faces.
  • Holes effect shapes below them.
  • Co-planar faces are draw in the order they appear in the list.
  • Re-size a primitive using the handles after selecting a shape.
  • Move a shape left/right, front/back by dragging the top face.
  • Move a shape left/right, up/down by dragging the front face.
  • The color palette can be changed by double clicking on a color.
  • Models are saved/shared by URL.

Let me know what you think, particularly if the modeling operations (moving/re-sizing) seem intuitive.
9  Game Development / Newbie & Debugging Questions / Re: C++ to Java and unsigned int64? on: 2013-03-13 14:50:53
This won't work in java as there is no unsigned 64 bit integer. Using a regular signed long would usually work fine but you are doing addition and using all 64 bits which includes the sign bit. You could use java BigInteger but it will be slow and I suspect this is purely a performance hack so I suggest you just replace it with whatever you are actually trying to do.
10  Game Development / Shared Code / Re: ReadWriteCollection for entities on: 2013-03-08 03:19:43
I must say Riven since you started working for Cas you have been making some pretty cool stuff. This coupled with that continuations lib is giving me all sorts of ideas about simulating massive populations of all sorts of things. 
11  Java Game APIs & Engines / Java 2D / Re: VSync on: 2012-11-13 03:47:16
So I tried using JavaFX and AnimationTimer as it appeared a likely candidate (you don't specify the time delta) and it worked perfectly, vsync at last. Like requestAnimationFrame() you get one call per monitor refresh (verified by changing the refresh rate) and animation looks lovely and smooth!
Hopefully it's fairly cross platform and works the same way in a browser plugin.

I am still using Java2D to draw my scene to a buffer and copying it to a JavaFX WriteableImage every frame. Not particularly efficient but better than running at 300fps.
12  Java Game APIs & Engines / Java 2D / Re: VSync on: 2012-11-12 06:44:26
All the Graphics2D methods take double precision values and there is a full set of double precision Shape objects for the draw(Shape) method. Even if you stuck to the regular Graphics calls that take ints you can use the Graphics2D double precision translate to draw at floating point coordinates.

I think I might try to mock up a quick example applet to demonstrate the problem (and test how often ExtendedBufferCapabilities is available).
13  Java Game APIs & Engines / Java 2D / Re: VSync on: 2012-11-11 17:46:49
Also, I don't think anyone really has the time to go and watch an hour long video hoping to find wth your are talking about. Maybe you have like amazing eyes or something because I really have never seen these "artifacts" you are talking about when properly double buffering.
Most of the relevant information about the problem is is in the first 10 minutes or so. The rest about profiling in chrome.

hmmm...if you are referring to the very jerky motion when you move an object slow in java2D that is because it does everything in ints.
No Java2D uses doubles and you can turn on different interpolation modes to get sub-pixel image interpolation, however this doesn't really help unless you are updating at much higher rate than the refresh rate of the monitor. If you update at 300fps moving objects by very small amounts each time your positions will only be out by ~3ms which is probably not noticeable. The downside of this 4/5 of the frames you generate are never shown so it's a pretty massive waste of CPU. Also this doesn't work with up-scaled pixel art type graphics (the type I am doing at the moment) as you are typically moving objects ~ at 1/2 pixels per frame and can't use sub-pixels.

Then try out either LWJGL or JogAmp.
I would prefer not to do this because it does impose a number of barriers to people trying my game, but it may be the only option. One downside is that setVSyncEnabled is not guaranteed to work either so it may not be much help.

An option I was considering was using javascript to call requestAnimationFrame() and drive each new frame from the browser itself but I'm not sure how reliable this would be or how much overhead it would create

14  Java Game APIs & Engines / Java 2D / Re: VSync on: 2012-11-11 00:01:26
Artifacts (like tearing) are not the problem. The problem is to achieve smooth motion VSYNC is essential.

Say you have a character moving across the screen at 1 pixel per frame. You have no idea when the frame will be actually be displayed it could be up to 16ms (at 60 Hz) from the point you calculate it. So even though you might create a series of frames with positions 1,2,3,4,5,6 they could be displayed like 1,2,2,4,5,5,6 depending on the relative timing of the show() and the vsync.

People don't tend realize how much of a difference it makes until they see the same thing done right. Done wrong it just looks a bit amateurish but you can't quite put your finger on the problem. The second you see it done properly it just looks so much better.

For a good explanation (and why vsync is the only real solution) of the problem I suggest watching:
<a href=";hl=en_US&amp;start=" target="_blank">;hl=en_US&amp;start=</a>

15  Discussions / Miscellaneous Topics / Re: What's your favorite game. on: 2012-11-10 06:41:44
Zelda: Ocarina of Time has been my answer without hesitation for a long time. However assuming I could sever any nostalgic attachment I think Space Chem might be my current favourite.
16  Java Game APIs & Engines / Java 2D / Re: VSync on: 2012-11-10 00:58:26
So I tried the ExtendedBufferCapabilities and it works like a charm, beautiful smooth movement, so I think I'll just wrap it in some exception handling and hope it makes it into Java 8.

Edit: Unfortunately it only works if my laptop is using an external monitor... In fact the createBufferStrategy with page flipping doesn't work either in this case (throws the same AWTException),  Sad

17  Java Game APIs & Engines / Java 2D / Re: VSync on: 2012-11-09 22:22:49
I've been waiting for quite some time for the equivalent of javascript requestAnimationFrame() but nobody seems to care that much about it for Java2D. Hopefully JavaFX takes off and it becomes important enough to add. If anyone doesn't realize why it matters I suggest having a browse at:

18  Java Game APIs & Engines / Java 2D / Re: VSync on: 2012-11-09 21:59:38
I saw that but note it's in the sun namespace so not officially part of the JDK. I assume it's something you can enable with vm args.

19  Java Game APIs & Engines / Java 2D / Re: VSync on: 2012-11-09 21:54:21
I am using a BufferStrategy, it doesn't help because the show() doesn't wait for the vsync, so it's very easy to get 1 frame displayed twice and then a frame skipped on the next cycle. Missing a single frame is actually quite noticeable.

The only way to get properly smooth motion is to have 1 frame per monitor refresh any other way looks glitchy.
20  Java Game APIs & Engines / Java 2D / VSync on: 2012-11-09 21:42:49
I know this has been asked multiple times but does anyone know if there is a way yet to synchronize to the VSYNC pulse for Java2D. There is simply no way to get smooth motion without it and I can't find any information on how to do it.
I found some references to an API being added in 7 but nothing on the API itself. Is there anything in JavaFX?
21  Games Center / Contests / Re: Liberated Pixel Contest - Anyone taking part? on: 2012-07-02 16:33:32
The art phase is done and there is some pretty useful stuff, code phase has stated.
22  Games Center / Contests / Re: Liberated Pixel Contest - Anyone taking part? on: 2012-06-18 21:52:55
The style guide is done (an interesting read) and the art phase has begun. Already a ton of useful stuff.
23  Discussions / General Discussions / Re: Who do you use for your web hosting? on: 2012-06-10 20:24:01
I decided to go with WebFaction as 123systems seemed a bit sketchy. So far I'm impressed, FTP uploads are much faster and more reliable than they were on Godaddy and the control panel is pretty nice.
Thanks for the recommendations!

24  Discussions / General Discussions / Re: Who do you use for your web hosting? on: 2012-06-08 15:13:03 seems really cheap, I didn't realize you could get a VPS for that price. Might have to give them a go.
25  Discussions / General Discussions / Who do you use for your web hosting? on: 2012-06-07 18:17:21
I have been with godaddy since I created my site years ago. Overall they haven't been too bad (after you get through the initial having to opt-out of 100 useless paid add-ons). I've been planning to migrate away from them for ages but never got round to it.
It's really hard to find a cheap hosting company that doesn't look dodgey as hell so I thought I would ask you guys who you use and what you think of them. I have been looking into doing more server-side stuff lately and am not really keen on PHP (the only option for GoDaddy economy) so I'm after a server that has at least Python and preferably Java servlets (if it doesn't double the price).

Hosting CompanyPlanCost (per month)GoodBadWould I reccomend
Godaddy.comEconomy Linux$5.99Realtively cheap/reliableHorrible corporate giant, PHP OnlyNot really
26  Discussions / General Discussions / Re: Oracle vs Google on: 2012-05-07 20:09:05
Given the jury instructions were to assume that API's are eligible for copyright there is really no way they could find that google hadn't infringed. I also think that if API's can be copyrighted the fair use defense doesn't make much sense (they copied a substantial portion of the API). It would probably have been better to have a complete verdict of infringement + no fair use and then have the Judge rule that API's can't be copyrighted (something he has indicated he will be deciding).
27  Discussions / General Discussions / Re: Rasberry Pi stuff... on: 2012-05-03 17:11:49
Seems Oracle are actively working on this:

28  Discussions / General Discussions / Re: Oracle vs Google on: 2012-04-17 20:19:03
I would love to know why the negotiations broke down over licencing java. It would seem Google did see this coming so I hope they have a strategy for how to deal with it.
29  Game Development / Game Play & Game Design / Re: Good 8-bit music synthesizer? on: 2012-04-16 21:29:50
I've done a ton of standalone synths for music  but not really much for games. With music synths it's ok to use 90% of the CPU getting it to sound really good but this isn't really an option with games. The closest would be the super cut-down one I did for Java4K here.
30  Discussions / Miscellaneous Topics / Re: 0x10c on: 2012-04-13 18:11:43
When he first announced the project I thought the virtual cpu idea was plain weird and didn't make a whole lot of sense in a game. Why not just include a scripting language that would be far more efficient to run and easier to code for?
But having seen the gigantic instant community that has sprung up around it and people talking about learning programming just to play the game I am both baffled and somewhat in awe.

Pages: [1] 2 3 ... 13
EgonOlsen (75 views)
2018-06-10 19:43:48

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

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

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

nelsongames (156 views)
2018-04-24 18:15:36

nelsongames (155 views)
2018-04-24 18:14:32

ivj94 (896 views)
2018-03-24 14:47:39

ivj94 (157 views)
2018-03-24 14:46:31

ivj94 (809 views)
2018-03-24 14:43:53

Solater (173 views)
2018-03-17 05:04: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 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!