2D lighting system in motion
I added a funky algorithm to draw soft shadows without blurring everything, colored lights and a few other things.
Watch it in HD!
Watch it in HD!
I added a funky algorithm to draw soft shadows without blurring everything, colored lights and a few other things.
Watch it in HD!
Watch it in HD!
Light (and darkness) will be an important part of Cavery. I want the player to feel small and vulnerable; most of the screen will be covered in black. That's why I'm working on a 2D lighting system. It's based mostly on shaders at the moment. All rendering is made by libgdx, of course!
That's the visible geometry (not covered by shadows):
I forgot to post it here, but it's official: I'm working on a new game! Some random keywords: cave exploration, darkness, vulnerability, suspense, equipment, discovering the unknown. I'll call it Cavery for now. Keep an eye for updates!
It's a game created by me for the Android platform. It's been on the Market for a while (as a paid app), but it is now available for free!
Download and play!
And the QR code:
What's libgdx? It's a game/application development framework in Java. It allows you to write an app, and then run it on Android, on desktop and in the browser. Awesome! If you want to know more, read what its creators say about it.
In this tutorial I'll show you how to run a game written with libgdx in your browser (as a Java applet). So why Minecraft, you might ask - well, Minecraft runs as an applet! (and it's written with Lwjgl - more on that later) And talking about Minecraft is so snazzy these times, you know.
I'm going to use libgdx's "Hello world" as an example "game". I won't cover setting up the project here, Mario (father of libgdx) did it already here.
You should start with something like that:
HelloWorldDesktop.java
file and make it look like that:
1 2 3 4 5 6 7 8 910 |
|
HelloWorldApplet.java
(in the same directory as other source files). It's similar to what we had before:
1 2 3 4 5 6 7 8 910111213 |
|
applet
in your project dir. It will contain all files needed to run your game through a browser. Put the following files in there:
gdx.jar
gdx-backend-lwjgl.jar
gdx-backend-lwjgl-natives.jar
gdx-natives.jar
lwjgl_util_applet.jar
- this is the actual applet launcher. The Lwjgl guys made a sophisticated tool for that. It is configurable via an html file, which we will add in a moment. Get this launcher by downloading the latest Lwjgl distribution. It's 2.7.1 as I write it. Copy lwjgl-2.7.1/jar/lwjgl_util_applet.jar
to your applet
dir.
helloworld.jar
- this is your game. Just export the whole project as jar in Eclipse:
You can click "Finish" in this window.
index.html
- this is the actual page that your browser will open. You should set some options for lwjgl_util_applet.jar
here. I'm using these:
1 2 3 4 5 6 7 8 910111213141516171819202122232425262728293031323334353637 |
|
index.html
with your browser and... it won't work. Why?
applet
dir. It can be done by standard JDK tools (they may be not in your path though). First, create a keystore with one key. Run the following command in the applet
dir:
1 |
|
.keystore
file, which will contain a single key named "gdxkey". I recommend setting the keystore password the same as your key password ("gdxpassword" in this case).
sign-applets.bat
in the applet
dir):
1234 |
|
index.html
again. Answer some security question and enjoy libgdx in your browser!.keystore
and sign-applets.bat
(so basically all jars and index.html
) to some web server and give me the link! :)
Here it is: Pixel Slaughter! My new, stupid game about shooting things. (one level, one weapon, no bonuses yet)
I'm working on a new game. I'd like to have an old-skool look, so I'm trying to do some pixel art now. That's the outcome:
I'll try to keep you posted about that game. Soon.
Here's a list of 10 games that I liked the most in 2010.
10. Dear Agent (free, Windows)