Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (525)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (594)
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 ... 40
1  Java Game APIs & Engines / Engines, Libraries and Tools / Re: LWJGL 3.0 on: 2014-11-27 17:20:21
I even started my game engine (SilenceEngine) using LWJGL 3, and also, that was really amazing.
2  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-27 14:59:44
Update: SilenceEngine now uses Gradle build system.
3  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-27 09:23:44
Update: Added Cameras! I've written two Camera classes
OrthoCam
and
PerspCam
for orthographic and perspective cameras. Both the cameras are very basic in behaviour, though. The
OrthoCam
should be used to render 2D stuff, and can be used to render HUDs in the games.

The
PerspCam
provides you a method called
setPositionAndLookAt(Vector3, Vector3)
which can be used to position the Camera anywhere on the scene, and make it look at a point. This is particularly useful in FPS style games, you position the camera behind the player, and make it look at the player, making it simple and easy.

Here's how to use the Cameras, you have to pass the camera to the batcher in the begin method. You can also pass in a transform along with the camera, and also, it is possible to set the camera by using the
applyCamera(ICamera)
method of the batcher. Here's the screenshot of the CameraTest.



The triangle in the top-left corner is rendered using
OrthoCam
while the one in the center is rendered using
PerspCam
and a rotating Transform. I think I should document the classes now..
4  Discussions / Miscellaneous Topics / Re: I don't have the lollipop update yet? on: 2014-11-27 06:40:50
I've Moto G first generation (XT1033) and my friend has second generation. He got Lollipop yesterday, but I'm still waiting for it. Motorola is slowly updating it's apps with material design, so I think it's the same with Google. It may take another week or so in my opinion.
5  Discussions / General Discussions / Re: Programmer jokes on: 2014-11-27 05:02:07
I belong to the third type, programmers who hate multi line comments.

1  
2  
3  
4  
5  
6  
7  
if (condition)
{
    statements;
    //
    // ...
    //
}
6  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-26 03:38:08
Batcher is the place where all the rendering takes place in SilenceEngine. It has a Transform object whose matrix is passed to the shaders internally. Everytime you apply a transform, the internal transformation matrix will get multiplied, allowing the changes for that frame. That's how it works.

And on the end of every frame, the internal transform will be reset, to an identity matrix. Also whenever you apply a transform, the previous contents gets flushed before transformation, meaning that the transform will apply to the vertices that were batched after the application. If you want to change the transform, you have to end the batch, and re-start batching with the new transform.

The transform and batcher classes are located in the
com.shc.silenceengine.graphics
package, take a look at them to get an understanding.
7  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-25 17:05:14
Now added Transformations!! All you have to do is to create an instance of
Transform
class and apply that to the batcher. Here's a crappy gif that I've recorded (747 KB)

Click to Play


All you have to do is manipulate the Transform object and before rendering, apply to the batcher with
batcher.applyTransform(transform)
and the changes apply instantly. More coming soon, I'm already working on the Camera, so stay tuned!!
8  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-25 12:54:00
Okay, added an option to disable NativesLoader. To do that, run the program with
-DNativesLoader=false
but note that doing so, you need to manage natives yourself. The default value for that property is true.
9  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3; how's it getting along? on: 2014-11-25 12:08:04
I'm not using any Swing/AWT features in my engine. My OS X version is 10.10.1 (Latest Yosemite). I tried adding
-Dorg.lwjgl.util.Debug=true
, but got no output.
10  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3; how's it getting along? on: 2014-11-25 12:02:27
Using that bought me this stack trace. http://pastebin.java-gaming.org/bc5f303461715

This time, it was not occasional, but it occurred every time, I ran it 10 times, and the same thing is happening. Without the option, it works now, dunno when next crash would occur.
11  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3; how's it getting along? on: 2014-11-25 11:55:16
I'm getting a bug occasionally when I call
glfwCreateWindow()
with nightly #20. Here's the stackstrace. http://pastebin.java-gaming.org/2bc5f93331617

It only occurs occasionally, not always, and I'm not sure of the reason. That is the first function I call in my engine, even before the game loop starts.
12  Discussions / Miscellaneous Topics / Re: C#, did Microsoft just want to be different? on: 2014-11-25 10:16:24
One major difference, is that it is possible to assign to
this
in C# structures. An example that uses that feature is OpenTK's Math structures, Matrix3 struct does this, for example.

