Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (769)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  ScorpionHunter - A SilenceEngine Demo game  (Read 11276 times)
0 Members and 1 Guest are viewing this topic.
Offline SHC
« Posted 2014-12-31 14:53:56 »

Hello everyone,

It's been a long time since I started SilenceEngine (one month actually), but I'm now very happy to show you the first demo made using SilenceEngine. It is now feature complete for 2D, it has got automatic collision detection, sound, truetype fonts, etc., all the things I have planned for 2D are now complete, and here is the demo game I made.



This game is a top-down shooter where you are a shooter (obviously!) and you have to shoot Scorpions for the sake of protecting your friends whom you have never seen! Just kidding, there is really no story here, it's just a game, I made it to test the abilities of SilenceEngine. Here are some more screenshots about the game.





As per the other details, this game will be used as a demo, and also as a tutorial for my engine, the source code is on GitHub here. In this game, I show the following features of the SilenceEngine.

  • Collision Detection through Scene Colliders
  • Camera and the movement
  • Scene Management
  • Resource managing
  • Infinite Scrolling Map

Though I said those in the above feature list, actually, all the above things will be managed by SilenceEngine for you. Though I said it will be a demo game, I won't stop with this here, I will continue to work on it, I still have to add some story screens and some powerups, etc., hence I am posting this in the WIP section.

You can download the game here, and you can see the source code in my GitHub repository here..

By the way, Happy New Year everyone!!

Offline Elsealabs
« Reply #1 - Posted 2014-12-31 15:38:46 »

The demo did not run on my computer.


Offline SHC
« Reply #2 - Posted 2014-12-31 15:41:52 »

That's a new bug! What card are you using? I think it is because I used the same name for input texcoords in vertex shader and for sampler2D in fragment shader, but clearly, it is not uniform in both shaders.

I'll try to get a new build, thanks for spotting it.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Elsealabs
« Reply #3 - Posted 2014-12-31 15:45:05 »

Microsoft Surface with an Intel i5-3317U 1.7GHz and integrated Intel HD 4000 Graphics. I'll try to test it on my desktop with an NVidia card when I get home.

Offline SHC
« Reply #4 - Posted 2014-12-31 16:08:36 »

@Elsealabs

Please retry again, I have updated the download link. http://goharsha.com/downloads/tafsj/ScorpionHunter.jar

Offline Gibbo3771

JGO Kernel


Medals: 128
Projects: 5
Exp: 1 year


