Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (108)
games submitted by our members
Games in WIP (536)
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 ... 5
1  Games Center / WIP games, tools & toy projects / Re: [MAC OSX] JarBundle - A simple jar bundling application on: 2014-07-24 20:24:00
Because I like to have a gui display Smiley
2  Games Center / WIP games, tools & toy projects / Re: FPS Engine on: 2014-07-24 20:07:53
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: ERROR: 0:334: No matching function for call to min(vec4, vec3)

   at com.badlogic.gdx.graphics.g3d.shaders.BaseShader.init(BaseShader.java:158)
   at com.badlogic.gdx.graphics.g3d.shaders.DefaultShader.init(DefaultShader.java:572)
   at com.badlogic.gdx.graphics.g3d.utils.BaseShaderProvider.getShader(BaseShaderProvider.java:35)
   at com.badlogic.gdx.graphics.g3d.ModelBatch.render(ModelBatch.java:269)
   at org.jrenner.fps.View.render(View.java:118)
   at org.jrenner.fps.Main.render(Main.java:59)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:206)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:114)


Doesn't seem to run on macs Sad
3  Games Center / WIP games, tools & toy projects / Re: [MAC OSX] JarBundle - A simple jar bundling application on: 2014-07-24 19:14:22
I've thought of making a GUI version, but didn't had OSX installed right now. Why not add more options? Allow native libs? and custom VM args?
I might do that Smiley
4  Games Center / WIP games, tools & toy projects / Re: [MAC OSX] JarBundle - A simple jar bundling application on: 2014-07-24 18:51:31
Ah you were the one that posted that!
I used this as a reference when I made the application Smiley
5  Games Center / WIP games, tools & toy projects / [MAC OSX] JarBundle - A simple jar bundling application on: 2014-07-24 12:17:02
I was looking for a simple way to package my jar file into a mac Application Bundle a few hours ago. It appears that you can no longer get the bundling application through xcode, or at least, I couldn't find it... So, I made this Smiley



Download it here.

Features:
  • load jar file
  • load icon (uses any PNG file)
(I know that's quite a hefty list).

This will not work on any os besides mac OSX, as I used two shell commands that are OS specific. (One for converting the icon preview image to a .icns file, and the other to execute the "launcher" file).

--
This might be the messiest application I have written in awhile; I started writing this at 4:00 AM.
6  Game Development / Newbie & Debugging Questions / Create a separate JFrame ontop of a fullscreened LWJGL display on: 2014-07-21 04:04:31
So I'm fooling around in lwjgl, and making this little multi-purpose game engine as a side-project. I wanted to make it so that I could have my own "popup" dialogue boxes using JFrames. They work perfectly fine, when the window is not in fullscreen. However, when the window IS in fullscreen, the JFrame is created behind the lwjgl Display, and not ontop of it.

to get into fullscreen I use:
1  
Display.setFullscreen(bool);


I also made sure that "always stay ontop" was enabled on the JFrame.

Any ideas?
7  Game Development / Newbie & Debugging Questions / Re: Should JGO have a JGO Store? on: 2014-07-07 20:10:53
Not to mention, this site is advertised on Minecraft's community page. That's how I found the forums Smiley
8  Game Development / Newbie & Debugging Questions / Re: Ordering draw calls for alpha blending on: 2014-07-05 19:06:42
You can order everything based on distance to the camera.
9  Game Development / Newbie & Debugging Questions / Re: [GLSL] Simplify this vertex passthrough on: 2014-07-03 01:54:14
Yah I just figured that Smiley
Makes everything much faster.
10  Game Development / Newbie & Debugging Questions / [GLSL] Simplify this vertex passthrough on: 2014-07-03 01:25:51
In a shader I'm making for a simple little side-project, I ended up needing to do this to make the shader be more flexible:
1  
2  
3  
4  
5  
if (useViewMatrix == 1) {
   gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.0);
} else {
   gl_Position = projectionMatrix * modelMatrix * vec4(position, 1.0);
}


I was wondering, however, if there was a way to simplify this down to 1 line.
11  Games Center / WIP games, tools & toy projects / Re: WIP Publication Reel on: 2014-07-02 09:28:06
A first person shooter I'm creating called First Recon Smiley


12  Game Development / Newbie & Debugging Questions / Re: Phong Shading giving a black line on: 2014-07-02 09:15:52
My only "advice" is to look in to how you create your diffuse variable in the shader. You are doing something incorrect when calculating it. It appears as though all the vertices/normals are being passed in properly.
13  Discussions / Suggestions / Re: Pre-WIP section on: 2014-07-01 19:52:32
Isn't what you describe precisely what the WIP-section is for? I dont think you need a playable demo to document your progress there, just some screenshot to give an idea of what you are doing.

