Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (726)
Games in Android Showcase (216)
games submitted by our members
Games in WIP (796)
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 ... 16
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-05-22 19:06:26
Been tweaking my SSR a little bit today:

The second image was inspired by a post I saw a few years ago from some SSR thread.
2  Game Development / Game Mechanics / Re: laggy camera movement on: 2017-05-05 18:07:17
Are you using lwjgl3 or lwjgl2?

If you are using lwjgl2, there was a bugged version which reading the polled mouse position would lag. I told Spasi about this a few months (a year?) ago and he fixed it.
3  Java Game APIs & Engines / OpenGL Development / Re: GlBegin gives lag. on: 2017-04-17 22:36:28
You can start by not using glBegin  Tongue Tongue I estimate a 200% speed increase.

Look into VBOs
4  Game Development / Shared Code / Re: All-Integral Alpha Compositing Using Bitwise Operators - Also New to JGO! on: 2017-04-08 17:24:29
I almost did a double take when I saw BlueJay...

Haven't seen that software in a long time!
5  Games Center / WIP games, tools & toy projects / Re: Kami - Java 3D voxel platformer on: 2017-04-04 16:51:27
On this version I only get about 30 fps. Quite a bit lower than the previous build Sad
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-03-29 23:55:10
Finally getting around to implementing assimp.

Any help would be welcome, I can't seem to find any lwjgl resources involving assimp. All of the CPP resources are incompatible.
7  Games Center / WIP games, tools & toy projects / Re: Kami - Java 3D voxel platformer on: 2017-03-29 14:18:49
Very cool  Grin

I get a solid 50-60 fps.

Would be neat to see a PS1 styled game made with this. Something like Bugs Bunny: Lost in time Pointing Pointing
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-03-29 14:15:09
That pixel art is delicious.
9  Games Center / WIP games, tools & toy projects / Re: Kami - Java 3D voxel platformer on: 2017-03-28 15:13:05
Looks pretty cool! Smiley

Could you supply a jar to quickly test with?
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-03-27 22:26:27
Started implementing player physics into my engine today Smiley

Works much better than the built-in bullet character object

Also tweaked the lighting:

11  Discussions / General Discussions / Re: [LWJGL] Which library is best for GUI and how do I change menus? on: 2017-03-25 16:08:04
Could always give Nuklear a try.
12  Game Development / Newbie & Debugging Questions / Re: Check which thread is calling a static method on: 2017-03-24 04:19:57
Ah perfect. Thanks! Smiley
13  Game Development / Newbie & Debugging Questions / Check which thread is calling a static method on: 2017-03-24 04:08:14
In my engine, I have a static method that can be called from two different threads.

I would like for a way to know which thread is calling the method. I want to change the method slightly depending on the thread, but would like to still just use 1 method.

Any thoughts would be appreciated!

For example:
// Thread 1

// Thread 2