1  
2  
3  
4  
5  
6  
7  
8  
9  
public void Transpose()
{
    this = Matrix3.Transpose(this);
}

public static Matrix3 Transpose(Matrix3 mat)
{
    return new Matrix3(mat.Column0, mat.Column1, mat.Column2);
}

So simple, isn't it? Yeah it confused me a lot at first, but it is possible (not in Java!!) only in structs.
13  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-25 06:06:52
Think I should share some code on using Batcher. You create the batcher just like any normal java object.

1  
batcher = new Batcher();

And then, use it to add vertices (triangle and other shape functions coming soon).

1  
2  
3  
4  
5  
6  
7  
batcher.begin();
{
    batcher.addVertex(new Vector2(+0.0f, +0.5f), Color.CORN_FLOWER_BLUE);
    batcher.addVertex(new Vector2(-0.5f, -0.5f), Color.INDIAN_RED);
    batcher.addVertex(new Vector2(+0.5f, -0.5f), Color.OLIVE_DRAB);
}
batcher.end();

Produces the following on the screen.



Textures are the same, you load a texture in the init method like this.

1  
texture = Texture.fromResource("com/shc/silenceengine/res/logo.png");

And you specify the texture coordinates along with the vertex position instead of the color.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
texture.bind();

batcher.begin();
{
    batcher.addVertex(new Vector2(-0.5f, +0.5f), new Vector2(0, 0));
    batcher.addVertex(new Vector2(+0.5f, +0.5f), new Vector2(1, 0));
    batcher.addVertex(new Vector2(+0.5f, -0.5f), new Vector2(1, 1));

    batcher.addVertex(new Vector2(-0.5f, +0.5f), new Vector2(0, 0));
    batcher.addVertex(new Vector2(-0.5f, -0.5f), new Vector2(0, 1));
    batcher.addVertex(new Vector2(+0.5f, -0.5f), new Vector2(1, 1));
}
batcher.end();

It produces the logo in the screen like this.



It is also possible to add a tint to the texture. To do that, specify the tint color along with the vertex and texture coordinate.

1  
2  
3  
4  
5  
6  
7  
batcher.addVertex(new Vector2(-0.5f, +0.5f), Color.GOLDEN_ROD, new Vector2(0, 0));
batcher.addVertex(new Vector2(+0.5f, +0.5f), Color.GOLDEN_ROD, new Vector2(1, 0));
batcher.addVertex(new Vector2(+0.5f, -0.5f), Color.GOLDEN_ROD, new Vector2(1, 1));

batcher.addVertex(new Vector2(-0.5f, +0.5f), Color.GOLDEN_ROD, new Vector2(0, 0));
batcher.addVertex(new Vector2(-0.5f, -0.5f), Color.GOLDEN_ROD, new Vector2(0, 1));
batcher.addVertex(new Vector2(+0.5f, -0.5f), Color.GOLDEN_ROD, new Vector2(1, 1));

And the output will be like this.



This is the Batcher class, stay tuned for more updates!
14  Discussions / Miscellaneous Topics / Re: C#, did Microsoft just want to be different? on: 2014-11-25 05:09:56
Why nobody mentioned events and beautiful delegates?  Huh
15  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-25 03:31:49
I think that this implementation with no cache can be harmful in some particular cases.

Can you please explain those particular cases? I'm sure I didn't get what you mean.

Can you elaborate reasons behind making yet another "engine". What are motivates. Why this is better than others or is it(in the future)? What is the future goals? Is this just for learning? Do you have game what drives the development?

The main reason in making this "yet another engine" is that I can use it for my next personal projects, I just thought it would be cool to show you guys. Currently I cannot say why this is better, because it lacks a lot of features a engine would have, but I have plans to implement them soon. My current priority is fixing Mouse input. Future plans include writing classes for Meshes, and also some basic entity classes with collisions. I want to wrap all this into a Scene Graph.

As per the game, I'm having two games, one a 2D platformer and the other is a 3D FPS. They are too basic atm, and require more work on the engine. I'll show them to you once they get to a playable state.
16  Games Center / WIP games, tools & toy projects / Re: Army Men - a 3do fangame! on: 2014-11-25 03:16:34
May I ask what your specs are?


