Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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 ... 20
1  Discussions / Miscellaneous Topics / Re: What are Anti-Virus Developers Protecting us From? on: 2014-04-18 17:21:56
Maybe you guys - as developers - should consider checking whether the software you spread around is infected though Wink
2  Games Center / WIP games, tools & toy projects / Re: [libGDX] Embersol Mercenaries - Online Shooter on: 2014-04-18 12:04:08
Ok, I tried it on a different computer and now the video and the login works fine. Perhaps it was just a firewall issue. Unfortunately I'm at a different location right now so I cant look into it further. However, I think it is a problem on my side. I can play it now!

And wow, that's one heck of a game! Very good work, it's an impressive game. The art is good looking and consistent, the menus are clear and accessible, I'm impressed by how smoothly you handle networking stuff, and the action is fun.

Some suggestions:

I found the control scheme somewhat awkward, as I'm more used to:
W = move forward (in the direction of the nose of the ship)
A/D = strafe left/right
S = move backward (or slow down)
However, that's a personal preference.

The (good looking) planets have somewhat jagged edges, so maybe some kind of antialiasing may make them look a bit nice (either in a shader or just by antialiasing the edges in the graphics).

I found the shields a bit weird looking, especially when they turn all-white. Their looks would be improved I think if they would never go fully opaque.

The actual shooting may need some tuning to make it more interesting. Currently there is relatively little to choose for the player, e.g. it seems that missiles are launched with the same button as the gun. I think I'd like it more when missiles are launched seperately, so that making the decision to "launch the missiles!" becomes a bit more meaningful.

But overall good work, keep it up!
3  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Scene2D, utter tedious on: 2014-04-18 11:47:48
Yeah well in the end, Scene2D is a good library, its used by many to good effect, made by volunteers who know what they are doing. Considering that, its just not so nice to use words like "utter tedious", "tedious as hell", "that was horrible", "god annoying", "tedious and ugly library". It would be sad if a post like this would put newbies off using a good library for no good reason.
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Scene2D, utter tedious on: 2014-04-18 10:02:24
I'm still trying to figure out how to end up getting fonts to upscale properly (or generate at a proper resolution so that it shows nicely on the screen).

Thats an issue with font rendering and has nothing to do with Scene2D. Just generate an upscaled version of your font.
5  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Scene2D, utter tedious on: 2014-04-18 10:00:33
Except you are missing the creation and setup of tgr stage, the table, sizing both.

Them setting up the skin so that it has a font and drawables.

Neither of which are present in your code example. I suppose your UI library doesnt magically render itself or create that "list" variable out of thin air?

I felt precisely the same about pretty much any UI library I used and baked my own UI code. But after some time you really need some extra functionality like additional types of widgets, or an easy way to restyle the whole thing. Some time later you end up with an unmanageable inconsistent and buggy mess which eats up half your game development time. Then compare the homebrew solution to something like the Scene2D UI and you get a sensible comparison.
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Scene2D, utter tedious on: 2014-04-17 16:07:28
If you want to make a complex GUI with sliders, editable text areas, checkboxes and other stuff then homebrewing stuff just does not cut it and becomes a big waste of time. In my experience Scene2D UI is quite elegant and requires few lines of code to get going.

