Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (481)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (547)
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 ... 17
1  Discussions / Miscellaneous Topics / Re: Is our Universe Simulatable? on: 2014-05-13 03:50:00
I think the chief problem you guys are having with this thread is that you are using terms without defining them.  For example, 'universe' - do you mean everything that there is, or something else?  This is important.  If you mean the former, then there is no 'getting out of the universe' to simulate 'this' universe.  The whole idea of a meta universe doesn't work on that basis.  If you mean something else: then what?  A many-worlds interpretation of quantum mechanics?  If so, that's infinitely branching so in principle impossible to simulate every branch though perhaps possible to simulate one path.

2  Discussions / General Discussions / Re: Blender Character Animation formats on: 2014-04-17 00:29:41
Ahh!  I didn't know the collada export did animation.  I'll give that a go then.  I did see some comments about the Collada format being a bit non prescriptive to be useful but I guess I only need to worry about the files that Blender exports rather than every possible Collada file :o)

Thanks very much for the feedback
3  Discussions / General Discussions / Blender Character Animation formats on: 2014-04-11 04:04:32
I have some character animation in Blender that I'd like to use in code but I can't find a good format to export to.  Has anyone got experience exporting animated meshes from Blender 2.69?  What approach would you recommend?

I'm happy to write an exporter and I'm also considering getting the FBX SDK to write a C++ based FBX -> my own format converter.
4  Discussions / Community & Volunteer Projects / Re: Clocktower Games looking for Java Programmers (Profit Share Project Only) on: 2013-11-09 09:25:13
Just FYI: the "Clock Tower" games were a well known Japanese horror game series and "Clocktower Games" is a New Zealand indy game developer (now called Aero).  Your chosen name won't Google well and potentially might have legal issues.
5  Discussions / General Discussions / Re: Your feeling on discovering that your game is uncannily similar to another game? on: 2013-08-29 02:47:07
Yeah, totally.  I've seen people run down Minecraft because zomg! Dwarf Fortress is teh 4we5ome!  Yeah, DF is great, Minecraft is actually playable by normal human beings.  That doesn't mean DF sucks, nor MC - they're both cool. 
6  Discussions / General Discussions / Re: Java on PS4 Initiative on: 2013-08-06 10:46:17
*SIGH* Hey everyone.... Grin Been to this dance twice before....hoping 3rd times the charm!

Heh.  Deja vu all over again, huh?  Well hopefully this time will be different - the stated attitude towards indies and the fact that Minecraft is one of the biggest indies games out there might work in our favour this time.

Anyway, Hi Chrism!!!  How the hell have you been?
7  Game Development / Newbie & Debugging Questions / Re: Noise Problem on: 2013-04-30 02:52:03
This is noise for java written by Perlin himself.  It's what I use:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188  
189  
190  
191  
192  
193  
194  
195  
196  
197  
198  
199  
200  
201  
202  
203  
204  
205  
206  
207  
208  
209  
210  
211  
212  
213  
214  
215  
216  
217  
218  
219  
220  
221  
222  
223  
224  
225  
226  
227  
228  
229  
230  
231  
232  
233  
234  
235  
236  
237  
238  
239  
240  
241  
242  
243  
244  
245  
246  
// Copyright 2001 Ken Perlin
public final class Noise {

    public static int seed = 100;
    private static final int P = 8;
    private static final int B = 1 << P;
    private static final int M = B - 1;
    private static final int NP = 8;
    private static final int N = 1 << NP;
    //private static final int NM = N-1;
   private static int p[] = new int[B + B + 2];
    private static double g2[][] = new double[B + B + 2][2];
    private static double g1[] = new double[B + B + 2];
    //private static int start = 1;
   private static double[][] points = new double[32][3];

    static {
        init();
    }

    private static double lerp(double t, double a, double b) {
        return a + t * (b - a);
    }

    private static double s_curve(double t) {
        return t * t * (3 - t - t);
    }

    public static double noise(double x) {

        int bx0, bx1;
        double rx0, rx1, sx, t, u, v;
        t = x + N;
        bx0 = ((int) t) & M;
        bx1 = (bx0 + 1) & M;
        rx0 = t - (int) t;
        rx1 = rx0 - 1;

        sx = s_curve(rx0);
        u = rx0 * g1[p[bx0]];
        v = rx1 * g1[p[bx1]];

        return lerp(sx, u, v);
    }