Intel Core 2 Duo ES300 @ 2.60 GHz
ASUS P5KPL-AM/PS Motherboard
4 GB DDR2 Dual Channel RAM
NVIDIA GeForce 210 1GB Graphics Card


My OpenGL version info:


Renderer: NVIDIA GeForce 210 OpenGL Engine

Vendor: NVIDIA Corporation

Memory: 1024 MB

Version: 3.3 NVIDIA-10.0.19 310.90.10.05b12

Device: iMac14,2

Shading language version: 3.30



Max texture size: 8192 x 8192

Max vertex texture image units: 16

Max texture image units: 16

Max geometry texture units: 16

Max anisotropic filtering value: 16

Max viewport size: 8192 x 8192

Max Clip Distances: 8

Max samples: 8



17  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-24 17:07:13
Reason behind the name?

I wanted the engine to hide all the OpenGL calls from the user, and carry them silently under the hood. Hence the name SilenceEngine, the engine that silences OpenGL calls for you.
18  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-24 16:14:11
Your native loader uses no cache. The libraries are deleted on exit. As a consequence, each time you run an application based on your engine, you have to extract the libraries. It increases a bit the startup time. Maybe you should add a flag to enable/disable this feature.

I don't think that it has much overhead, that's what most desktop games released with OneJAR or JarSplice do, they extract the natives on runtime and delete the natives afterwards. And moreover, that would simplify project setup, You just add the natives jar to the class-path just like you would do with other library jar, helping the user. I don't think enable/disable flag is not useful.
19  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3; how's it getting along? on: 2014-11-24 15:53:34
So for a project that is starting now, is using lwjgl 3 a good idea? Or is using 2.x and porting later the recommended route.

There are a lot of differences in the windowing API, that would take a lot of time to port old projects. I recommend using the nightlies and update with every nightly to test if yours work with the nightly.
20  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-24 15:26:55
I decided to go with MIT licence guys, added the LICENCE file to the repository.

You should separate the program and the shaders. I'm still reading your source code.

It is possible to write your own shaders. Just create a Shader object with your sources and use it. The shader that is by default, is a simple pass-away shader that doesn't do anything other than just passing the values as they are.

I've looked at the native loader. Do you plan to support ARM? I remind you that some laptops use ARM CPUs.

I don't get what you mean, it supports every platform that LWJGL3 has natives for, my NativesLoader just extracts them to a temp directory, and assigns the org.lwjgl.librarypath variable so that natives can be found.
21  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-24 14:54:18
@SHC Your math classes are quite poor for the moment and you mainly just wrap GLFW and its "friend". Is it reasonable to set MAX_VERTICES_IN_BATCH once for all?

Yep, I agree that they are really poor, atm, mainly since the age of this is just two days. As per the MAX_VERTICES_IN_BATCH, I heard that some cards have limits on the size of the VBO datastore, and that too, the least thing is they only allow 4MB of data. So I set the max vertices to 4096, so 4096 * 4 * 4, i.e., 4096 vertices with 4 components each of 4 bytes would be sufficient in that memory. Should I increase that limit?
22  Games Center / WIP games, tools & toy projects / Re: SilenceEngine - A 2D/3D Game Engine on: 2014-11-24 14:49:35
It maybe currently a framework, but I also have plans to add scenegraph, level loaders (tmx) and also simple world physics, which would make it an engine. At this point, nobody may care, but I thought to post here, to know the feedback (constructive of course), so that I can improve it a lot.

And guys, please don't compare mine with LibGDX, that would be comparing an ant with an elephant, I just wanted to document the progress, and also notify you at the same time, so I made a post here.

I don't believe that having no licence means it's not opensource, I meant by opensource, the source code is open to all, and I put no restrictions on how you guys use the code, I don't want to do so, hence I selected no licence. However, if you do insist that software should have a licence, please suggest me one, that would allow the user to do anything he wants with the engine.
23  Games Center / WIP games, tools & toy projects / SilenceEngine - A 2D/3D Game Engine on: 2014-11-24 14:03:54