static void a() {
   if ( getThread() == THREAD_1 ) {
      // Do stuff
   } else {
      // Do other stuff

   // Do even more stuff
14  Game Development / Game Mechanics / Re: Level Loading strategy on: 2017-03-22 01:44:25
If you're going for something simple, an old technique I used in my level editor seemed very versatile.

Basically, for every texture I create 1 mesh. This mesh contains every single vertex from every model in my level that uses that texture. So if there are 12 textures in the level, I create 12 meshes.

I also have "nodes" which contain a name, position, and rotation. When I parse the model to load it into my engine, I check the names of each node. If it is a barrel, I place a barrel entity at that specific position and rotation. ect.

Not very "professional", and not optimized at all, but it's easy to get working.
My game first recon (in the WIP forum) uses basically this technique.
15  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-03-21 05:44:01
Started working on a dynamic skybox cubemap. Night-time is mostly complete.

16  Game Development / Newbie & Debugging Questions / Re: 3D dungeon crawler on: 2017-03-20 00:35:15
Here's a nice post on the best way to read a text file line-by-line:

Hope that helps.

Hint. Parse each character in each line to figure out which type of object to place.
17  Game Development / Newbie & Debugging Questions / Re: LWJGL3 STB TTF - How to create a font atlas on: 2017-03-16 23:42:38
Fixed the crash, and the image outputs. However, it is just a series of lines.

Here is the updated code:

Now, however, the format is limited to just a bitmap. I would prefer having a color and an alpha channel.

Changing the stride to 0 fixed the problem with rendering the bitmap. Though it still is limited to just that, a bitmap. I suppose I could write a shader that fixes this for me...

I played around with the resultant byte-buffer, and turned it into an RGBA texture so it works with my engine. So far so good.

If anyone wants the finished code to generate a bitmap and all the glyphs sizes, here you go:
18  Game Development / Newbie & Debugging Questions / LWJGL3 STB TTF - How to create a font atlas on: 2017-03-16 23:37:41

In my previous engine, to draw fonts, I simply created a buffered image, loaded a java awt font, and drew the letters onto the image. Then I just drew some textured quads that corresponded with the text.

However with lwjgl3, since I cannot used BufferedImages (or anything awt), I was wondering how to properly create a texture atlas containing every letter/number/symbol on the English keyboard.

Here is what I tried so-far, but my understanding of the stb library is very minimal. Most of the code was copied from the lwjgl repo. It does not run, it crashes the JVM.
19  Game Development / Newbie & Debugging Questions / Re: LWJGL vs LIBGDX on: 2017-03-15 20:08:21
Do you want to learn how under-the-hood stuff works for developing 3d games? Do you really want to learn how graphics programming works? Or do you just want to forget about that stuff and just make games?

If you want both, go with lwjgl. If you just want to make games, go with libgdx. Or hell. Just start with lwjgl, and if you don't like it, try libgdx.

There's really no right answer.
20  Java Game APIs & Engines / Engines, Libraries and Tools / Re: JBullet Math Library Requirements on: 2017-03-04 15:51:50
I just wrote some wrapper functionality in my engine, which only expose a few functions that just re-direct to the jbullet ones. I pass in joml classes into my functions, an create vecmath equivalents.

Probably not the cleanest way. But I agree with you, a JOML port would be very convenient.
21  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-02-13 22:21:19
I just find it so hard It so hard to find John Oliver and Trevor Noah on Comedy central funny Sad

I liked having colbert on 24/7 on the station; Was a lot more enjoyable.
22  Java Game APIs & Engines / Java 2D / Re: Blu-Play: An introduction to developers on: 2017-02-13 17:38:03
If there was any way to get OpenGL working with it, I would be all over it Sad
23  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-02-11 04:42:53
Implemented a shape util, fxaa, and bloom Smiley

24  Game Development / Newbie & Debugging Questions / Re: How to learn openGL? on: 2017-02-08 17:38:55
For learning specific functions in practice, ThinMatrix is pretty useful.

If you want to learn specific rendering techniques for modern Game Programming, read research papers from NVidia and other game companies. For example, GPU Gems.

Here's a neat article on how the rendering pipeline works in the new Doom Game. Same guy also wrote a few other articles on the same subject but for GTA5

I learned by diving into post-processing shaders. I wrote a bunch of SSAO/HBAO implementations using different functions to test how they all work.
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-02-05 07:01:15
Got cubemaps working with the SSR today Smiley

26  Game Development / Newbie & Debugging Questions / Re: Load a GMMOD File on: 2017-02-02 16:38:15
I've worked with that format a bunch, as I originally came to Java from Game Maker.

SHC, you're mostly correct Smiley

line 0 is the magic number
the FIRST number on line 1 is the amount lines after line 1. So if you have 5, you'll have a start line, 3 vertices, and an end line. You can ignore every other number on this line. For the most part they are meaningless.

However, the start and end lines are technically meaningless, as I don't think they were ever implemented as they were intended. So when reading the file, you can ignore them.

This is also a little annoying, because sometimes game maker models (When saved from older versions of Game Maker) have a start and an end line every 600-1000 lines or so, so the model is being split for no reason. However Model Creator just uses 1 on the start and end of each vertex type.

I wrote a little bit of java code maybe 3-4 years ago to load gmmod models when I first started with LWJGL. Here it is:

public void loadFromString(String[] loadStrings, boolean flipX) {
   int pointer = 0;
   int white = Color.white.getRGB();
   if (loadStrings[0].equals("100")) {
      String header = loadStrings[1];
      String[] headerStrings = header.split(" ");
      int amtPolys = Integer.parseInt(headerStrings[0]);
      if (amtPolys >= 5) {
         this.vertices = new Vertex[amtPolys];
         for (int i = 2; i < loadStrings.length; i++) {
            String[] dat = loadStrings[i].split(" "); //read the line of the D3D model, and split it into an array

            // This is the triangle type. Most cases this is equal to 9.
            float polyType = Integer.parseInt(dat[0]);
            if (polyType <= 1)
            // Vertex position
            float vx = Float.parseFloat(dat[1]);
            float vy = Float.parseFloat(dat[2]);
            float vz = Float.parseFloat(dat[3]);

            // Vertex normal
            float nx = Float.parseFloat(dat[4]);
            float ny = Float.parseFloat(dat[5]);
            float nz = Float.parseFloat(dat[6]);

            // Texture coordinates are not always defined. Default to 0.
            float tx = 0;
            float ty = 0;

            // Color and alpha are not always defined. Default to 0.
            float c = (int) white;
            float a = 1;
            if ( polyType == 3 ) {
               // Just simple triangle. No color or texture data.
            }else if ( polyType == 8 ) { // Polygon type 8
               tx = Float.parseFloat(dat[7]);
               ty = Float.parseFloat(dat[8]);
            }else if ( polyType == 9 ) { //Polygon type 9
               tx = Float.parseFloat(dat[7]);
               ty = Float.parseFloat(dat[8]);
               float col = Float.parseFloat(dat[9]);
               float alp = Float.parseFloat(dat[10]);

               if (alp > 0) {
                  c = (int) col;
                  a = alp;
            } else if ( polyType == 5 || polyType == 13 ) {

            // Flip vertex and normals
            if (flipX) {
               vx = -vx;
               ny = -ny;
               nz = -nz;
            // Add vertex to model
            addVertex(pointer++, vx, vy, vz, nx, ny, nz, tx, ty);
         // Clip the model as it might has some blank vertices

         if (flipX) {
            // Flip the model, as the x component was inverted

It's pretty messy, but then again, so is the Game Maker Model format. It only loads the polygons from a GMMOD file. It will not load things like shape definitions (cube shapes, sphere shapes, ect). You need to convert those to triangles first before saving.

The gmmod format is still quite nice to be honest. It's a very lightweight model, with no other files. However, it is also extremely basic. No multi-texturing, or material support. And Model Creator will always flat-shade your model.
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-02-02 05:51:07
Thanks basil Smiley
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-02-01 23:20:33

Where did that model come from? I want to use it to run some rendering tests Smiley
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-01-27 14:24:03
Havent written an AA shader yet. It's on the list Smiley

The white halo is just a little bit of rim lighting.
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-01-27 01:36:11
Nearly done with the rendering functionality for my lwjgl3 engine Smiley

Pages: [1] 2 3 ... 16
Archive (286 views)
2017-04-27 17:45:51

buddyBro (477 views)
2017-04-05 03:38:00

CopyableCougar4 (924 views)
2017-03-24 15:39:42

theagentd (937 views)
2017-03-24 15:32:08

Rule (949 views)
2017-03-19 12:43:22

Rule (916 views)
2017-03-19 12:42:17

Rule (918 views)
2017-03-19 12:36:21

theagentd (973 views)
2017-03-16 05:07:07

theagentd (891 views)
2017-03-15 22:37:06

theagentd (688 views)
2017-03-15 22:32:18
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 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!