Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (800)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
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 ... 4 5 [6]
151  Game Development / Newbie & Debugging Questions / Re: Help with understanding uses of vectors on: 2012-10-15 08:54:12
Thank you, vectors really are easy to understand and provide nice features that may be useful.

Snarf?
152  Game Development / Newbie & Debugging Questions / Re: Help with understanding uses of vectors on: 2012-10-13 14:25:31
I use the lwjgl vectors, but I was more conserned on how one would use them in everyday programming for models, maps and lighting or finding the normal to faces.
153  Game Development / Newbie & Debugging Questions / Re: Help with understanding uses of vectors on: 2012-10-13 14:01:04
Wouldn't it be easier to use an array?

154  Game Development / Newbie & Debugging Questions / Re: Help with understanding uses of vectors on: 2012-10-13 13:45:17
OpenGL vectors which are mathematical vectors Smiley
155  Game Development / Newbie & Debugging Questions / Help with understanding uses of vectors on: 2012-10-13 11:49:26
I've been recently exploring the world of vectors to see how they can make life easier when it comes to games programming. I was wondring how they would be put into pratical use, if i was to use a voxel render (like minecraft) would it be easier to use a vector for each cube or each face when it comes to lighting aswell.

I'm yet to truely explore vectors in pratical use, so my question is really, how would you use vectors in daily game programming of many game styles.

Thank you, in advance for any help Smiley
156  Games Center / WIP games, tools & toy projects / Re: [Beta] Blocked! on: 2012-10-09 10:57:40
Okay so on level two when I press restart the block still remains instead of clearing, I was unable to place a block while knowing what I'm doing, I clicked, spammed key and nothing happeneds anywhere... probably just not working correctly.  -edit

I also got a outofbounds array exception which decided to rearrange the whole screen upon restarting on round three.
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  
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException:
 20
        at net.blocked.src.level.Level.resetLevel(Level.java:116)
        at net.blocked.src.MouseHandler.mouseClicked(MouseHandler.java:47)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$000(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
60 ups, 3570 fps

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException:
 15
        at net.blocked.src.level.Level.resetLevel(Level.java:109)
        at net.blocked.src.MouseHandler.mouseClicked(MouseHandler.java:47)
        at java.awt.Component.processMouseEvent(Unknown Source)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$000(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour
ce)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)
157  Games Center / Archived Projects / Re: Apex Faction 2.0.2.1 [ALPHA] on: 2012-10-08 10:39:27
Running Ubuntu

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
ubuntu@ubuntu:~$ java -jar '/home/ubuntu/Downloads/ApeXFacTioN-2.0.2.1-alpha-v1.6.jar' 
Exception in thread "main" java.lang.NoClassDefFoundError: org/newdawn/easyogg/OggClip
   at game.music.PlayMusic.<init>(PlayMusic.java:82)
   at game.menu.MainMenu.<init>(MainMenu.java:23)
   at game.Scene.<init>(Scene.java:39)
   at GINIT.main(GINIT.java:31)
Caused by: java.lang.ClassNotFoundException: org.newdawn.easyogg.OggClip
   at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
   ... 4 more
ubuntu@ubuntu:~$
158  Games Center / WIP games, tools & toy projects / Re: Particle System on: 2012-10-08 01:24:29
Here we go
Source Code for both:
https://docs.google.com/open?id=0B20ZnQ-9hBC3YlVIdnVqTGg5akU

Version1:
https://docs.google.com/open?id=0B20ZnQ-9hBC3aEZyeFB6VkxGQzA

Gravity really slows things down...

The equation for the colour is
GL11.glColor3f((particle.positionY / particle.velocityY), (particle.positionX / particle.velocityX), 1);
159  Games Center / Archived Projects / Re: Apex Faction 2.0.2.1 [ALPHA] on: 2012-10-07 04:45:26
5.5mb, don't think you should be sorry for the large size :p

I'll play is ASAP, I do like the look of it
160  Games Center / WIP games, tools & toy projects / Re: Particle System on: 2012-10-05 15:56:15
My first system was a array which stored the particle positions and I created a nice system for flagging particles to be removed. Got 1 million at about 100ms, though it had some problems, it did make use of the Stride on CPU's (pre fetch for the next array value once its detected a patten.)

PS I have 4 different versions. V2 and v3 are under developed versions of v4 and v1 is completely different.
161  Games Center / WIP games, tools & toy projects / Re: Particle System on: 2012-10-05 13:46:16
I actually use a linked list iterator, which makes things nice and quick.
162  Games Center / WIP games, tools & toy projects / Re: Particle System on: 2012-10-05 08:47:55
This was done is LWJGL and every frame in which the button is clicked down 100 particles will be spawned, It does print to the console the number of active particles and render time per frame in MS, so using CMD will show that, but making it the title name does seem better.

It is only 2D but I should add in that other 1D.

Gravity does slow things down quite a bit, but it is faster then before... I'l upload my first version aswell which which was before I went to ArrayList's and objects as particles, I used simple Arrays, but that became a problem when removing particles.

The colour is just a random equation involving the speed....
163  Games Center / WIP games, tools & toy projects / Re: Particle System on: 2012-10-04 10:21:01
I will upload the source code once I get back to the computer which it's located :3 Taking a nice week off to celebrate almost finishing school.