Hello everyone, this is my second attempt at making a game engine, and here it is, SilenceEngine. This is a 2D/3D GameEngine, which means it aims to help you in creating either 2D or 3D game. This is currently under heavy development (I'm coding 8 hours a day since last two days) and I plan on adding a lot of features to it.

About the Project


The AIM of this Project is to silence (hide) the underlying OpenGL calls, leaving you with only the features that are required to make your game, hence the name SilenceEngine. This is the first game engine to use LWJGL3, and also, more importantly, this engine uses OpenGL 3.3 core profile, everything is modern. I aim to keep the API really simple, and at the same time, flexible.

Features


I'm writing this post very early, so it has very few amount of features right now, but I'll add more to this list of features gradually. Currently, this is the list of features that this engine offers you.

Complete implementation of Display


  • The Display is completely implemented, and it's creation is automatically taken care of, for you. You can switch between windowed and fullscreen modes, move and resize it, change the title, set the viewport, change the clear color, show or hide windows, with just one call to the methods in the Display class. Even the keyboard input is fully functional, so you can jump right in.

A Batcher to Stream


  • The Batcher class helps you in managing the VAOs, VBOs, Textures, and also Shaders for you, meaning that you can concentrate on the GamePlay and logic. There is no need to struggle with the VAOs, VBOs, Buffers, they are automatically taken care for you.

Natives Management


  • People usually find problems in attaching natives. So I wrote the
    NativesLoader
    class (package-private because you won't have to use it) which extracts the natives from the JAR itself. This makes attaching natives very easy, just add
    lwjgl-natives.jar
    to the classpath, and you are done.

Source Code


This is completely OpenSource, and is licenced under MIT licence. http://choosealicense.com/licenses/mit/



That's all I can say right now, stay tuned folks!
24  Games Center / WIP games, tools & toy projects / Re: Kinetic on: 2014-11-24 05:58:10
Use the user folder to store the data. Nice funny little game though.
25  Game Development / Newbie & Debugging Questions / Re: [lwjgl] Cannot enable <cap> in the current profile. on: 2014-11-24 05:33:07
You can only enable/disable certain flags in Core profile, like, for example, GL_BLEND is perfectly valid there, but GL_TEXTURE_2D is not, that is deprecated. What flags are you using?
26  Game Development / Newbie & Debugging Questions / Re: [lwjgl] Cannot enable <cap> in the current profile. on: 2014-11-24 05:27:07
I suspect that your old code is using
glEnable
function. That function is deprecated in core profile.
27  Game Development / Newbie & Debugging Questions / Re: [lwjgl] Cannot enable <cap> in the current profile. on: 2014-11-24 05:22:05
Are you using Core profile?
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-11-24 05:16:30
@Jacob Pickens

Thanks for your reply, chosen the same, and also added it to the GitHub repository of SilenceEngine
29  Discussions / General Discussions / Re: Graphics cards and Macs on: 2014-11-23 16:27:54
The problem is that you are using passing in vertex shader code as the fragment shader code. That's the problem.
30  Discussions / General Discussions / Re: Graphics cards and Macs on: 2014-11-23 16:24:35
Mac OS only returns a 3+ context if you explicitly request it for one. If you have LWJGL 2.9.1, then use this to create the Display.

1  
2  
3  
4  
5  
PixelFormat pFormat = new PixelFormat();
ContextAttribs cAttribs = new ContextAttribs(3, 2).withProfileCore(true)
                                                  .withForwardCompatibile(true);

Display.create(pFormat, cAttribs);

If using LWJGL 3 with GLFW, then these window hints will get you a Core Context.

1  
2  
3  
4  
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);

Another thing, even if you want OpenGL 4.1 or something, you must use 3.2 as the major and minor version numbers in Mac OS. This is because of the implementation details of the default OpenGL drivers. Since yours is a modern (only a year old, guessing the card as Intel HD 4000), you can get a context of OpenGL 4.1 by requesting 3.2 core context.

(Edit: Oh, you were following my series! Thanks!)
Pages: [1] 2 3 ... 40
 

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

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (68 views)
2014-11-26 15:22:04

toopeicgaming1999 (58 views)
2014-11-26 15:20:36

toopeicgaming1999 (13 views)
2014-11-26 15:20:08

SHC (26 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (30 views)
2014-11-25 11:26:43

Gibbo3771 (24 views)
2014-11-24 19:59:16

trollwarrior1 (37 views)
2014-11-22 12:13:56

xFryIx (76 views)
2014-11-13 12:34:49

digdugdiggy (53 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!