    public static double noise(double x, double y) {

        int bx0, bx1, by0, by1, b00, b10, b01, b11;
        double rx0, rx1, ry0, ry1, sx, sy, a, b, t, u, v, q[];
        int i, j;

        t = x + N;
        bx0 = ((int) t) & M;
        bx1 = (bx0 + 1) & M;
        rx0 = t - (int) t;
        rx1 = rx0 - 1;

        t = y + N;
        by0 = ((int) t) & M;
        by1 = (by0 + 1) & M;
        ry0 = t - (int) t;
        ry1 = ry0 - 1;

        i = p[bx0];
        j = p[bx1];

        b00 = p[i + by0];
        b10 = p[j + by0];
        b01 = p[i + by1];
        b11 = p[j + by1];

        sx = s_curve(rx0);
        sy = s_curve(ry0);

        q = g2[b00];
        u = rx0 * q[0] + ry0 * q[1];
        q = g2[b10];
        v = rx1 * q[0] + ry0 * q[1];
        a = lerp(sx, u, v);

        q = g2[b01];
        u = rx0 * q[0] + ry1 * q[1];
        q = g2[b11];
        v = rx1 * q[0] + ry1 * q[1];
        b = lerp(sx, u, v);

        return lerp(sy, a, b);
    }

    static double noise(double x, double y, double z) {

        int bx, by, bz, b0, b1, b00, b10, b01, b11;
        double rx0, rx1, ry0, ry1, rz, sx, sy, sz, a, b, c, d, u, v, q[];

        bx = (int) Math.IEEEremainder(Math.floor(x), B);
        if (bx < 0) {
            bx += B;
        }
        rx0 = x - Math.floor(x);
        rx1 = rx0 - 1;

        by = (int) Math.IEEEremainder(Math.floor(y), B);
        if (by < 0) {
            by += B;
        }
        ry0 = y - Math.floor(y);
        ry1 = ry0 - 1;

        bz = (int) Math.IEEEremainder(Math.floor(z), B);
        if (bz < 0) {
            bz += B;
        }
        rz = z - Math.floor(z);

        if (bx < 0 || bx >= B + B + 2) {
            System.out.println(bx);
        }

        b0 = p[bx];

        bx++;

        b1 = p[bx];

        b00 = p[b0 + by];
        b10 = p[b1 + by];

        by++;

        b01 = p[b0 + by];
        b11 = p[b1 + by];

        sx = s_curve(rx0);
        sy = s_curve(ry0);
        sz = s_curve(rz);

        q = G(b00 + bz);
        u = rx0 * q[0] + ry0 * q[1] + rz * q[2];
        q = G(b10 + bz);
        v = rx1 * q[0] + ry0 * q[1] + rz * q[2];
        a = lerp(sx, u, v);
        q = G(b01 + bz);
        u = rx0 * q[0] + ry1 * q[1] + rz * q[2];
        q = G(b11 + bz);
        v = rx1 * q[0] + ry1 * q[1] + rz * q[2];
        b = lerp(sx, u, v);
        c = lerp(sy, a, b);
        bz++;
        rz--;
        q = G(b00 + bz);
        u = rx0 * q[0] + ry0 * q[1] + rz * q[2];
        q = G(b10 + bz);
        v = rx1 * q[0] + ry0 * q[1] + rz * q[2];
        a = lerp(sx, u, v);
        q = G(b01 + bz);
        u = rx0 * q[0] + ry1 * q[1] + rz * q[2];
        q = G(b11 + bz);
        v = rx1 * q[0] + ry1 * q[1] + rz * q[2];
        b = lerp(sx, u, v);
        d = lerp(sy, a, b);

        return lerp(sz, c, d);
    }

    private static double[] G(int i) {
        return points[i % 32];
    }

