Java-Gaming.org Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (615)
Games in Android Showcase (173)
games submitted by our members
Games in WIP (659)
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 ... 9
1  Game Development / Newbie & Debugging Questions / Re: Game has a bunch of short pauses on: 2015-08-28 15:46:47
These pauses are definitely caused by the GC doing a full scan to clear memory. Also, how/why are you creating 200kb of objects every frame? That sounds like way too many object allocations to me.
2  Java Game APIs & Engines / Tools Discussion / Re: jBullet3 on: 2015-08-28 12:30:13
Don't forget about supporting LWJGL3 (which has OpenCL too).
3  Discussions / General Discussions / Re: Excelsior JET Charity Bundles 2015 on: 2015-08-22 11:57:55
Quick question: How long does the license hold? e.g.: Is there a point at which I have to buy the full version for 1500$?
4  Game Development / Newbie & Debugging Questions / Re: JavaFX 8 - Custom events on: 2015-08-20 18:44:16
1  
2  
3  
4  
//Sprite.class
if(died() == true){
    Main.state = DIED;//where Main.class is your main class for example
}

1  
2  
3  
4  
//Event.class
if(Main.state == DIED){
    //fire event
}


That is a absolutely terrible idea. The moment you need more than one sprite, the system breaks down.

A much better way is to have a method in the class of your 'thing' that is called when the 'thing' dies.
This method could then fire a event, or put a message in some queue that is continously read.

EDIT: A very quick google search that should tell you what you want:
http://stackoverflow.com/questions/27416758/how-to-emit-and-handle-custom-events
5  Java Game APIs & Engines / OpenGL Development / Re: Vulkan ETA late 2015, Android support, Apple NOT supported on: 2015-08-14 15:21:13
Okay, now that's just stupid.
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-21 11:53:05
Added stb bindings to LWJGL 3:
-snip-
(will post details when the build is up)

Questions:
- For what platforms will this be available?
- Is this going to be built right into LWJGL3?

Because this looks awesome!
7  Java Game APIs & Engines / OpenGL Development / Re: Precision and value range on: 2015-04-23 13:08:23
AFAIK: A single float can go up to ~1 lightyear with one unit being a single meter (e.g.: Float.MAX_VALUE roughly equals 1 lightyear).
If you do things right, you can continue to use floats without trouble.

Before drawing any body (or system of bodies) calculate the offset from the body to the camera and translate by that instead of translating the whole scene for rendering (as it is usually done). This reduces the depthbuffer-artifacts and fixes the 'jitter' you get when you get to the edge of your solar-system.

1  
2  
3  
4  
5  
6  
7  
Vec3f cPos = camera.getPosition();
Vec3f bPos = object.getPosition();
Vec3f offset = subtract(bPos, cPos);

// Using OpenGL 1.1 here for demonstration
GL11.glTranslate(offset.x,offset.y,offset.z);
GL11.glCallList(object.getModel());


Another thing to make use of is a 'frame of reference'-system. Its quite simple: "If I am close to a stellar-body (planet/moon/asteroid/spacestation), that body will be the origin (0,0,0) of the scene for physics and rendering. Else, my ships position is given as total position".
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-03-31 19:35:34
I was bored and have a headache... so I wrote a tiny template library.
Its only 150 lines of code and does exactly what I want and nothing else.

It turns this:
1  
Hello, %{name}! How are you? I am %{feel}.


Into this:
1  
Hello, You! How are you? I am fine.


Within (edit)0,0003 seconds 2 ms. Not that bad for a first try!

(edit): And now you can look at the nightmare of code I created (just for fun)! http://pastebin.com/QHTbPAys
9  Game Development / Newbie & Debugging Questions / Re: Confusion with VAO/glDrawArrays and Frustum Culling on: 2015-03-31 17:46:21
Try to use a Octtree for this: http://en.wikipedia.org/wiki/Octree

You frustum cull against the octree, only drawing the nodes of the tree with actual content that are inside the frustum.

Edit:
A grid could also work, but since you said your 'objcts' can be bigger than '1' that probably means that they can overlap the cells of the grid, which might be a problem.
10  Game Development / Newbie & Debugging Questions / Re: Matrix Transformations on: 2015-03-16 20:47:19
As far as I know, the following should be correct:
1  
ModelViewProjection = Projection * View * (Rotation * Translation * Scale)


Since you only need the model, its this:
1  
Model = Rotation * Translation * Scale


So...
1  
2  
3  
4  
5  
6  
7  
t.rotation.setToRotationRad(new Vector3(p.getBody().getPosition().x, p.getBody().getPosition().y, 1), p.getBody().getAngle());
t.scale.setToScaling(1, 1, 1);
t.translation.setToTranslation(p.getBody().getPosition().x, p.getBody().getPosition().y, 1);

t.transform.set(t.rotation);
t.transform.mul(t.translation);
t.transform.mul(t.scale);


This should work and if it doesn't something else is wrong.
Have you tried to display the rotation/translation/scale as lines and text on your object?
That usually helps with debugging this sort of thing.

