Java-Gaming.org Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (612)
Games in Android Showcase (172)
games submitted by our members
Games in WIP (658)
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 ... 51
1  Java Game APIs & Engines / Tools Discussion / Re: jBullet3 on: 2015-08-28 13:46:08
For the purposes of history, let me state what he said to me on the IRC:


<SHC>   I really like the idea about porting bullet 3
<elect> excellent
<SHC>   right now, I have no experience with it (not porting but using it) so I'm now setting up a test workspace in VS2015
<SHC>   Yeah, I would also like to integrate bullet into my engine, so that would be pretty good to have.
<elect> nice
<elect> I took a look to their repo
<elect> it seems they are still in the phase of transporting bullet2 to 3
<elect> Im writing down the validation right now
<elect> I need the stl
<SHC>   Standard Template Library?
<elect> I think so
<elect> We are gonna need some collision detection in the future for our engine and therefore I was looking at jbullet
<SHC>   How are you planning to port it? You write JNI code? or port it to java manually by hand?
<elect> I dont want any binding
<elect> I want pure java code
<elect> so that we can tune everything
<SHC>   So porting by hand? That's a lot of code there..
<elect> yep
<elect> I need hardbody collision for the moment
<SHC>   So we chose the hard path of thorns,.. so shall we spend some days getting used to bullet 3 in C++ first?
<elect> maybe
<elect> I was also thinking if launching a kickstarter could make any sense
<SHC>   Aren't you making it opensource? I mean, working it on free time?
<elect> both
<elect> opensource for sure
<elect> I will work on it during some part of my work and in my free time
<elect> if we go for the port
<elect> I'd like 100% java so that we can also choose to avoid some class instances for performance and memory footprint
<SHC>   My idea is a bit different, we can avoid the vector classes, like btVec etc., and instead construct the structs in JNI code?
<elect> we shall discuss the pro and vs
<elect> actually I was thinking to rely on JOML
<elect> from kaihh
<elect> it looks very good for performances
<SHC>   That's a good idea too, I thought so since constructing objects is very expencive but struct instances is not..
<elect> so at least the math part is "already done"
<elect> ^^
<SHC>   haha yeah, agreed, we shall be using JOML. And the bindings? I have to see an overview of bullet and read some demos.
<elect> what is your dev os & machine, SHC?
<elect> Im using an i5 & 770 on 15.04 x64
<SHC>   Windows 10, i7 4790k, NVIDIA GTX 750 Ti and 16 GB RAM.
<elect> or i5 & 680
<elect> good
<elect> modern enough
<elect> (for opencl support)
<SHC>   Yeah, I think OpenCL is supported even on GTX 210
<elect> yeah, but it is not mature
<SHC>   That's the minimum I heard
<elect> I read the guide, they say cl kernels are very likely to crash for a large number of reasons
<elect> moreover they cannot use cpu as opencl devices, dont know why
<elect> does lwjgl has a opencl binding?
<elect> I guess so
<SHC>   Yes, LWJGL had OpenCL bindings
<elect> nice, we can do then something generic and everyone will choose what he likes most
<elect> like joml
<SHC>   yeah
<elect> I already cloned and built it
<elect> most of examples run
<elect> just a couple crashes
<SHC>   Oh I'm now reading the manual.
<elect> the problem is that they made a browser windows example and when you open it selects automatically the last example you run.
        This means once it crashes I have to clean and clone again, since everytime I open from that moment going on it keep crashing
        (coz it tries to open the same example)
<elect> anyway the opencl support is experimental
<SHC>   Did you create a repo?
<elect> no
<elect> not yet
<elect> I am still in the decision phase
<SHC>   oh kk
<elect> the thing is that it relies of course also on acceleration structures
<elect> I am just starting with that too

Just posting it here in case anyone would like to know what happened behind the scenes in the IRC.
2  Games Center / Showcase / Re: Monster Run on: 2015-08-24 15:53:28
Jumping feels awkward, almost a bit too slow and too rigid looking.
Collision bounds are slightly too large, I can land on the little patch of air before the grass block.

I just had the vertical velocity on always (gravity) and reversed it when jumping, so it appeared like on the sides of a triangles, flat jumping. Should have tried Arc'd jumping this time. Regarding the collision bounds, yes, I simply used rectangles, while I could have used polygons. Even better I could have scaled the polygons down, forgot that. Will do that next time.