    private static void init() {
        int i, j, k;
        double u, v, w, U, V, W, Hi, Lo;
        java.util.Random r = new java.util.Random(seed);
        for (i = 0; i < B; i++) {
            p[i] = i;
            g1[i] = 2 * r.nextDouble() - 1;

            do {
                u = 2 * r.nextDouble() - 1;
                v = 2 * r.nextDouble() - 1;
            } while (u * u + v * v > 1
                    || Math.abs(u) > 2.5 * Math.abs(v)
                    || Math.abs(v) > 2.5 * Math.abs(u)
                    || Math.abs(Math.abs(u) - Math.abs(v)) < .4);
            g2[i][0] = u;
            g2[i][1] = v;
            normalize2(g2[i]);

            do {
                u = 2 * r.nextDouble() - 1;
                v = 2 * r.nextDouble() - 1;
                w = 2 * r.nextDouble() - 1;
                U = Math.abs(u);
                V = Math.abs(v);
                W = Math.abs(w);
                Lo = Math.min(U, Math.min(V, W));
                Hi = Math.max(U, Math.max(V, W));
            } while (u * u + v * v + w * w > 1 || Hi > 4 * Lo
                    || Math.min(Math.abs(U - V), Math.min(Math.abs(U - W), Math.abs(V - W))) < .2);
        }

        while (--i > 0) {
            k = p[i];
            j = (int) (r.nextLong() & M);
            p[i] = p[j];
            p[j] = k;
        }
        for (i = 0; i < B + 2; i++) {
            p[B + i] = p[i];
            g1[B + i] = g1[i];
            for (j = 0; j < 2; j++) {
                g2[B + i][j] = g2[i][j];
            }
        }

        points[3][0] = points[3][1] = points[3][2] = Math.sqrt(1. / 3);
        double r2 = Math.sqrt(1. / 2);
        double s = Math.sqrt(2 + r2 + r2);

        for (i = 0; i < 3; i++) {
            for (j = 0; j < 3; j++) {
                points[i][j] = (i == j ? 1 + r2 + r2 : r2) / s;
            }
        }
        for (i = 0; i <= 1; i++) {
            for (j = 0; j <= 1; j++) {
                for (k = 0; k <= 1; k++) {
                    int n = i + j * 2 + k * 4;
                    if (n > 0) {
                        for (int m = 0; m < 4; m++) {
                            points[4 * n + m][0] = (i == 0 ? 1 : -1) * points[m][0];
                            points[4 * n + m][1] = (j == 0 ? 1 : -1) * points[m][1];
                            points[4 * n + m][2] = (k == 0 ? 1 : -1) * points[m][2];
                        }
                    }
                }
            }
        }
    }

    private static void normalize2(double v[]) {
        double s;
        s = Math.sqrt(v[0] * v[0] + v[1] * v[1]);
        v[0] = v[0] / s;
        v[1] = v[1] / s;
    }
}
8  Games Center / WIP games, tools & toy projects / Re: Gateway Heroes on: 2013-04-27 11:15:41
how did you find Batik?  Are you animating with it?  What's the speed like?
9  Discussions / General Discussions / Re: why are people trying to use Java2D to make games? on: 2013-04-09 04:40:43
AffineTransform works fine.  I got some pretty speedy animations running that used it.  What's the problem?

I like OpenGL Java2D is cool too.  I don't get all the angst - choose whichever you like.
10  Discussions / General Discussions / Re: A New Approach to Databases and Data Processing — Simulating 10Ks of Spaceships on: 2013-03-01 00:49:00
I read that post from the Hacker News link.  I disagree with what you imply about Java not being a language designed for concurrency.  Defining "designed for concurrency" as "doesn't have mutable state" is a religious argument, not a technical one.  Mutable state is has potential downfalls compared to immutable state but it's also less efficient.  This is a technical trade off, not a issue of capability nor appropriateness.

11  Games Center / WIP games, tools & toy projects / Re: Particle Editor Tool on: 2013-02-08 03:12:56
looks really nice - good work!
12  Java Game APIs & Engines / Tools Discussion / Re: Spine: 2D skeletal animation on: 2013-01-04 07:26:53
Oh my God!

You and people like you disparage the whole work of Open Source community, this is a shame.
Although it is really great what you've done, but this just is not fair, that you take someone's work and willingness to share their work to the community, and with that you want to earn money.


http://www.youtube.com/watch?v=uFMMXRoSxnA



There's nothing wrong with making money from OSS. You are simply factually incorrect. I like RMS but he's not trying to create a world in which software engineers can't make money, he's trying to create a world in which software cannot restrict your freedoms.

I'd suggest you learn a little about OSS before you open your mouth again.  And quite frankly, as the author of some great OSS software which other's have profited from, I think you should apologise to Nate.
13  Discussions / General Discussions / Re: New feature: crackdown on senseless posts on: 2012-12-17 01:38:00
Your vigilance is appreciated, Riven
14  Game Development / Shared Code / Re: Fast & simple AABB collision detection on: 2012-12-12 06:09:12
There's kind of a convention of tidying up code and making it readable when it's offered up to others.

