Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (731)
Games in Android Showcase (218)
games submitted by our members
Games in WIP (800)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3
  ignore  |  Print  
  SilenceEngine - A 2D/3D Game Engine  (Read 25285 times)
0 Members and 1 Guest are viewing this topic.
Offline SHC
« Posted 2014-11-24 14:03:54 »


A 2D/3D Game Engine written on top of LWJGL3

What is SilenceEngine?


SilenceEngine is a 2D/3D game engine that takes care of low level aspects of game development like graphics, input handling, asset loading and collision detection for you, meaning you only need to make your game. It lets you focus on the game play and game design, by doing most of the hard work for you.

Features


The main feature of SilenceEngine is it's simplicity, and it greatly reduces the amount of code you need to write by taking care of almost everything automatically for you. Though it is meant to take care of everything automatically, it is also completely customizable. Here are a list of features of it.

  • State Based Games:

    SilenceEngine supports separating the game logic into different states, like intro state, story state, play state, high score state, game over state, and any other state that you are going to create. This allows you to keep stuff separate and your code base clean and easy to read.

  • Module Based Engine:

    SilenceEngine is based on different modules, it is a collection of modules called as engines. There are core engine, audio engine, graphics engine, input engine, and collision engine, and all these engines make up the SilenceEngine. It is up to you on how you use it, you can use all these as a whole, or you could use each of them separately. Either way, they work.

  • Completely Customizable:

    SilenceEngine is designed to be completely customizable. You can change everything from the ResourceLoader to the Game Loop, and you can also change the entity parameters. It is totally flexible and also easy to use. It is finally up to you whether you want to extend the components, or to re-implement them in your way.

  • Automatic Collision Detection:

    SilenceEngine features with automatic collision detection. All you need to do is give your entities a collision shape, and register the classes in the collider, and the collisions, along with collision response is done for you, in both 2D and 3D. The CollisionEngine uses SAT (Separating Axis Theorem) to determine collisions, and hence you get your collision response with good accuracy.

  • Object Oriented Wrappers for OpenGL and OpenAL:

    If you think that all the above features are not useful for you, and you want more performance and you love going low level, SilenceEngine provides object oriented wrapper classes for OpenGL and OpenAL. It is up to you how to use them, and other parts of the SilenceEngine cooperates with you.

The above list is only half what SilenceEngine offers to you. It is currently in heavy development, and more features are yet to arrive. In the meanwhile, take a look at the source code, and the example games to get an idea of how to use this engine.

Is it only for games?


Perhaps not, you can create any form of OpenGL application using SilenceEngine. It provides you with OpenGL classes in the com.shc.silenceengine.graphics.opengl package, which cleanly wraps the OpenGL functions into Java classes, making them more easy to use. All you have to take care of is that you must call the dispose() on those objects when you no longer need them.

It is also easier to use in development mode as we will check for OpenGL errors after every call to the OpenGL functions and report you the errors, if any exist, in the form of GLException allowing you to get rid of the errors quickly and easily. By the way, everything in SilenceEngine is modern, and there is no deprecated stuff. I'm proud to say that this engine only uses OpenGL 3.3 (no deprecated OpenGL).

Licence


  • This is licenced under MIT licence, which you can find here.
  • This game engine uses JOrbis library from JCraft which are licenced under LGPL.
  • This game engine uses J-Ogg library from j-ogg.de on a free permissive licence.
  • This game engine is written on top of LWJGL 3. You can find it's licence here.

Links



Offline gzuzboey
« Reply #1 - Posted 2014-11-24 14:30:02 »

Is it really a game engine or a game library/framework?

YA BOI
Offline kevglass

« JGO Spiffy Duke »


Medals: 319
Projects: 25
Exp: 22 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #2 - Posted 2014-11-24 14:31:14 »

More importantly at this point, does anyone care?

Cheers,

Kev

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #3 - Posted 2014-11-24 14:33:22 »