Game runs a little choppy on my machine.

That's just because I was refactoring my graphics engine and the progress was left in the middle of the process due to LD. I should have used a previous stable build of my engine, but used this since there were a lot of features I'd like to have (since I removed some things and replaced them with new implementations). These however ran fine on my system, but not on yours, will have to investigate that.

Maybe the reason was that I allocate a large bytebuffer that can hold 1024 * 1024 * 16 bytes in my batcher. I know that it is a lot, will be soon modifying the system to use instanced rendering instead of batching all the data every frame. Or even I can stop unmapping and mapping them again and again when the data doesn't change. Will look into that too, I learnt a lesson.

Just curious, why use OpenGL, this game could be written much more simply in java 2D

I just wanted to say that I'm more comfortable in my own engine than in Java2D. As you have stated, I don't think OpenGL is overkill, it's nothing wrong in using it to get hardware acceleration. Ever thought why Java2D based engines like GTGE and JGame had ports to JOGL/LWJGL while they are just 2D?

And more over, I wanted to try to create an engine that can do both 2D and 3D games, in a pretty similar way. I know the mechanisms differ a lot, but I'm more interested in building a tool that gives a high level way to create games easily. That is my primary inspiration that made me take computer science as my college course and learn programming in the first place.

SHC, you should lock the window size. I resized the window and the now the game is all messed up!

Yeah I agree with you. I just set the camera projection to the window width and height in the initialization of the camera, but I never resized the camera. I used to configure the camera to keep the aspect ratio, but this time, I had to keep to do it in the time, where I had only 10 hours in 48 hours to focus on my game (due to college, and cultural party we're having tomorrow, I'm doing a skit) with other things like eating, classes, etc., cutting the rest of the time. Will improve this once the judgement is over, and I'll remember this next time.

Thanks a lot for giving me my valuable feedback on my game. I'm pretty sure I'm improving myself in this area of making games (aside from programming tools).
3  Games Center / Showcase / Monster Run on: 2015-08-24 01:35:17




Monster Run


Monster Run is a simple platform jumping game, developed in just under 10 hours including art and music. The mechanics are incredibly simple, all you need is perfect timing to make the monster jump by hitting the SPACEBAR key. The game is made in Java 8 and requires a GPU with OpenGL 3.2 or more with core profile.

Who said that Monsters necessarily need to be bad huh?
4  Game Development / Game Mechanics / Re: How to code a sword swipe? on: 2015-08-16 14:04:53
And from the javadocs, it seems that there is already support for rendering a shape filled with texture in the Graphics class. Use this (click on code for javadocs)


1  
g.texture(swordPolygon, swordSwingTexture);



Should simply work for you. Hope this helps.
5  Game Development / Game Mechanics / Re: How to code a sword swipe? on: 2015-08-16 13:57:30
Yes you are right. That is what I meant. Suppose the effect image is 64x64px, then the width and height are 64 and 64 respectively.
6  Game Development / Game Mechanics / Re: How to code a sword swipe? on: 2015-08-16 13:40:41
You almost got my idea, but the plotting of points is a little different. Let's take for example this image as the sword effect:



The red lines are an approximation of the polygon that you will be using to clip the texture. This should work fine, and is a simple one too. Unfortunately, I haven't worked with Slick2D so I have no idea how to render using that, but in general OpenGL, you get the texture coordinates by dividing the polygon vertices with the texture size.
7  Game Development / Game Mechanics / Re: How to code a sword swipe? on: 2015-08-16 12:28:48
My idea is to clip a texture using a polygon? Make a polygon with the following points.

1  
2  
3  
4  
1: 0,  0
2: w,  0
3: w, st
4: 0,  h

Where w and h are width and height, and st is the height of the sword tip. Then simply modify the polygon every frame, and render the texture with the clipping polygon.

I think this should work.
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-08-09 15:30:50
Wrote basic examples using WebGL4J bindings:



See in action
9  Games Center / WIP games, tools & toy projects / Re: Final Fantasy based game - Angel's Destiny on: 2015-08-03 15:27:49
Oh come on @gouessej

As long as you aren't selling anything asking forgiveness rather than permission is fine - don't worry about it. Plus you can always change the art later.