EDIT: What math-library are you using?
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-03-11 14:15:05
I registered a bplaced.net account. Now I have no idea what to do with it.
So, I uploaded a small design-test: http://longor.bplaced.net/
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-03-09 17:17:52
I too, made a galaxy. (ignore the generation artifacts)



(this screenshot was made two years ago)
13  Game Development / Newbie & Debugging Questions / Re: Stop geometry shader from auto-billboarding shapes on: 2015-03-05 15:27:45
We can help you better if you tell us what you are attempting here.
Obviously you are trying to render voxels as cubes, but for what exactly?
14  Discussions / General Discussions / Re: What's your day job? on: 2015-02-16 19:20:27
I am in tradeschool right now. After that I will probably work for either SAP, Microsoft or Siemens.
15  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-06 00:09:17
What I did today:
Wrote a code-generator for Vector-classes. Just the basics (constructors/setters/getters) make up to ~400 lines of code per vector-type (There are 12 types...).
16  Discussions / General Discussions / Re: 2015 Game Development Goals on: 2015-01-01 04:17:47
What I did in 2014:
- Worked trough 17 iterations of my game-engine, out of a total of ~40 iterations (I lost count!) troughout the year.
- Spent the last 3 weeks playing around with JavaFX. Realized last week that I hate it.
- Stopped work on all sideprojects, no matter how small or important. No more constant tinkering, had enough of that! (~150 project folders... wat O_O)

What I am going to do in 2015:
- Follow my masterplan and actually fully implement the base of my game-engine. (The masterplan has 300+ pages... what am I doing with my life? Ah hell, its fun!)
- Resume work on my Minecraft-Mod. (Minecraft-Forge for 1.8 is taking a bit too long...)
- Get more sleep. -.-

Have a nice day and a happy new year!
17  Game Development / Networking & Multiplayer / Re: Wanting to know the best way to send data TCP UDP on: 2015-01-01 03:14:46
The game as it stands has the potential to be 3,100,000,000  -  -3,100,000,000 both on the x and y

If these numbers are in meters, your gameworld is 3'100'000 kilometers in diameter... and that may just be a *little bit* insane.
18  Java Game APIs & Engines / OpenGL Development / Re: Get rotation angle of JBullet RigidBody to render it using LWJGL. on: 2014-11-02 14:22:28
The 'RigidBody'-class has a method called 'getOpenGLMatrix' (or similar). The method returns a model-space matrix for the RigidBody in your scene.
This matrix contains both translation and rotation.

1  
2  
3  
4  
(:pseudocode:)
projectionMatrix = ???; // projection
viewMatrix = ???; // camera
modelMatrix = getOpenGLMatrix(); // model


Have a nice day!

- Longor1996
19  Game Development / Newbie & Debugging Questions / Re: Stencil Shadows not working on: 2014-10-28 19:38:34
Code tags?

Thanks LK, you're never on Skype anymore! Or check your emails.

Code Tags:
1  
[ code ] your code here [ /code ] (Without the spaces!)


Also, I am on(line on) skype right now.
20  Game Development / Newbie & Debugging Questions / Re: Stencil Shadows not working on: 2014-10-28 19:33:16
(PS: Please use Code-Tags)

A list of useful tutorials:
http://ogldev.atspace.co.uk/www/tutorial40/tutorial40.html
http://joshbeam.com/articles/stenciled_shadow_volumes_in_opengl/
http://www.angelfire.com/games5/duktroa/RealTimeShadowTutorial.htm  (This one has code-examples)

These are the tutorials I used when I tried to understand how Notch implemented shadows in his 0x10c prototype.
That should help!
21  Java Game APIs & Engines / OpenGL Development / Re: Opengl design...multiple viewports or just a single view port on: 2014-10-07 20:28:30
You could also make use of FrameBuffers for this, but using glScissor is a better idea if you need more performance. (Or is it?)
If you need a lot of control over your 'viewports', use framebuffers at the cost of a bit of performance.
If you need a lot of performance, and no ├╝ber-complex masterpiece of a viewport-system, use glScissor.

I might be wrong, and Framebuffers may actually be the better and more performant tool for the job here, but since I never did a multi-view kind of thing...

Have a nice day!

- Longor1996
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-27 15:31:04
I just managed to get my mobile internet-stick running after 1 week completely without Internet!
23  Discussions / Miscellaneous Topics / Re: Whays the story behind your name on: 2014-09-21 21:42:02
My name is the result of a specific symbol, which is drawn by drawing a line over the single characters on the keyboard.
Don't know what the symbol means though. I saw it in a dream and it just happened to hit the characters on my keyboard in the right order to make up a name. (Except that I had to replace the 'u' with an 'r'...)
24  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-20 21:38:55
What I did today: Began recoding my entire math-library.
Or: Commits, commits, and even more commits.

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  
Added full documentation to the TupleX classes.
Tiny corrections. (component variable name characters lower- to upper-case)
Merge branch 'master' of https://bitbucket.org/longor1996/lmath
Added methods to TupleUnwrap to write tuples to a DataOutputStream.
README.md edited online with Bitbucket

