Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (555)
Games in Android Showcase (148)
games submitted by our members
Games in WIP (601)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3 4 ... 10
 on: 2015-02-28 10:56:09 
Started by ratchet12340 - Last post by princec
Don't be patronising. I understand threads reasonably well.
But not well enough to understand why things are the way they are. KevinWorkman's excellent link describes what you need to know in a fairly succinct and enlightening essay.

Cas Smiley

 on: 2015-02-28 10:10:59 
Started by BurntPizza - Last post by quew8
Having started a module on control theory, I cannot see anything like that without thinking about transfer functions and feedback loops. Looks good.

 on: 2015-02-28 09:50:47 
Started by Neoptolemus - Last post by KaiHH
big planet:  all spheres (assuming the planet is modeled as a sphere) are equivalent to the unit sphere.  So not an example..size doesn't matter.
In theory you are right. But in the context of IEEE 754 where we have discretized floating point values, you are not. Smiley
Here, the equivalency breaks.
A planet - even with a 2D-parameterization of space (longitude-latitude, two angles) - is exactly equivalent to mandelbrot, with all the same problems involved. And that problem is: with any fixed-length (in number of bits, that is) numerical representation like IEEE 754, there is no and cannot be any parameterization of the surface of a sphere (any sphere) that lets you reach every point on the sphere. You can only advance on the sphere surface in discretized steps.
As you said rightly, size does not matter, but precision does!
So, simply put: you cannot increase the size of your planet indefinitely (or normalize it back again to unit size indefinitely) while still keeping the same unit of length say 1mm and still want 1mm resolution of small notches and rocks and hills on your planet.
So, because magnitude does not matter, it all depends on the order of magnitude you choose as your basic unit of length. Of course, if you choose 1 meter instead of 1 mm you can scale down the sphere by another factor of 1,000 while still retaining the desired precision (namely now 1 meter).

EDIT: Plus: I did not make this up as a contrived text-book example. It exists in real-world. A big world, by the way Smiley

 on: 2015-02-28 08:48:56 
Started by NouryHD - Last post by Gibbo3771
Code in Java.

You can read every book in the library on java, watch every online video, read every article, decompile any code , it won't make a shit bit of difference if you don't code.

Code. Code. Code.

Make programs, make your own list classes, make your own math classes, make a small framework that you can build on and improve every time you open the the source.

 on: 2015-02-28 08:20:00 
Started by BurntPizza - Last post by SHC
Finally got smooth following camera in Blox:

Click to Play

(The graphical glitch is copyright of the GIF recorder, not of my program).

 on: 2015-02-28 08:11:30 
Started by Neoptolemus - Last post by Roquen
big planet:  all spheres (assuming the planet is modeled as a sphere) are equivalent to the unit sphere.  So not an example..size doesn't matter.

deep zoom on the m-set: I totally forgot about this totally common game runtime example, but there's no complex number support in the library.

 on: 2015-02-28 07:19:08 
Started by ratchet12340 - Last post by ziozio
Swing as a whole is a light weight framework that is platform independent but at its core it still extends AWT (JComponent extends the AWT container), this is its hook in to the OS to get screen graphics and user interface events of the operating system which it then translates to an OS agnostic set of events for it to use (it therefore manages its own event queue on top of the OS event queue). It also does this translation on its own thread which is why you need those invokeLater commands to run anything on the underlying event queue thread. AWT was born when Java was born and is a very old horrible piece of technology.

JavaFX should fix a lot of the AWT issues, it doesn't run the event processing on its own thread, it instead does this in the same thread that the application is run on (JavaFX Application Thread). It also hooks in to the native OS event queue rather than maintaining its own version of the event queue. JavaFX also has a separate rendering thread (Prism render thread) to the main application thread (which helps you use multi threaded systems better for rendering). Lots of good things in JavaFX but its big disadvantage is it will need a different native build for every OS it runs on and it currently doesn't run on all OS's

 on: 2015-02-28 06:18:26 
Started by BurntPizza - Last post by CopyableCougar4
I've been trying to find a way to balance my almost ADHD when it comes to project focus while still exercising my mind and fiddling with new projects.