1) There is nothing wrong in trying to be safe in the first place.
2) Changing the art later once the game is well received will make it feel like you are playing a totally different game suddenly, from the middle.
10  Discussions / Miscellaneous Topics / Re: File replacing bat/sh file! on: 2015-08-03 09:05:41
I think you better do this from Java directly, but in another process jar since the OS won't allow you to modify the files that are in use. Then your scripts will become a lot simpler.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
/////// SH version
#!/bin/bash
echo Checking directory
java -jar updateUtil.jar

echo Starting updater
java -jar updater.jar

/////// BAT version
@echo off
echo Checking directory
java -jar updateUtil.jar

echo Starting updater
java -jar updater.jar

Then the main class of the updateUtil.jar will replace all the .new files with .old. Some Java code for this.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
public static void main(String[] args)
{
    processDirectory(new File("."));
}

private static void processDirectory(File directory)
{
    for (File file : directory.listFiles())
    {
        if (file.isDirectory())
            processDirectory(file);
        else
        {
            String path = file.getAbsolutePath();
            if (path.endsWith(".new"))
            {
                File oldFile = new File(path.replace(".new", ""));
                oldFile.delete();

                file.renameTo(oldFile);
            }
        }
    }
}

And I think this is the more safe way than relying on complex shell commands. Also this works on any platform that your game runs too.
11  Games Center / Showcase / Re: jfCraft on: 2015-08-01 03:58:45
Looks really good, but I'm constantly receiving this error each time I start a new game in the client.

http://www.java-gaming.org/?action=pastebin&id=1322
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-30 15:06:15
Actually the college started two days ago, but only now I got time to post my subjects. My subjects this semester are:

  • Data Structures in C
  • OOP through C++
  • Mathematical Foundation for Computer Science
  • Digital Logic Design
  • Managerial and Financial Analysis

Seems easy enough to obtain 24 credits from them.
13  Discussions / Miscellaneous Topics / Re: What are your current personal projects? on: 2015-07-29 01:46:43
I'm working on a LWJGL like (in the design) WebGL wrapper for GWT.

https://github.com/sriharshachilakapati/WebGL4J/
14  Game Development / Newbie & Debugging Questions / Re: Problems with UnicodeFont(Slick2d) on: 2015-07-28 16:01:06
Perhaps by applying the linear filter on the texture? Dunno in code, never used Slick2D. The definite issue is the stretching of the textures though.
15  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-24 10:37:36
Had some fun with GWT and WebGL. Written a basic LWJGL style webgl interface in a few minutes and got a working triangle rendered at 60 FPS.



Some example 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  
// Get the <canvas> element to render on using WebGL
Element canvas = Document.get().getElementById("webgl");

// Create the context and set the viewport
glCreateContext(canvas);
glViewport(0, 0, canvas.getClientWidth(), canvas.getClientHeight());
glClearColor(0, 0, 0, 1);

...

// Create the vertex shader
int vsShaderID = glCreateShader(GL_VERTEX_SHADER);
glShaderSource(vsShaderID, vsSource);
glCompileShader(vsShaderID);

// Create the fragment shader
int fsShaderID = glCreateShader(GL_FRAGMENT_SHADER);
glShaderSource(fsShaderID, fsSource);
glCompileShader(fsShaderID);

// Create the program
int programID = glCreateProgram();
glAttachShader(programID, vsShaderID);
glAttachShader(programID, fsShaderID);
glLinkProgram(programID);
glUseProgram(programID);


All these functions are static functions written using JSNI and are present in WebGL class. This is very incomplete, but it works.
16  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-22 04:13:57
Did some GIMPing and made this new earth texture: http://i.imgur.com/Y9WpEh6.png

17  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-21 17:20:18
@J0

I know that game, I have played that ~6 years ago, it was actually the inspiration for my game. But this game is going to be story based. I need the earth to be there in the background according to the story. I think I will replace that texture with a large and improved earth background.
18  Game Development / Newbie & Debugging Questions / Re: Best Practices for Creating New Objects on: 2015-07-21 09:19:20
For simple things like vectors and matrices, I keep a reusable stack (similar to object pool). Then whenever I need a temporary object I pop the objects from it (if the stack is empty, I create the instance). Once the work with that object is done, I push it back into that stack.
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-21 01:36:41
Actually what I did yesterday. Implemented thorns into the game, and added a free mode.