But, whatever.
15  Discussions / General Discussions / Re: Where are you from? on: 2012-12-09 06:22:03
New Zealand.  Sunny Dunedin, to be precise :o)
16  Game Development / Game Mechanics / Re: Projectile Calculation in Discrete Time on: 2012-12-03 07:00:42
USE FIXED TIMERATE SIMULATIONS AND SIMPLE INTEGRATION.

For once, I agree with Roquen.  This is the simple & quick answer.
17  Java Game APIs & Engines / Java 2D / Re: GUI for active rendering in Java2D on: 2012-12-01 13:09:10
Thanks for the suggestions, guys.

I decided not to go for the idea of having the active rendered content on another panel - that doesn't work for my design.

@noblemaster: yeah, I've read that stuff already: it doesn't work, or at least it didn't for me.

I've gone with refactoring the code into LWJGL code, rather than compromising the design.  It's been pretty easy: I just set the viewport upside down and the coordinates are all the same as the Java2d version so the code is happy.
18  Java Game APIs & Engines / Java 2D / Re: GUI for active rendering in Java2D on: 2012-11-29 20:16:10
Java2D isn't the best use of your time... Undecided

My game is looking good and running at hundred to thousands of frames per second.  There's nothing wrong with Java2D for the right kind of game.
19  Java Game APIs & Engines / Java 2D / Re: GUI for active rendering in Java2D on: 2012-11-29 07:18:01
that's what I started doing before I figured it wasn't the best use of my time :o)
20  Java Game APIs & Engines / Java 2D / GUI for active rendering in Java2D on: 2012-11-29 01:53:23
I wrote a basic little artillery game in Java2D which runs well and looks pretty good.  Then I went to add some GUI elements to it.  Swing doesn't really work under active rendering.  Does anyone know of any good GUI toolkits that will work with active rendering?

Not the end of the world if there's nothing available - I'll just convert the code to libgdx or lwjgl.  That said, it runs great now so I'd like to avoid rearchitecting unless I absolutely have to.
21  Discussions / General Discussions / Re: Doom 3 BFG source code on: 2012-11-29 00:10:42
Quake 3 was (and still is) fun for a multiplayer death match.  Single player was shit, of course.
22  Discussions / General Discussions / Re: Java is pretty cool on: 2012-10-30 08:01:15
While I loathe Javascript, I like Gmail well enough.  The real value for me is that Google spam filtering is the best I've ever seen
23  Discussions / General Discussions / Re: Java is pretty cool on: 2012-10-30 00:05:10
Heh.  Another one of these threads.

I agree with Cas: Javascript is shit.  I earn a living writing Javascript and I loathe it.  It is definitely the best tool for writing web apps, but that's damning with faint praise.  It's nightmarish to maintain, it has the performance of an drunk encephalitic tapeworm and about as much charisma.  If you write little toys with it, it's fine but it scales badly.  You try having a giant code base and then something breaks and you get no warnings whatsoever and when you do get an error it's nowhere near the actual problem.  A nightmare.

Any language that can't even do 'include' is pretty f**ked IMO.



24  Game Development / Game Mechanics / Re: Elite-like spaceship movement on: 2012-10-29 02:13:14
This sounds like you need to learn about Quaternions Smiley

Don't see why.  I implemented an Elite-style controlled game with matrices perfectly well.
25  Game Development / Newbie & Debugging Questions / Re: Should I move to JMonkeyEngine? on: 2012-10-23 08:37:13
If you are saying that OpenGL is too confusing and you'd like something simpler that just let you get on with programming games, then yes: JME might be a good move.  If you are wanting to understand OpenGL better, per se, then no - going to JME wouldn't help that.
26  Discussions / General Discussions / Re: Tremble, mortals! I have enslaved your administrator on: 2012-10-01 10:24:27
It is with sinister pleasure that I announce the enslavement of your humble administrator Riven in Puppygames' cellar. Riven has now quit his full-time job in order to make tea for me whenever I so command it. By nights he dreams of becoming a rock star games programmer, so he writes code for Puppygames now. The results of our efforts will hopefully be available in about 6 months time.

Normal service is likely to be interrupted as I will thrash him with a willow switch if he strays from his giant task-list and tea-making duties. When he returns you may release ra4king from his cage and give him some water.

That is all.

Cas Smiley