Hi

If there is no license, it doesn't mean that it's open source, it's under copyright by default. Please choose a license:
http://choosealicense.com/

Please mention the license of the third party libraries you use too (I already do so).

I've looked at the native loader. Do you plan to support ARM? I remind you that some laptops use ARM CPUs. There is probably a better way of writing FileUtils.readLinesToStringArray by using NIO2.

Is there a demo of your engine? What does it bring compared to LibGDX?

Julien Gouesse | Personal blog | Website | Jogamp
Offline gzuzboey
« Reply #4 - Posted 2014-11-24 14:33:59 »

Game Engines: Unity, Udk, Cryengine, Jmonkeyengine, etc
Librarys/Frameworks: Libgdx, Slick2d, etc

Btw, I really like the logo Grin

YA BOI
Offline gzuzboey
« Reply #5 - Posted 2014-11-24 14:37:19 »

More importantly at this point, does anyone care?

Cheers,

Kev

Its quite a big difference Tongue

YA BOI
Offline gouessej
« Reply #6 - Posted 2014-11-24 14:37:33 »

Game Engines: Unity, Udk, Cryengine, Jmonkeyengine, etc
Librarys/Frameworks: Libgdx, Lwjgl, etc
LibGDX uses several sets of low level bindings, it shouldn't be put into the same category than the APIs on which it relies for its hardware accelerated graphics and JMonkeyEngine is rather a 3D engine than a game engine.

@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?

Julien Gouesse | Personal blog | Website | Jogamp
Offline gzuzboey
« Reply #7 - Posted 2014-11-24 14:41:33 »

Quote
LibGDX uses several sets of low level bindings, it shouldn't be put into the same category than the APIs

Desktop/Android/BlackBerry/iOS/HTML5 Java game development framework

Straight from the libgdx homepage.

YA BOI
Offline kevglass

« JGO Spiffy Duke »


Medals: 319
Projects: 25
Exp: 22 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #8 - Posted 2014-11-24 14:41:46 »

More importantly at this point, does anyone care?

Cheers,

Kev

Its quite a big difference Tongue

Really? Wow! I didn't know that! I meant given how many we've seen recently does it really matter any more?

Cheers,

Kev

Offline gzuzboey
« Reply #9 - Posted 2014-11-24 14:44:35 »

More importantly at this point, does anyone care?

Cheers,

Kev

Its quite a big difference Tongue

Really? Wow! I didn't know that! I meant given how many we've seen recently does it really matter any more?

Cheers,

Kev

No, it really doesn't matter, but it may confuse a few people who expect it to be something like unity.

YA BOI
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gouessej
« Reply #10 - Posted 2014-11-24 14:44:52 »

And what does LibGDX use in desktop environment? The "library" that you just put into the same category:
Librarys/Frameworks: Libgdx, Lwjgl, etc

Julien Gouesse | Personal blog | Website | Jogamp
Offline gzuzboey
« Reply #11 - Posted 2014-11-24 14:47:41 »

And what does LibGDX use in desktop environment? The "library" that you just put into the same category:
Librarys/Frameworks: Libgdx, Lwjgl, etc

Please explain.

YA BOI
Offline gouessej
« Reply #12 - Posted 2014-11-24 14:48:50 »

Please explain.
https://github.com/libgdx/libgdx/tree/master/backends/gdx-backend-lwjgl

Julien Gouesse | Personal blog | Website | Jogamp
Offline SHC
« Reply #13 - Posted 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.

Offline gzuzboey
« Reply #14 - Posted 2014-11-24 14:53:42 »

Quote
but I also have plans to add scenegraph, level loaders (tmx) and also simple world physics, which would make it an engine.

Woo Hoo!!! Grin

YA BOI
Offline SHC
« Reply #15 - Posted 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?