The free mode allows you to see the complete level with a 6DOF camera.
20  Discussions / Miscellaneous Topics / Re: Looking for early testers for We Shall Wake Demo 7 on: 2015-07-20 02:54:58
I've tested the Practice mode and the Tutorial mode, and this is running pretty smooth. The only thing, I can't find any enemy in the tutorial mode.
21  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-19 12:15:15
Implemented a new ResourceLoader that loads resources in the background in a separate thread:

Click to Play


This uses a secondary window with shared context to the main window in a secondary thread to load the resources, while drawing the progress on the first thread.
22  Discussions / Miscellaneous Topics / Re: Looking for early testers for We Shall Wake Demo 7 on: 2015-07-19 03:11:03
I will be testing it definitely. It'd be awesome if I could be a tester for this awesome game.
23  Java Game APIs & Engines / OpenGL Development / Re: [LWJGL3] Experiencing weird crash on glUseProgram when started in fullscreen on: 2015-07-16 03:54:49
Yes this is a driver bug. The C version did the same. The issue is having only a single shader works fine, but binding another program while one is in use (that is normal) it crashes. I can confirm that this only occurs on Intel HD 4000 of my laptop, switching to NVIDIA graphics makes it work pretty fine.

I'm NOT blaming the bindings, I have just included it in the title tag guessing people will ask me what bindings are you using and similar questions. I have updated my drivers to the latest ones, but the same is the case. Think I'll ignore this now.
24  Java Game APIs & Engines / OpenGL Development / Re: [LWJGL3] Experiencing weird crash on glUseProgram when started in fullscreen on: 2015-07-15 11:06:24
I think my shaders are simple, the default shader just outputs the color, and the light shader does the lighting. This is crashing at the binding of the light shader. I've tried replacing my light shader to a simple one that just outputs white color, and the crash still happens.

I noticed one more thing, this is working fine on my desktop (NVIDIA GTX 750 TI) and also on my laptop if I use the NVIDIA gpu. Dunno why it is failing with Intel HD 4000. I have already updated my graphics, but so far no luck. Does anyone has experienced this kind of issue before?
25  Java Game APIs & Engines / OpenGL Development / Re: [LWJGL3] Experiencing weird crash on glUseProgram when started in fullscreen on: 2015-07-15 10:56:47
I have included the full log: just click on the code. Or here is it: http://www.java-gaming.org/?action=pastebin&id=1308
26  Java Game APIs & Engines / OpenGL Development / [LWJGL3] Experiencing weird crash on glUseProgram when started in fullscreen on: 2015-07-15 09:32:44
Today, I have spotted a weird crash on glUseProgram if I started my game in fullscreen. I'm using the latest nightly (#1 of 3.0.0b). Here is the crash that I have recieved.


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007ffd8ae7f8b1, pid=1396, tid=5532
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b15) (build 1.8.0_45-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [ig7icd64.dll+0x9f8b1]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# E:\GitHub\SilenceEngine\hs_err_pid1396.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
AL lib: (EE) alc_cleanup: 1 device not closed

This is strange for me, as this is not the case when I run in windowed mode, or switch the window to a fullscreen window after starting the game. But this occurs if I start directly in the fullscreen mode. Can anyone say what is happening in my case?
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-14 05:54:15
Implemented a text listener interface into SilenceEngine, and tried to write a small notepad like app with it.

Click to Play
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-13 13:52:43
EDIT: God damn it, SHC!

I can't appreciate again!!  Grin Tongue
29  Game Development / Newbie & Debugging Questions / Re: Issues with 3D scene layout and plane positioning using libgdx on: 2015-07-13 13:51:09
Why not recreate the projection matrix on a resize event?
30  Game Development / Game Mechanics / Re: 2D top down racing, car off the track? on: 2015-07-07 14:36:20
Check the position of the sprite with the track area. Suppose you have a track that starts at 100 units and ends at 600 units (units are anything, they may be pixels or any other unit you chose).

1  
2  
3  
4  
if (position.x < 100 || position.x + sprite.width > 600)
    // Out of track, apply some deceleration
else
    // Inside the track, apply acceleration

And this should do what you want to do.
Pages: [1] 2 3 ... 51
 
afikri (11 views)
2015-08-31 09:30:22

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

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

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

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

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

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

GamerC4 (29 views)
2015-08-22 20:37:01

Kefwar (35 views)
2015-08-22 18:07:24

GamerC4 (26 views)
2015-08-22 01:00:24
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!