Over the last few days I have:
  • Made a simple serializer just for fun (by default only writes primitive arrays and primitives)
  • Made a simple compressor that uses a dictionary lookup to index repeated words (good for basic compression)
  • Wrote a standalone easy to use Ogg decoder that passes a RawPCM object with a buffer of raw PCM data
  • Made a new basic game engine just for the fun of it (similar to Java2D in Graphics and Image objects) (this was before I started fiddling with new projects)

I will probably edit this if I do more this evening, but I just thought I should share my progress Tongue

 on: 2015-02-28 06:12:41 
Started by Riven - Last post by BurntPizza
I'm gonna try it: Identifier compression  persecutioncomplex

Main effort at the moment is declaration extraction, and preliminary results are promising:

Current pipeline is minification -> large scary 'broad phase' regex -> split by semicolons/newlines -> series of several filters
Result is a dump of things which have declarations in them:

public class CoffeeGrinder
public static void main(String[]args)throws IOException
String path
int lineWrapping=80;
boolean aggressive=true,printInfo=false;
for(String s
catch(NumberFormatException e
StringBuilder preprocessed=new StringBuilder();
for(String line
String code
int originalLength
private static void printUsage
private static String minify(String src,int lineWrap,boolean aggressive
PreservationResult pr=preserveStringLiterals(src);
String code
private static String lineWrap(String text,int width
StringBuilder lineWrapped=new StringBuilder();
StringBuilder sb=new StringBuilder
for(int i
String line
private static PreservationResult preserveStringLiterals(String in
Deque<Interval>intervals=new ArrayDeque<>();
Map<String,String>mapping=new HashMap<>();
int seed=0;
String key;
String prefix
boolean strmode=false,charmode=false,linecomment=false,blockcomment=false,escaped=false;
for(int i
char c
boolean inComment
StringBuilder sb=new StringBuilder
Interval i
PreservationResult pr=new PreservationResult
private static void compressIdentifiers(String text
for(Interval i
private static Set<String>identifiers(String text,Interval scope
Set<String>idens=new HashSet<>();
Matcher m
StringBuilder sb=new StringBuilder
String s
List<String>decs=new ArrayList<>();
for(String s
for(String s
private static void filter(List<String>list,Pattern p,boolean allMatch
for(int i
Matcher m
private static List<Interval>matchNestedIntervals(String text,char begin,char end
List<Interval>topLevels=new ArrayList<>();
int idx
int start=idx;
int nestLevel
char c
private static class PreservationResult
String output,key;
String revert(String text
Matcher m
Deque<Interval>intervals=new ArrayDeque<>();
Deque<String>matches=new ArrayDeque
StringBuilder sb=new StringBuilder
Interval i
private static class Interval
int start,end;
Interval(int x,int y
String subString(String in
public String toString

It's barely tested, but I do believe that is every declaration of an identifier in the file, and no false entries.
Of course I'll need to process much more source to see how it holds up. (It won't)

 on: 2015-02-28 05:54:40 
Started by Ecumene - Last post by Ecumene
Why have shaders for each..? Ideally, I would want to rerender the scene as little times as possible.

No re-rendering the scene. Re-shading the entire final image.

You could just allocate a regular texture to hold the framebuffer in while switching shaders, but again why the two shaders? Organization?

How would that look in pseudo code? I'm trying to do something like fragment processing to a texture, and save it to the same place again... This is still something very new to me. I'm sorry if I'm being kinda ignorant. xD
The whole game is based off of modding, and having access to something like a post-processing pipeline for modders would be great.

Pages: 1 [2] 3 4 ... 10
BurntPizza (21 views)
2015-02-27 06:09:35

BurntPizza (19 views)
2015-02-27 05:56:17

Riven (10 views)
2015-02-27 02:34:15

Riven (17 views)
2015-02-27 01:47:26

Riven (17 views)
2015-02-27 01:46:04

BurntPizza (12 views)
2015-02-27 00:52:04

BurntPizza (14 views)
2015-02-27 00:50:29

Riven (33 views)
2015-02-26 23:38:45

Riven (10 views)
2015-02-26 23:37:24

BurntPizza (29 views)
2015-02-26 21:13:04
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 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!