WIP rules:
Quote
...as long as it is executable...
So a demo is needed.
14  Discussions / Suggestions / Pre-WIP section on: 2014-07-01 19:00:50
I sent this idea to Riven a little bit ago, and didn't get a response, so I'll post it here Smiley

My suggestion is that a Pre-WIP section should be added to the JGO forums. a Pre-WIP section would be used to document progress (via pictures) of a game before it enters into its WIP stage (which should then provide a playable demo). It would help to organize which projects are done to a point where they can be played, and which are still small in scale, and not yet ready for testing.

If there is fear that the pre-WIP section might not be used, then we could always take the approach that the Game Maker Community uses. As you can see, in their WIP section, there is a stickied thread entitled "Previews of upcoming games". In this thread, users are allotted one forum post to provide pictures/media and a description of their game. The thread is cleared at the start of every month.

I feel like this would be a useful addition to the JGO forums, as I myself have a couple projects that are not ready for public testing, but I still want a place to document my progress Smiley

Thank you,
Andrew


[EDIT]
My idea was added Smiley Thank you Riven.
15  Game Development / Newbie & Debugging Questions / Re: Phong Shading giving a black line on: 2014-07-01 01:48:38
It's something to do with how you calculate your diffuse variable in the fragment shader. I commented that part out of the shader, and the black spots no longer appeared.

However, I've never written a phong shader, so if someone else knows more than me, feel free to jump in Smiley
16  Game Development / Newbie & Debugging Questions / Re: Phong Shading giving a black line on: 2014-07-01 01:24:37
Now that is just odd o:

May I see your complete source? I'll see if my machine yields the same results.
17  Game Development / Newbie & Debugging Questions / Re: Phong Shading giving a black line on: 2014-07-01 01:17:13
If you make your shader just a normal passthrough, what does it look like? (without the phong).
18  Game Development / Newbie & Debugging Questions / Re: Phong Shading giving a black line on: 2014-06-30 22:47:34
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
for (int i = 0; i < vertexData.length; i += 9) {
   float[] v1 = {vertexData[i],     vertexData[i + 1], vertexData[i + 2]}
   float[] v2 = {vertexData[i + 3], vertexData[i + 4], vertexData[i + 5]}
   float[] v3 = {vertexData[i + 6], vertexData[i + 7], vertexData[i + 8]}
   
   float[] triangleNormal = getTriangleNormal(v1[0], v1[1], v1[2], v2[0], v2[1], v2[2], v3[0], v3[1], v3[2]);

   normalData[i] =     triangleNormal[0];
   normalData[i + 1] = triangleNormal[1];
   normalData[i + 2] = triangleNormal[2];
   normalData[i + 3] = triangleNormal[0];
   normalData[i + 4] = triangleNormal[1];
   normalData[i + 5] = triangleNormal[2];
   normalData[i + 6] = triangleNormal[0];
   normalData[i + 7] = triangleNormal[1];
   normalData[i + 8] = triangleNormal[2];
}


Not the cleanest way. It should work; but I haven't tested it.
19  Game Development / Newbie & Debugging Questions / Re: Phong Shading giving a black line on: 2014-06-30 05:02:03
What I gave you would give you a float array containing the normal data for each triangle. You should be able to figure out the rest Smiley