Currently inactive on forums :(


« Reply #5 - Posted 2014-12-31 16:09:16 »

Is this using Java 8?

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline SHC
« Reply #6 - Posted 2014-12-31 16:10:23 »

Is this using Java 8?

Yes, I have been using Method References and Lambdas in writing GLFW callbacks.

Offline Gibbo3771

JGO Kernel


Medals: 128
Projects: 5
Exp: 1 year


Currently inactive on forums :(


« Reply #7 - Posted 2014-12-31 16:12:27 »

Is this using Java 8?

Yes, I have been using Method References and Lambdas in writing GLFW callbacks.

Explains this :p



I hope you are not aiming for android support in the future lol.

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 486
Exp: 7 years



« Reply #8 - Posted 2014-12-31 16:15:59 »

Run java -version and see what it says. You may not be using the JRE you think you are.
Offline Gibbo3771

JGO Kernel


Medals: 128
Projects: 5
Exp: 1 year


Currently inactive on forums :(


« Reply #9 - Posted 2014-12-31 16:56:49 »

Run java -version and see what it says. You may not be using the JRE you think you are.

I only have Java 7 installed, revision 55.

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 486
Exp: 7 years



« Reply #10 - Posted 2014-12-31 17:01:46 »

Well there you go.

Unfortunately I don't think Java 8 has been around long enough yet to be feasible for libraries.
Offline SHC
« Reply #11 - Posted 2014-12-31 18:27:23 »

Unfortunately I don't think Java 8 has been around long enough yet to be feasible for libraries.

I don't think I'm going back to Java 7, because some of the SilenceEngine is made with Method references in mind. For example, I use this code for the
GameTimer
instances.

1  
2  
3  
4  
5  
6  
7  
8  
private void timerTick()
{
    // Do something here
}

GameTimer timer = new GameTimer(10, TimeUtils.Unit.SECONDS);
timer.setCallback(this::timerTick);
timer.start();

Although it is possible to convert this back into anonymous classes, in my opinion, method references make it a lot easier, and it also looks clean and neat. And yes, I'm not having any plans for porting to Android anytime soon, this is not even complete, and is not usable for production quality games, maybe I will think about that when Java 8 becomes the standard.

Offline Mr.CodeIt

Senior Devvie


Medals: 2
Projects: 1



« Reply #12 - Posted 2014-12-31 18:57:16 »

Nice demo. It was pretty smooth but felt a slow. The rotation was a bit too slow for my taste and I thought the scorpions should spawn a little more progressively. Also, when you shoot, I notice a small red line behind the gun.

PS: what is that on the player's head?
Offline SHC
« Reply #13 - Posted 2015-01-02 08:47:02 »

Nice demo. It was pretty smooth but felt a slow. The rotation was a bit too slow for my taste and I thought the scorpions should spawn a little more progressively.

The game speeds up slowly, in the starting, scorpions are spawned every 10 seconds, but slowly, the spawn time decreases to a maximum of 2 seconds, one spawn every two seconds.

when you shoot, I notice a small red line behind the gun.

I never created spritesheets before, it was an error in the spritesheet, the blood cell moved a pixel upwards in the sheet. I'll fix that soon.

PS: what is that on the player's head?

Since I'm not a very good artist, I modeled these sprites in Blender. The spot on the player head was the light in the Blender scene. If I took out the light, then blender was rendering complete black, so I kept it there.

Offline Longarmx
« Reply #14 - Posted 2015-01-03 00:33:14 »

Since I'm not a very good artist, I modeled these sprites in Blender. The spot on the player head was the light in the Blender scene. If I took out the light, then blender was rendering complete black, so I kept it there.

You can turn down specular in the materials tab if you're using Blender Render

Offline SHC
« Reply #15 - Posted 2015-01-19 13:52:32 »

I have updated the game with a lot of changes, mainly the update to the SilenceEngine to version 0.0.2 using LWJGL Nightly #37. Here is a list of changes.

  • Fixing the collision detection, the bounding boxes are made tighter.
  • Moved the entire mess of code into game states. This is a new feature in the Engine itself.
  • Fully commented the source code. Now the comments take up 26% of the entire source code.

According to the Statistics plugin of IDEA, the game is done in only 548 lines of code, ignoring the comments and blank lines. I'm pretty much sure that the engine is now usable for any type of 2D game. My next game, a platformer is also coming nice, will post it here in a few days.

Here is the updated link to download: http://goharsha.com/downloads/tafsj/ScorpionHunter.jar (4.73 MB, Java 8 required)

Any ideas to improve this game are welcome Wink

Offline TheBoneJarmer

Junior Devvie


Medals: 6
Exp: 1-3 months


hi!


« Reply #16 - Posted 2015-02-01 08:21:06 »

Hey SHC!

I've downloaded your game but it wont start. This is my output:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
[INFO 02/01/2015 9:11:36 AM] Initializing SilenceEngine version 0.0.2
[INFO 02/01/2015 9:11:37 AM] Starting to load natives
[INFO 02/01/2015 9:11:37 AM] Natives loaded successfully
[INFO 02/01/2015 9:11:37 AM] Initializing Display
com.shc.silenceengine.core.SilenceException: com.shc.silenceengine.core.SilenceException: 65544: GLX: Failed to create context: GLXBadFBConfig
   at com.shc.silenceengine.core.Display.lambda$create$3(Display.java:211)
   at com.shc.silenceengine.core.Display$$Lambda$1/189568618.invoke(Unknown Source)
   at org.lwjgl.glfw.GLFW$1.invoke(GLFW.java:2661)
   at org.lwjgl.glfw.GLFWErrorCallback.callback(GLFWErrorCallback.java:42)
   at org.lwjgl.glfw.GLFW.nglfwCreateWindow(Native Method)
   at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1004)
   at com.shc.silenceengine.core.Display.createWindow(Display.java:128)
   at com.shc.silenceengine.core.Display.create(Display.java:219)
   at com.shc.silenceengine.core.Game.start(Game.java:171)
   at com.shc.scorpionhunter.ScorpionHunter.main(ScorpionHunter.java:178)

   at com.shc.silenceengine.core.Game$1.uncaughtException(Game.java:73)
   at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1057)
   at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1052)
   at java.lang.Thread.dispatchUncaughtException(Thread.java:1952)


I'm running Ubuntu 14.04 LTS. I have a Intel Mobile 4 Chipset graphics card, 3GB ram and I'm using the JDK 8 x64.
Offline SHC
« Reply #17 - Posted 2015-02-01 08:27:26 »

@TheBoneJarmer

It doesn't seem that OpenGL 3.3 is available on your system. The stackstrace says that the exception is caused from internal to GLFW.

Offline TheBoneJarmer

Junior Devvie


Medals: 6
Exp: 1-3 months


hi!


« Reply #18 - Posted 2015-02-01 08:57:47 »

Yes that is true. My graphics card supports OpenGL 2.1. But GLFW works fine in my engine. So it cannot be the source of the problem. Which means it has to do with the GL33 methods in your code. I do not know which one they are but are they ommittable?
Offline SHC
« Reply #19 - Posted 2015-02-01 09:15:33 »

@TheBoneJarmer

GLFW is actually the Windowing and Context management library. Unfortunately, I use a lot of GL33 calls in my game engine, and it is one of the features of SilenceEngine. I'm sorry, I don't plan to support old hardware.

Pages: [1]
  ignore  |  Print  
 
 

 
EgonOlsen (1675 views)
2018-06-10 19:43:48

EgonOlsen (1723 views)
2018-06-10 19:43:44

EgonOlsen (1161 views)
2018-06-10 19:43:20

DesertCoockie (1588 views)
2018-05-13 18:23:11

nelsongames (1189 views)
2018-04-24 18:15:36

nelsongames (1717 views)
2018-04-24 18:14:32

ivj94 (2542 views)
2018-03-24 14:47:39

ivj94 (1767 views)
2018-03-24 14:46:31

ivj94 (2848 views)
2018-03-24 14:43:53

Solater (973 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!