Offline gouessej
« Reply #16 - Posted 2014-11-24 14:55:30 »

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.
I don't want to annoy you but it was mainly a legal reminder and it might refrain some developers to use your stuff. You can choose a permissive license like ASF or BSD 3-Clause if you want as few restrictions as possible or even Public Domain Dedication Creative Commons 0 but not sure it is suitable for the code. Look at Unlicense too.

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

Should I increase that limit?
Yes, it depends on your target. I remember that there are some OpenGL constants that you can use but sometimes they return crazy values.

Julien Gouesse | Personal blog | Website | Jogamp
Offline gzuzboey
« Reply #17 - Posted 2014-11-24 14:57:00 »

Quote
mainly since the age of this is just two days.
So you wrote all that code in 2 days? congrats Wink

YA BOI
Offline SHC
« Reply #18 - Posted 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.

Offline gouessej
« Reply #19 - Posted 2014-11-24 15:51:31 »

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.

It's possible to cross-compile the library that you use but according to its platform-dependent Ant script used to build the native libraries, you're right, it doesn't support ARM  Sad

I've seen that you have added a license into your project  Wink

Julien Gouesse | Personal blog | Website | Jogamp
Offline SHC
« Reply #20 - Posted 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.

Offline Gibbo3771

JGO Kernel


Medals: 128
Projects: 5
Exp: 1 year


Currently inactive on forums :(


« Reply #21 - Posted 2014-11-24 16:58:43 »

Best of luck with the library/engine (you describe it as a hybrid of both imo).

The Vector classes, I think the components would be better public and remove the get/set methods. Every Vector class I have seen does this, it is definitely neater in code for me.

I can't say much else on the batcher and that, as my knowledge with these are well, not great at all :p.

Reason behind the name?


"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline SHC
« Reply #22 - Posted 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.

Offline 65K
« Reply #23 - Posted 2014-11-24 18:04:13 »

Standard advice for every yet-another-home-brewn-game-engine: make a game (game means game not tech demo) in parallel if it shall get any good.
Anyway, have fun Wink

Lethal Running - a RPG about a deadly game show held in a futuristic dysoptian society.
Offline gouessej
« Reply #24 - Posted 2014-11-24 18:05:47 »

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.
I don't claim that this feature is useless but I think that this implementation with no cache can be harmful in some particular cases. Moreover, the JARs containing the native libraries have nothing to do in the classpath but putting them into the same directory than the Java libraries that call them makes sense. JarSplice isn't a good example because it's quite buggy, its source code has never been released and as it seems to be unmaintained, you're lost in the darkness or you have to decompile it to have a chance to fix it. Of course this feature simplifies the setup because you don't have to use any platform-dependent variable or the Java library path to indicate where the native libraries are but it's not suitable in some environments. Some virus scanners become crazy when they see a program extracting native libraries. I think that adding a flag into your engine is a good compromise, it's simple to implement and it allows anybody to handle this aspect by himself if your loader gets in his way.

I agree with 65K, make a game with your engine, at least a small showcase.

Julien Gouesse | Personal blog | Website | Jogamp
Offline pitbuller
« Reply #25 - Posted 2014-11-24 21:49:47 »

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?
Offline SHC
« Reply #26 - Posted 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.

Offline SHC
« Reply #27 - Posted 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!

Offline gouessej
« Reply #28 - Posted 2014-11-25 11:22:01 »

Can you please explain those particular cases? I'm sure I didn't get what you mean.
- you don't have enough rights to create a directory or a file to extract the native libraries
- another library, framework or installer already takes care of extracting and loading the native libraries
- the virus scanner doesn't like your program and blocks or takes a long time to scan the native libraries each time you extract them
- the startup time is considered to be too long

Julien Gouesse | Personal blog | Website | Jogamp
Offline SHC
« Reply #29 - Posted 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.

Pages: [1] 2 3
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 
Archive (347 views)
2017-04-27 17:45:51

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

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

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

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

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

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

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

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

theagentd (781 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
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!