[hint]
simply setting the normal array I provided to the "normalData" array wont work. You need to figure out how to fill the normalData array with the data from "normal"
[/hint]
20  Game Development / Newbie & Debugging Questions / Re: Phong Shading giving a black line on: 2014-06-30 04:05:31
I see what you mean, but me being the terrible thinker I am... How do I do this with Slyth2727's code?

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  
for (int i = 0; i < vertexData.length; i += 9) {
   float[] v1 = {vertexData[i],     vertexData[i + 1], vertexData[i + 2]}
   float[] v2 = {vertexData[i + 3], vertexData[i + 4], vertexData[i + 5]}
   float[] v3 = {vertexData[i + 6], vertexData[i + 7], vertexData[i + 8]}
   
   float[] normal = getTriangleNormal(v1[0], v1[1], v1[2], v2[0], v2[1], v2[2], v3[0], v3[1], v3[2]
}

public static float[] getTriangleNormal(float argument0, float argument1, float argument2, float argument3, float argument4, float argument5, float argument6, float argument7, float argument8) {
   float ax,ay,az,bx,by,bz,m,rx,ry,rz;

   //point0 -> point1
  ax = argument3-argument0;
   ay = argument4-argument1;
   az = argument5-argument2;

   //point0 -> point2
  bx = argument6-argument0;
   by = argument7-argument1;
   bz = argument8-argument2;

   //cross product
  rx = ay*bz-by*az;
   ry = az*bx-bz*ax;
   rz = ax*by-bx*ay;

   //magnitude
  m = (float) Math.sqrt(rx*rx+ry*ry+rz*rz);

   //normalize
  rx /= m;
   ry /= m;
   rz /= m;

   return new float[] {rx, ry, rz};
}


Not tested, just wrote it in notepad++
21  Game Development / Newbie & Debugging Questions / Re: Phong Shading giving a black line on: 2014-06-30 03:40:07
but I don't have indices
psst.
(Your vertices)
22  Game Development / Newbie & Debugging Questions / Re: [lwjgl] Changing an undecorated window to decorated without destroying on: 2014-06-24 11:24:59
That would cause two displays to be visible at one time I believe.

[edit]
You can change the undecorated part of the display after the display has been created if you change the display mode. Smiley
23  Game Development / Newbie & Debugging Questions / [lwjgl] Changing an undecorated window to decorated without destroying on: 2014-06-24 10:43:41
Hello!

I wanted to make a simple loading splash screen, so I used this system parameter:
1  
System.setProperty("org.lwjgl.opengl.Window.undecorated", "true");

to have an undecorated window which displays a loading image.

However, the only way I can think of changing the window back to having a decoration, is to destroy and re-create it. The problem with this, is that destroying a display removes all the currently loaded textures, making the whole load screen pointless.

Any thoughts?
24  Game Development / Networking & Multiplayer / Re: MMORPG - Handling Multiple Areas on: 2014-06-24 06:06:15
I disagree. Even with 64 players online, constant squareroot checks would be a cpu waste.
25  Games Center / WIP games, tools & toy projects / Re: 3D Randomly Generated World on: 2014-06-24 06:00:13
When I run the batch as-is, nothing happens.
When I change "start javaw" to "java" this happens:
Quote
C:\Users\Andrew Hamilton\Desktop\3D World>cd data

C:\Users\Andrew Hamilton\Desktop\3D World\data>java -Djava.library.path="natives
/" -jar 3DOrbisLauncher.jar
Exception in thread "main" java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoa
der.java:58)
Caused by: java.lang.RuntimeException: Application launch error
        at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:122)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: com.sun.glass.ui.win.WinApplication._
invokeLater(Ljava/lang/Runnable;)V
        at com.sun.glass.ui.win.WinApplication._invokeLater(Native Method)
        at com.sun.glass.ui.Application.invokeLater(Application.java:338)
        at com.sun.javafx.tk.quantum.QuantumToolkit.defer(QuantumToolkit.java:62
0)
        at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:17
3)
        at com.sun.javafx.application.PlatformImpl.runAndWait(PlatformImpl.java:
212)
        at com.sun.javafx.application.PlatformImpl.tkExit(PlatformImpl.java:320)

        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherIm
pl.java:421)
        at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:
47)
        at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:115)
        ... 1 more

my previous comment about java not working has been fixed. Java seems to be working for all other applications at the moment.


[edit]
After changing the batch file to run 3Dworld.jar as opposed to your launcher, it opens up just fine Smiley

I get 49 fps; which is quite odd as there really isn't anything that intensive going on.
26  Game Development / Newbie & Debugging Questions / [solved] Java is broken on my machine - What do? on: 2014-06-24 03:36:11
I turned on my computer today, and noticed that Java was acting quite strange.

Firstly, I can still run applets in the browser, and the Java path (via Control Panel) is normal.

However, when I try to run jar files, Java will not turn on. Also, when I try to start Eclipse, I get this error message:


Should I uninstall Java and try again? I don't want to break anything...
27  Games Center / WIP games, tools & toy projects / Re: 3D Randomly Generated World on: 2014-06-23 22:35:54
My computer forgot how to run java from a batch file...
This is fun.
28  Game Development / Networking & Multiplayer / Re: MMORPG - Handling Multiple Areas on: 2014-06-23 20:43:30
If you're going to use the pythagorean theorem for distance checks, try doing it without the squareroot. Then if you're checking say 64 distance, check 64^2 as your distance. It's probably easier on the CPU when you have hundreds of players.
29  Discussions / General Discussions / Re: What's with unorganized code? on: 2014-06-23 20:21:07
I'm getting such an ignorant vibe right now...
30  Java Game APIs & Engines / Engines, Libraries and Tools / Re: 3D Game Engine Not Working on: 2014-06-23 07:07:31
If you're on a mac you can ONLY use openGL 2- functions.
However, if you enable core mode ".withProfileCore(true)" and disable compatibility mode ".withProfileCompatibility(false)" in the context attributes when you create the display, you can use OpenGL 3+ functions. Doing this, you cannot use any gl functions under version 3.

The problem is... most people, when writing their opengl applications, use a mix of 2 and 3 for openGL. While this works perfectly fine on windows, it will not on a mac.
Pages: [1] 2 3 ... 5
 

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

The first screenshot will be displayed as a thumbnail.

CogWheelz (16 views)
2014-07-30 21:08:39

Riven (22 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43
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!