I do have a few things I want to add such as
- Dynamic Core Allocation. I'm sure it has a different name, but I like the sound of Dynamic Core Allocation
- Collision, I got bored one day in math so I decided to start thinking about a method for collision, I should implement and test it.
- A cool looking bar on the side which represents the render time.
- Resizable
164  Games Center / WIP games, tools & toy projects / Re: Metallum Miner (2D Mining game) on: 2012-10-03 09:52:14
There were a few things I wanted to note:
- Water filling a room instantly as soon as a flow to a water source was initiated, would be cool to see that become something more    gradual, Terraria style.
- A fall rate which wasn't constant, mainly all movement to be smoothed out and less noticeable changes in direction when jumping.
- being able to place blocks where you stand.
- There's no collision to the sides of tiles so if you jump in a way you can enter the side of a tile and pass through it to the top.

I'm sure a lot of the things I've already said, you had the intention of doing already, Good job with the work    Tongue

I must say this has inspired me to do something, but I'm not going to tell into I'm ready to show Grin
165  Games Center / WIP games, tools & toy projects / Re: Particle System on: 2012-10-02 01:40:27
If you run it through CMD java -jar "path"
It will give a time in MS per frame and active particles
166  Games Center / WIP games, tools & toy projects / Particle System on: 2012-10-01 11:29:27
I've been developing a Particle System as my first project, I do want to create a few games in the future, but I've always wanted to create a Particle System. so here it is, Right click to place gravity, 0 to remove gravity completely and left click to spawn particles.

I would like to add in collision, but I haven't had the time to implement it into the system.


Download - https://rapidshare.com/files/3293633547/java.jar
167  Game Development / Newbie & Debugging Questions / Re: Plane Lighting problem on: 2012-09-30 05:32:27
I've spent a while trying to find out what the problem was and as soon as I post this, It's set as GL11.GL_DIFFUSE not GL11.GL_SPECULAR
168  Game Development / Newbie & Debugging Questions / Plane Lighting problem (Solved) on: 2012-09-30 05:17:22
Recently I've moved into a more advance part of OpenGL which is lighting, but as what follows is an error which I keep hitting, which is more of a logical error because despite where i place the plane it's illumination is the same everywhere.

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  
import java.nio.ByteBuffer;
import java.nio.FloatBuffer;
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengl.GL11;

public class window {
   public static void main(String[] args){
      try {
         Display.setDisplayMode(new DisplayMode(800, 800));
         Display.create();

         GL11.glMatrixMode(GL11.GL_PROJECTION);
         GL11.glLoadIdentity();
         GL11.glOrtho(0, 5, 0, 5, -10, 10);

         GL11.glMatrixMode(GL11.GL_MODELVIEW);
         GL11.glLoadIdentity();
         GL11.glEnable(GL11.GL_LIGHTING);
         GL11.glEnable(GL11.GL_LIGHT0);
         float light0Position[] = {3f, 3f, 2f, 1f};
         float light0Color[] =    {1f, 0f, 1f, 1f};
         float light0Ambient[] = {0.3f, 1f, 1f, 1f};

         ByteBuffer byteBuffer = ByteBuffer.allocateDirect(16);
         //GL11.glLightModel(GL11.GL_LIGHT_MODEL_AMBIENT, (FloatBuffer)byteBuffer.asFloatBuffer().put(light0Color).flip());
         GL11.glLight(GL11.GL_LIGHT0, GL11.GL_DIFFUSE, (FloatBuffer) byteBuffer.asFloatBuffer().put(light0Color).flip());
         GL11.glLight(GL11.GL_LIGHT0, GL11.GL_POSITION, (FloatBuffer) byteBuffer.asFloatBuffer().put(light0Position).flip());
         GL11.glLight(GL11.GL_LIGHT0, GL11.GL_AMBIENT, (FloatBuffer) byteBuffer.asFloatBuffer().put(light0Ambient).flip());

         GL11.glEnable(GL11.GL_NORMALIZE);
         while(!Display.isCloseRequested()){
            GL11.glClear(GL11.GL_COLOR_BUFFER_BIT);
            GL11.glLoadIdentity();
            GL11.glBegin(GL11.GL_QUADS);
            GL11.glNormal3f(0, 0, 1);
               GL11.glVertex3f(2, 2, -3);
               GL11.glVertex3f(4, 2, -3);
               GL11.glVertex3f(4, 4, -3);
               GL11.glVertex3f(2, 4, -3);
            GL11.glEnd();
            Display.update();
         }
         System.exit(1);

      } catch (LWJGLException e) {
         e.printStackTrace();
      }


   }
}
Pages: 1 ... 4 5 [6]
 
Riven (346 views)
2019-09-04 15:33:17

hadezbladez (5128 views)
2018-11-16 13:46:03

hadezbladez (2011 views)
2018-11-16 13:41:33

hadezbladez (5397 views)
2018-11-16 13:35:35

hadezbladez (1119 views)
2018-11-16 13:32:03

EgonOlsen (4537 views)
2018-06-10 19:43:48

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

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

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

nelsongames (4526 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04: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!