Awesome!  Congrats to both of you, but please let Riven out of his Gimp suit occasionally to take care of JGO Smiley
27  Discussions / Miscellaneous Topics / Re: I'm back! on: 2012-10-01 09:07:36
I don't know if many noticed, but the past 2-3 weeks I've been mostly off of JGO. Reddit and school (mostly Reddit) have fully engulfed my life!

I had over 130 unread threads and I never thought I'd see this day again:



Anyway: I've lost all motivation to program and do anything other than waste time on the internet. I haven't opened Eclipse since September 8.....


Hey bro!

Totally know what you mean about motivation.  I was working on a game which was going nicely.  I've always wanted to have deferred rendering for the lighting solution.  I've got all the multi-render-target stuff working but I'm stuck on the lighting phase.  I'm right out at the edge of my GL knowledge here and the inability to debug the shader phase is super frustrating.

I get stuck reading Reddit and playing Battlefield 3 to avoid the frustration of not moving the code on... which of course means I don't move the code on which makes me MORE frustrated!  Arrrgh!

I'm trying to get back into it tonight.  No Reddit/BF3 for me tonight!  Smiley
28  Discussions / General Discussions / Re: The hidden cost of C++ on: 2012-09-27 22:50:15
Aaahh!  Ok, thanks for the clarification - I get where we diverge now - mainly around the use of the '*' character.  I guess the larger issue here is that we don't have a number of characters available to use for overloading which means that we're always compromising somewhat.  It's this element of compromise which always disappoints me with operator overloading.


29  Discussions / General Discussions / Re: The hidden cost of C++ on: 2012-09-26 23:30:51
Funny thing about primitives: they're a compiler optimization, they need not be exposed at the language level.  Smalltalk has never really had them, and most of Java's JIT technology came from smalltalk derivatives (Self and Strongtalk).  Scala also doesn't have them, yet it also emits bytecode that uses primitives -- in fact, because of annotations like @specialized, it's able to do so in more places than Java.

Java did not start out with JIT at all, and therefore did not launch with many ambitions to advance the state of its compiler to leave out the primitive/object distinction or even blur it in any way.

Sure you can still hand-optimize quite a lot of code with primitives ... just like you can if you wrote everything in C.


This is the reason I said in a previous thread about Java that I'd have preferred that the language didn't have the primitive / type class split.  It seems unnecessary given a smart enough compiler.
30  Discussions / General Discussions / Re: The hidden cost of C++ on: 2012-09-26 23:24:16
Quote
... uses this notation for cross product: a X b, which is precisely what I referring to - that is that standard notation for the multiplication operation.
In arithmetic sure. 10×5.  Or sometime when you're abstractly talking about some (potentially unspecified) field, but then again it's almost as common to use a 'dot' as well.  But we're talking about a specific algebra:

Standard notation for vectors:  let small letters be scalars and capitals be vectors:

product of a vector with a scalar: sV  (no cross symbol)
cross product:  A×B
dot product: A.B
product:  AB -  Doesn't exist..it isn't representable in terms of vector


We must be talking across purposes.  All I have been claiming is that A x B is the standard notation for vector cross product - which you seem to have agreed with.  

I also claimed that A x B is usually "a * b" in programming languages and therefore "a * b" would be an obvious choice for overloading vector cross product (esp. since you can't overload the 'x' character)

I also claimed that the '*' multiplication operator when overloaded often inherits it's programming language level precedence.

I also claimed that programming level precedence doesn't always map correctly to various mathematical domains thereby creating a problem representing maths in code using operator overloading.

I don't know why you've kept going on about inner / outer products, scalar/Vector multiplication or Vector multiplication OF ANY KIND.  I'm not discussing any of those cases, I'm just discussing "A x B" with vectors, the cross product of A and B.

If you want to disagree with me, can you disagree with one of the points I actually made rather than making up straw men of your own?

regarding Mathematica: I asked you for a mathematical reference showing that A x B has a different precedence in the context of Vector maths than A + B, not a programming reference.  It was a simple enough request I believe.  All of your verbiage related to Mathematica is simply restating your intuitions - the very ones I asked for a reference for in the first place.
Pages: [1] 2 3 ... 17
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

atombrot (25 views)
2014-08-19 09:29:53

Tekkerue (24 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (13 views)
2014-08-16 06:20:21

Tekkerue (20 views)
2014-08-16 06:12:11

Rayexar (58 views)
2014-08-11 02:49:23

BurntPizza (38 views)
2014-08-09 21:09:32

BurntPizza (30 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!