Also, I cant really see the complexity in Scene2D ui, it's actually very simple and is just a couple of lines more than you are using. Yeah setting up a skin is some work, but actually a lot easier than in for example TWL IMHO.
7  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Mesh won`t render. on: 2014-04-17 15:55:49
As Rayvolution suggested: try consistently formatting your code. Otherwise people will get confused looking at it. Here, I did it for you this time:

package nl.basvs.launcher.utils;

public class ShapeTerrain {
    private Mesh mesh;
    private Texture texture;
    private ShaderProgram shader;
    PolygonShape poly;
    PolygonRegion po;
    TextureRegion texreg;
    static String vertexShader = "attribute vec4 a_position;    \n"
            + "attribute vec4 a_color;\n"
            + "attribute vec2 a_texCoord0;\n" + "uniform mat4 u_worldView;\n"
            + "varying vec4 v_color;"
            + "varying vec2 v_texCoords;"
            + "void main()                  \n"
            + "{                            \n"
            + "   v_color = vec4(1, 1, 1, 1); \n"
            + "   v_texCoords = a_texCoord0; \n"
            + "   gl_Position =  u_worldView * a_position;  \n"
            + "}                            \n";
    static String fragmentShader = "#ifdef GL_ES\n"
            + "precision mediump float;\n"
            + "#endif\n"
            + "varying vec4 v_color;\n"
            + "varying vec2 v_texCoords;\n"
            + "uniform sampler2D u_texture;\n"
            + "void main()                                  \n"
            + "{                                            \n"
            + "  gl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n"
            + "}";

    protected static ShaderProgram createMeshShader() {
        ShaderProgram.pedantic = false;
        ShaderProgram shader = new ShaderProgram(vertexShader, fragmentShader);
        return shader;

    public ShapeTerrain() {
        mesh = new Mesh(true, 3, 3, new VertexAttribute(Usage.Position, 3, ShaderProgram.POSITION_ATTRIBUTE),
                new VertexAttribute(Usage.Color, 4, ShaderProgram.COLOR_ATTRIBUTE), new VertexAttribute(
                        Usage.TextureCoordinates, 2, ShaderProgram.TEXCOORD_ATTRIBUTE));

        mesh.setVertices(new float[] { -5f, -5f, 0, 0.2f, 0.3f, 0.4f, 1f, 0, 1, 5f, -5f, 0, 0.1f, 0.2f, 0.1f, 1f, 1, 1,
                0, 5f, 0, 0, 0.4f, 0.5f, 0.5f, 1f, 0 });

        mesh.setIndices(new short[] { 0, 1, 2 });

        texture = new Texture(Gdx.files.internal("data/badlogic.png"));

        shader = ImmediateModeRenderer20.createDefaultShader(true, true, 0);

    public void render(SpriteBatch batch, PolygonSpriteBatch poly) {
        mesh.render(shader, GL20.GL_TRIANGLES);

A second thing: it appears like low-level OpenGL may be a bit over your head. I would suggest starting with Java2D, or a framework that does much the work for you like LibGDX.

From your code we cant see whats going on. For that we need at least the camera / projection matrix code and other render code.

Edit: and finally, "Can render the mesh.I have used the tutorial." does not really make sense. Unless you are just poor in English, try to describe things more clearly or you will not get anywhere asking for help.

Good luck!  Grin
8  Games Center / WIP games, tools & toy projects / Re: Moon Pad v0.2 on: 2014-04-17 13:40:50
Nice experiment :-)

-Recognize java language (with colors)

The word you are looking for here is "syntax highlighting".

Maybe make the moonpad find your JDK / JRE automatically (if possible) using environment variables and add a "compile" button?
9  Game Development / Newbie & Debugging Questions / Re: LWJGL - Drawing to a file. on: 2014-04-17 13:37:57
I think that using OpenGL for this would make you run into threading issues when multipl users upload a level simultaneously.

One simple way could be to create a 2-dimensional array based on the level data, convert it to a BufferedImage and then save it to disk with ImageIO.write(...).

edit: maybe instead of a screenshot store a minimap-like-picture?
10  Games Center / WIP games, tools & toy projects / Re: [libGDX] Embersol Mercenaries - Online Shooter on: 2014-04-17 08:39:31
Looks good!

The movies on the website dont play for me (Win 7 laptop, tried FireFox 17 and IE 11). On FireFox the movie appears to play but stays black, on IE it doesnt start at all (no error, just stays at 0:00).

The game (applet) does load smoothly for me however, which is more important Grin Nice interface, pretty good looking. Unfortunately the server seems down, as I get "Disconnected: Server Disconnected".
11  Game Development / Newbie & Debugging Questions / Re: LibGDX and Getting Pixels From Sprite on: 2014-04-16 15:52:57
It's because he wants to do it like notch did it in minicraft. And notch didn't tint the textures in minicraft Wink

In case the OP wants to know how Notch did it, here's the code:

Its in Java2D, and its also 100% officially silly to try to do this in OpenGL and LibGDX. It is extremely slow, error-prone, terribly overcomplicated and pretty much worst practice (unless you enjoy making life difficult for yourself). Much better do someting like:
batch.draw(bodyTexture, ...
batch.draw(pantsTexture, ...

Easy peasy.
12  Game Development / Newbie & Debugging Questions / Re: [Level Editor] A few questions on concepts I'm not sure of. on: 2014-04-16 11:46:52
For point 4 I would probably use a BufferedImage to contain the white canvas, then draw the tiles (also BufferedImages) to that canvas (perhaps do continuously rendering loop or just whenever things change).

For your formula:
y * imageWidth + x = pixel located at (x, y)

Do you really need to use this formula? Sounds like you store things in a 1D-array or something. However, it seems ot me that using a BufferedImage or a 2D array would be much easier.
13  Game Development / Newbie & Debugging Questions / Re: LibGDX and Getting Pixels From Sprite on: 2014-04-16 11:36:47
He doesn't want tinting. He wants to replace certain gray colors with custom colors in code.

Where precisely do you read that he "does not want tinting"? I'm curious.

I dont see how my solution does not give him what he wants. You can flip and scale a tinted texture to your heart's content.
14  Game Development / Newbie & Debugging Questions / Re: Scene 2d - Camera resize Issue on: 2014-04-16 11:34:10
Some suggestions:

You should set the camera's projection matrix at the start of each update. Otherwise changes in the camera wont be reflected in the rendering.

I'm not sure that changing the viewport wirdth and height directly works well as I'm not sure that this will update the projection matrix correctly:
      GameStage.getCamera().viewportWidth =;
      GameStage.getCamera().viewportHeight =;

There's a method that actually updates the matrix:
GameStage.getCamera().setToOrtho(false, width, height);

15  Discussions / General Discussions / Re: What genre/artists do you listen to while coding? on: 2014-04-16 11:24:21

As in, real birds, outside.

Other than that I like silence.
16  Game Development / Newbie & Debugging Questions / Re: [Libgdx] setting the stage Ydown on: 2014-04-16 11:18:28
I suppose that the Stage should also know you are rendering things upside down? If you flip the rendering but not the input coordinates then clicks are registered upside down. You should tell the Stage that you are using Y-down coordinates.

Here's an example that does what you want (I think):
17  Game Development / Newbie & Debugging Questions / Re: LibGDX and Getting Pixels From Sprite on: 2014-04-16 11:12:16
My question is, with LibGDX's given library, is there a way I could copy Notch's Minicraft attempt at saving the images as grayscale, and just applying colors at runtime?

Are you using a SpriteBatch to render your characters? If you simply to batch.setColor(color) the texture you render after that will be tinted in the color you specify. Thats what I use for these kinds of customizations, works like a charm.

One trick (that I never used, but it should work) is to render your characters to the screen (without swapping the buffers so nothing is shown) and then copying the rendered character to a Texture e.g. using the ScreenUtils methods.
18  Game Development / Newbie & Debugging Questions / Re: Scaling my games? Performance loss? on: 2014-04-16 08:52:08
but for some reason rendering a background images cuts my frame-rate from 4000 fps to 2000 which seems like a bit too large of a performance drop just for rendering one image.

I cant really comment on whether you render these images right without code. However, "FPS drop" is not a useful way to measure performance or performance impact.

Better use the time in ms it takes to render: it went from 0.25ms per frame to 0.5ms per frame, so rendering the background costs 0.25ms for you. To get 60FPS you have about 16ms per frame to spend. 0.25ms for the background does not seem to be that high to me, since it essentially fills the entire screen (which is a couple of million pixels). Rendering smaller images is usually faster, larger images are slower.
19  Discussions / Business and Project Discussions / Re: [PAID] Searching for a programming instructor. on: 2014-04-15 14:11:09
I'm willing to pay somebody to help me get to understanding all of this

Anyone really skilled and experienced will likely have something better to do and much more profitable means to get money. Besides, many people who are skilled and experienced like to help others for free.

Read books, read tutorials, ask questions or critiques of your code here and you'll learn at pretty much optimal speed.  
20  Discussions / General Discussions / Re: JGO Kickstarter on: 2014-04-15 09:20:58
It's 923,034,528s since Riven epoch.

I´m also quite impressed (but not surprised ofcourse) that our Overlord was born in one second.
21  Discussions / Miscellaneous Topics / Re: What are Anti-Virus Developers Protecting us From? on: 2014-04-14 15:56:03
Yeah its a weird thing. I never encounter viruses (or at tops a couple in 20 years), but some people I know with little computer experience somehow end up with a computer breaking down from a bewildering variety of viruses (ironically even though they have a virus scanner installed). Must have something to do with recognizing the difference between dangerous files / emails and safe ones, a skill that is far from trivial (I suspect most users wont really understand the difference between a text file and an executable).

So yeah, I'm not so sure about the value of virus scanners but I would not take yourself as an example of the typical computer user and draw conclusions based on that.
22  Game Development / Newbie & Debugging Questions / Re: LibGDX Mouse Position While Zoomed in on: 2014-04-11 09:27:26
Also, thats precisely what camera.unproject() is meant for so why make your life difficult?
23  Game Development / Newbie & Debugging Questions / Re: Reading/Writing JSON Constantly on: 2014-04-11 09:23:49
I'm trying to make the json file of the player basically a "database" for the player. Something I can reference from other classes using methods I have built. Etc. This is the code that I have currently WORKING, but something does not feel right. I feel like there is a terrible problem with the implementation of the code. Can someone tell me how they would do theirs? Maybe some advice? Thanks.

Your problem description is supremely vague: "I feel like there is a terrible problem" Grin Can you be more specific, e.g. what are you trying to achieve and what does not work?

And I have no clue what you are trying to do. You do know that you can acccess (public) data in other classes without having to save it to disk first, right? Since disk access is many, many magnitudes slower than memory access that would be the obvious solution.
24  Games Center / Showcase / Re: Groundskeeper 2 on: 2014-04-10 08:48:38
Yet if I try to record the emulator is just immediately slows down to crap.

You could simply use Fraps and record it while its running on a desktop computer (assuming you have a desktop version like this game has).
25  Discussions / General Discussions / Re: Are there any artists on this forum? on: 2014-04-09 08:27:21
Wow! Really good art, I love all of it. There´s different distinct flavours, but all are very pretty (well, or creepy). Well done!
26  Discussions / General Discussions / Re: What do you do to cut development time? on: 2014-04-04 11:06:23
Its also a matter of where to apply your creativity, and not so much a matter of more or less creativity. If I'm creative in implementing an essential feature I had in mind things are going great. However, there's also something thats more like "lazy" creativity: freewheeling dreaming up things that would be so awesome, regardless of whether its possible or not. Thats useful at times (e.g, brainstorming new game), but I find that creativity is most useful when constrained and steered a bit, for example when also considering time and complexity limitations. Thats a harder kind of creativity, but very useful for solving complex problems.
27  Game Development / Newbie & Debugging Questions / Re: Beginner Design Questions on: 2014-04-04 11:05:32
Say if I wanted to change the key that moves the player forward/backwards/left/right could I assign this to another key by clicking a button that registers the next key that is pressed?

Sure, you could store this in an InputConfiguration class or something, which links each game command to an input (e.g. keyboard key or mouse press).
28  Game Development / Newbie & Debugging Questions / Re: Beginner Design Questions on: 2014-04-04 11:04:25
Good one, I have to get used to pastebin a bit more.
29  Games Center / Showcase / Re: [Desktop] TSUADA : The Super Upper Asteroid Dodge Adventure on: 2014-04-04 11:03:40
Looks cool Wink You may want to put one of your screenshots as the first picture, however, as this gets shown in the Showcase index (currently it shows the indiedb thing).
30  Discussions / General Discussions / Re: Are there any artists on this forum? on: 2014-04-04 08:25:54
Have to say, those planets are better than anything I can currently do in that style. ;P

Thanks Smiley Here's some tutorials I played around with to get there:
Pages: [1] 2 3 ... 20

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (55 views)
2014-04-15 18:08:23

BurntPizza (53 views)
2014-04-15 03:46:01

UprightPath (66 views)
2014-04-14 17:39:50

UprightPath (49 views)
2014-04-14 17:35:47

Porlus (66 views)
2014-04-14 15:48:38

tom_mai78101 (90 views)
2014-04-10 04:04:31

BurntPizza (151 views)
2014-04-08 23:06:04

tom_mai78101 (246 views)
2014-04-05 13:34:39

trollwarrior1 (204 views)
2014-04-04 12:06:45

CJLetsGame (211 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30 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‑
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!