Created TupleUnwrap class and implemented all possible unwrap methods.
Implemented all missing constructors (of all kinds) for Vec2d.
Implemented all missing constructors of all kind for Vec2f.
Implemented missing copy-constructors for Vec3f.
Implemented missing copy-constructors in Vec3d.
Added missing copy constructors to Vec4d.
Implemented ALL constructors for Vec4f. (*phew*)
Implemented all constructors for Vec4d. (Now on to Vec4f!)
Implemented buffer constructors for Vec2d and Vec2f.
Implemented all constructors for Vec3f.
Implemented all constructors for Vec2d.
Implemented constructors for Vec2d and Vec2f.
Forgot to make all vector fields public!
Implemented the 'data'-portion of all vector classes.
Finished 'data' interface definitions.
Defined 'data' interfaces for the 3 kinds of tuples.
Added LMath utility class.
Added LMathStringHelper.
Comments/JavaDoc and removal of some methods in PerlinNoise.
Initial upload. (Noisegen)


The repository is public, if anybody wants to take a look at the (possibly insane) code.
https://bitbucket.org/longor1996/lmath
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-19 21:44:51
What I did today:
Installed tons of plugins for Eclipse after finding something called 'Eclipse Marketplace'...
How did I not know of the Eclipse-Marketplace?
26  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-18 15:37:34
Haha. Cheesy I just don't think it's really that hard to not care about the opinion of millions of strangers.

What would you do if a little kid runs up to you and tells you to implement 'XXX' into your Game, or the Kid will scream around and sue you (or something)?
Because thats one of the many (bad) things that happen to extremely known developers all week long.

(Have a nice day! -Longor1996)
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-15 19:52:10
Finished the GUI in my Sandbox-game, and some other things...

(listing of commits)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
Removed 'U' ("Reset World") keybinding.
Finished up GUI-Work and a bunch of other things.
Added a wireframe-box to show how big the world is.
Added wraparound to camera Y rotation.
Sphere rendering now actually uses textures (for real this time!).
Added 3 new methods to GUIRenderer.
Added texturing to sphere drawing, and reduced polycount for spheres.
Fixed bug that the mouse-pos is inverted.
Added method to set color before drawing a string.
Added normals to sphere rendering.
Added methods to draw gradients to BasicGeometry2D.
Refactoring, optimization and bug-fixes. Added controls.txt file. Added source-metrics.


(Also, screenshot)
28  Discussions / General Discussions / Re: Microsoft to buy Mojang for $2 billion? on: 2014-09-15 15:20:41
I may have just lost pretty much all motivation to update my Minecraft mods.
Oh well... I have my own projects to work on (even though that mod is my favorite project).
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-15 13:41:27
What I did today (expressed in commits):
-snip-

Looks awesome
Is the repo public? I would love to see the source!

Yes, its public (I just made it public).
But mind that:
  • The code has badly designed code everywhere in it.
  • Lots of dependencies.
https://bitbucket.org/longor1996/sandbox
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-09-14 22:56:57
What I did today (expressed in commits):
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
Added TimeWasteThread to increase System-Time precision.
Added Key/MouseEvent to GUIPanel.
Added transparent grid to the world, and changed deletionDepth-Grid to use the same system.
Working on GUI-System.
Scripting derpiness.
BugFix: NullPointerException if too many objects get deleted too fast.
BugFix: Weird micro-stuttering in camera interpolation.
BugFix: Removal of objects can corrupt the Artemis-ECS.
BugFix: System.GC() after init() to free post-startup memory and reduce initial frame-lag.
Marked some colors for easier color-search.
Added vsync.
Added EntityComponentSystem (ARTEMIS).
Changed Debug-Rendering.
Added TimerTask-class.
Scripting derpiness ensued.
Work on GUI.
Made the FlyCamera use interpolation, results in a smoother movement/rotation.
Added code to allow the XPNG-system to use any kind of OpenGL texture-filtering.
Worked on the BasicGeometry?D classes.
Added sphere RigidBody/Shape creation and caching to BulletUtil.


And a picture, because pictures:


Also, note that the application eats up less than 10 megabyte. Yay for correct memory management!
Pages: [1] 2 3 ... 9
 
Coldstream24 (15 views)
2015-09-03 00:41:28

Andrew_3ds (24 views)
2015-09-01 19:08:10

afikri (16 views)
2015-08-31 09:30:22

afikri (24 views)
2015-08-31 09:30:07

afikri (13 views)
2015-08-31 09:27:24

afikri (16 views)
2015-08-31 09:26:40

Roquen (24 views)
2015-08-29 11:30:54

GamerC4 (34 views)
2015-08-22 20:38:50

GamerC4 (32 views)
2015-08-22 20:37:18

GamerC4 (37 views)
2015-08-22 20:37:01
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30
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!