Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (576)
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 ... 6
1  Game Development / Game Play & Game Design / Re: Fancy graphics without any skills on: 2014-07-21 08:34:14
I do strongly recommend InkScape, I've never seen it discussed on these forums, but it is an invaluable tool for creating nice, vector art. That said, it can also export to raster once you've created your art. I've found that it makes it extremely easy to make typical app style art, with lots of tutorials on it around the web.
2  Game Development / Newbie & Debugging Questions / Re: My bullet(missile,magic) doesn't want to go to mouse x,y!? on: 2014-07-19 09:51:17
To calculate the x & y velocity you need to use this code:
float x = xMouse - xPlayer;
float y = yMouse - yPlayer;
float length = Math.sqrt((x * x) + (y* y));
xVelocity = x / length * speed;
yVelocity = y / length * speed;

Sorry if it doesn't work I am very tired and I didn't test it.
3  Game Development / Newbie & Debugging Questions / Re: how to do something at the end of a finger drag in libgdx/android? on: 2014-07-19 07:36:51
Are we just going to not mention OP's username?
4  Games Center / WIP games, tools & toy projects / Re: Vox2D JGL - Easy AWT Game Wrapper on: 2014-07-16 07:50:26

They make the Minecraft server mod Bukkit plugin "VoxelSniper" which has over half a million downloads. I would strongly recommend changing your name as it will cause confusion among a lot of people.
5  Java Game APIs & Engines / OpenGL Development / Re: VBO and Shaders on: 2014-07-09 08:50:05
@PandaMoniumHUN: He's given his shader code in the first post, and he's not using VAOs.

@OP: What is happening here, I believe, is that you've got a large cube with your other two cubes inside. When you're not culling the front face, the front face of the large cube sits between the camera and your other cubes, whereas the back side of the cube sits behind them. This means that when the front face is culled, you see the inside of the back face, and seeing the inside of the back face means the colours are the wrong way around.

Another diagnosis is that you're not calling
for your depth buffer, meaning that despite the large cube being closer to the camera, the cube drawn first gets drawn behind it, and the last drawn cube gets drawn at the front. Therefore when you move forward, the cube stands behind the camera and therefore draws both small cubes, despite you not being able to see the large cube.

I believe the reason this is happening is due to your mixing deprecated OpenGL with Modern OpenGL. It would seem that
(deprecated OpenGL) do not affect the model matrix of your cube being drawn through modern methods. This would explain why camera movement does not affect the large cube.

I think the solution to your problem is to entirely get rid of your deprecated code and stick with one version of OpenGL. This would probably entail learning about making your own matrices, although I don't know how that is done in JOGL. Almost everyone on this forum, barring gouessej, uses LWJGL and there are many more resources about for using it. If I were you, I'd make the switch before it becomes too much of a pain.
6  Java Game APIs & Engines / OpenGL Development / Re: VBO and Shaders on: 2014-07-09 05:02:26
This shouldn't fix it, but
doesn't change every frame: you can call it at the beginning and leave it, you don't have to call it each frame.
7  Java Game APIs & Engines / OpenGL Development / Re: VBO and Shaders on: 2014-07-09 03:15:17
should have it's stride argument as the number of elements * Buffers.SIZEOF_FLOAT.
Therefore, you should have a line like
glVertexAttribPointer(vert_pos, 3, GL.GL_FLOAT, false, 16, 0L);

Also at nowhere in your presented code do you call
before calling
, meaning the get function will have nothing to get.

If you print out the value that is returned by
, the docs say it should be returning -1.

EDIT: The Lion King pointed out to me that you're creating your W value inside your shader, so it should be
glVertexAttribPointer(vert_pos, 3, GL.GL_FLOAT, false, 12, 0L);
8  Discussions / Miscellaneous Topics / Re: JGO IRC on: 2014-07-09 02:26:05
So Jeviny's friend created a plugin for the IRC channel that says in chat whenever there is a new post :p
9  Java Game APIs & Engines / OpenGL Development / Re: VBO and Shaders on: 2014-07-08 23:50:53
I feel like I say this a lot..  but
is invaluable when trying to debug OpenGL.
When you figure out which function returns an error, use the OpenGL API documentation to figure out why said error is being returned. In fact, even just reading up on the GL functions you're using will help you in your understanding and ability to debug immensely.
10  Games Center / WIP games, tools & toy projects / Re: MERCury - 2d Game Library | Experimental release in development; test it out! on: 2014-07-05 06:31:28
For the last three options, they are a state rather than parameters, meaning that it is more intuitive to use radio buttons rather than checkboxes.
11  Games Center / Featured Games / Re: Droid Assault now on Steam! on: 2014-06-29 22:07:53
I must say there is a lot of hilarity in this, as the price of the individual games it 1/3 of the package.
12  Games Center / Featured Games / Re: Droid Assault now on Steam! on: 2014-06-29 21:34:58
I also did a few days ago...
13  Game Development / Newbie & Debugging Questions / Re: Problem with the way I load levels on: 2014-06-28 10:06:20
At the moment, is there any difference in how you are using the different colour channels? Because you could, for example, just use the value from the blue channel to signify the layer height.
14  Game Development / Game Play & Game Design / Re: Looking for Free Level Designer on: 2014-06-22 08:40:53
You need to post something about the game itself here to entice people. Any gameplay? Any art?
We need something here, otherwise this topic will be glossed over like all those before it.
15  Games Center / WIP games, tools & toy projects / Re: 3D Randomly Generated World on: 2014-06-21 22:27:47
You'll likely run out of hard drive space before that too I'd imagine.

Actually, I don't save the chunks, so you're always generating them as you move around  Emo I know, one more thing on the todo list.

If you're not going to modifying the chunks at all, it may be best to not save them at all, instead just save the seed. Procedural generation has allowed a lot of gamedevs to do some really cool stuff in this way, for example The Elder Scrolls II: Daggerfall had one seed which generated the world which was twice the size of Great Britain and a population of 750,000 spread across 15,000 towns. People often confuse procedural generation with random generation, but you've got the chance here to use procedural generation to create yourself a world.
16  Games Center / WIP games, tools & toy projects / Re: 3D Randomly Generated World on: 2014-06-21 21:22:11
You will definitely want to check out this blog post by one of the guys who worked on Titan Quest.
It describes very nice looking texture blending, it is very cool.

OT: You're progressing very nicely ^.^
17  Game Development / Newbie & Debugging Questions / Re: The wonderful adventures of Level Design & I! on: 2014-06-19 19:55:15
Tiled is a popular map editor that exports to a readable file format. There are a few Tiled map parsers if you don't want to make your own, the one I've used in the past is the one in Slick2D. If you want, just look at the Slick2D source and rip out their class. If you're using LibGDX, I think that has its own Tiled parser.
18  Game Development / Newbie & Debugging Questions / Re: When would one be ready to create advanced game engines on: 2014-06-19 02:37:28
Let me clarify: You are still quite young. 12-13 by my reckoning. At this stage in your life, you're still at a point where the entirety of your school learning is done within the confines of your classroom. Within the next few years, school will become a lot harder, and you will learn the skills needed to learn by yourself, especially as you start to go to university. Right now, reading a book probably won't help you whatsoever, not because you aren't clever enough to understand or because you don't have a set of underlying talents, but simply experience.

What you can do at the moment, is start on simpler things. Once you get the hang of 2D, which should intertwine with the content you learn in your math class (such as trigonometry, Pythagoras theorem, enhanced algebra skills) you will have gotten the ball rolling as far as the skill of learning, and eventually that should give you an edge over your classmates, and a greater ability to program.

I know you may think you are at a point where learning about things is easy, but it is very typical of someone your inexperience/maturity/age to often seek guidance from others (I know, I was there a few years ago Tongue), instead of doing your own thorough (and often extremely painful) research, sorting through page after page after page of Google, stackoverflow,, java-gaming, tutorials, wikis... If you really don't think you seek guidance from others that often, you have been on this forums for 2-3 months, and in that time you have made 208 posts, averaging at 5 posts a day, starting 27 topics with over half of them being in the "Newbie and Debugging" board alone.

Also keep in mind: I'm sure a lot of people will affirm in this thread and you cannot learn LWJGL right now (me included), but that does not mean you are stupid by any sense of the word.

As BurntPizza said in another thread, your best bet right now is learning about LibGDX. It will teach you several foundation skills, which once learnt will help you greater understand the general flow of how a computer game works. Try go for a small game, thinking big (making your own game engine kinda big) tends to lead in severe disappointment when you become aware how slow long-term development tends to go, and has borne many great ideas to be thrown aside as you decide you've become a better coder and need to start again or that you can better use your skills on another project, discarding your original one forever (we've all been there). That said, don't just make a endless stream of minigames, as all you will effectively learn is how to set up projects.

Come up with an idea, get a word document, define a scope and set goals/deadlines for your projects. Don't try to learn a hundred new libraries or skills with your first project, for example trying to learn modern LWJGL with kyronet with controller support with complex lighting shaders with etc... If you want, you can upload your design document to JGO and I will have a brief look over it and  give you my opinion of how you could improve, and hopefully some others will also look over it too.

If your struggling with ideas, don't spend half an hour with a pen and pad drawing random shit, just sit down and make a pong clone. Give yourself a few days for that, then if you still have no ideas, make a BrickBreaker clone. Then if you're still without ideas, make a mario clone. Even if you're not using your time making something that you would write home about, make sure you're using it to continually develop your skills.

I hope this post was more insightful than my previous ^.^
19  Game Development / Newbie & Debugging Questions / Re: When would one be ready to create advanced game engines on: 2014-06-19 02:07:03
For you, a loong time from now.
20  Discussions / Miscellaneous Topics / Re: Interesting Profile pictures on: 2014-06-18 06:23:22

Startled me there for a second.

You're one clever bastard.

Over 90% of the text in your attempted post consisted of quotes.
Please either remove (nested) quotes or write something interesting.
21  Discussions / Miscellaneous Topics / Re: Interesting Profile pictures on: 2014-06-18 04:34:37
Click to Play
22  Games Center / WIP games, tools & toy projects / Re: Zombie Nauts [0.4.0] on: 2014-06-16 09:48:01
I made a thing based on your zombies:

23  Discussions / Miscellaneous Topics / Re: Which game to clone as a next big project? on: 2014-06-14 11:07:07

Heretic. Please.
24  Game Development / Newbie & Debugging Questions / Re: Reduce the polys in a voxel engine? on: 2014-06-14 10:12:22
One technique I have heard about is to batch multiple of the same bock type together and then drawing one big quad with GL_REPEAT turned on for wrapping the textures.

For example if you have a 3x3 area of the top of grass blocks then instead of drawing 9 quads you could draw one quad that covers them all and then just have the texture repeat 9 times.

Not sure how to implement this, but it would reduce the number of quads a lot Smiley

The process Hermasetas describes here if I am not mistaken is pretty much Quadtrees, which will speed things up when you have smooth landscapes. But if you're making a minecraft-like game, your terrain is going to be quite variable and this likely won't help.

If you're not already, upgrade to use VBOs and make sure you're breaking down into triangles before you send your geometry to the GPU.

As for what you said about the top-down perspective vs. first person, I think first person would cause a lot more lag than top down. With top down, you can predict how much you will be seeing at once, whereas with first person you can potentially see infinitely from the top of a mountain (except you can't because RAM). With top down, realistically you would only be rendering 4 * 4 chunks at a time max while still being able to see any units you control. Whereas in minecraft you can see like, 10 chunks in one direction with a good enough PC (meaning 400 chunks loaded).

If you plan on adding extremely large zoom, you're gonna have to look into LoD (level of detail).

Ultimately, were I you, I'd carry on and not worry too much about optimisation right now, and just come back to the relevant code IF you get too a point where it actually becomes a problem.
25  Game Development / Shared Code / Re: Color object on: 2014-06-14 09:56:10
I just created my own Colour class, thought it'd be good to post here. It can convert both HSV and HSL values into RGB.

For those not in the know, HSV and HSL are colour data formats that are made to be more understandable by humans, as RGB is hard for people to visualise. It's what Paint,, GIMP, Photoshop, etc.. use for their colour pickers, so if you're in the process of making anything that'd need a colour picker (E.G. a game engine, level editor, RPG with the ability to customise yourself) you can use this code to save 30 mins of your life ^.^

public class Colour {
   private Vector3 rgb;
   private float alpha;
   public Colour(){
      rgb = new Vector3(1f, 1f, 1f);
   public float getRed(){
      return rgb.x;
   public float getGreen(){
      return rgb.y;
   public float getBlue(){
      return rgb.z;
   public float getAlpha(){
      return alpha;
   public void setRed(float red){
      rgb.x = red;
   public void setGreen(float green){
      rgb.y = green;
   public void setBlue(float blue){
      rgb.z = blue;
   public void setAplha(float alpha){
      this.alpha = alpha;
   public void setHSL(float H, float S, float L){
      H /= 60;
      float C = (1 - Math.abs(2 * L - 1)) * S;
      float X = C * (1 - Math.abs(H % 2 - 1));
      Vector3 rgb = new Vector3(0, 0, 0);
      if(0 <= H && H <= 1){
         rgb = new Vector3(C, X, 0.0f);
      else if(1 <= H && H <= 2){
         rgb = new Vector3(X, C, 0);
      else if(2 <= H && H <= 3){
         rgb = new Vector3(0, C, X);
      else if(3 <= H && H <= 4){
         rgb = new Vector3(0, X, C);
      else if(4 <= H && H <= 5){
         rgb = new Vector3(X, 0, C);
      else if(5 <= H && H <= 6){
         rgb = new Vector3(C, 0, X);
      float m = L - (0.5f * C);
      this.rgb = rgb.add(m);
   public void setHSV(float H, float S, float V){
      H /= 60;
      float C = V * S;
      float X = C * (1 - Math.abs(H % 2 - 1));
      Vector3 rgb = new Vector3(0, 0, 0);
      if(0 <= H && H <= 1){
         rgb = new Vector3(C, X, 0);
      else if(1 <= H && H <= 2){
         rgb = new Vector3(X, C, 0);
      else if(2 <= H && H <= 3){
         rgb = new Vector3(0, C, X);
      else if(3 <= H && H <= 4){
         rgb = new Vector3(0, X, C);
      else if(4 <= H && H <= 5){
         rgb = new Vector3(X, 0, C);
      else if(5 <= H && H <= 6){
         rgb = new Vector3(C, 0, X);
      float m = V - C;
      this.rgb = rgb.add(m);
26  Game Development / Newbie & Debugging Questions / Re: LWJGL - Rendering A Texture Onto A VBO ($5 Reward) on: 2014-06-10 08:15:40
The main reason people aren't helping you is that you keep giving us your code via dropbox and not via pastebin like people keep saying.
Short of pastebin, you could use Github or something of the like.

But tbh I don't think JGO is the place to be giving out money as a reward, generally if people have the abilities to help you (and you're not making it too hard for them), they will help you.
27  Games Center / Cube World Projects / Re: Texturing a VBO? on: 2014-06-08 11:27:52
Upon what I just said about UVs, looking at your code you bind one face of UV coords, and although it's hard to know without seeing your code, the context implies that block.getVerticies() returns more than one face of vertex positions, but all exposed faces. However, every vertex position has to line up to a vertex, as shown with this diagram here:

Assuming I right in saying that block.getVerticies() returns all exposed faces, you would have to have a for loop around your UV coords like so:
if(fNum > 0) {
        vCoords.put(block.getVerticies(preX + x, preY + y, preZ + z, faces));
+      for(int i =0; i < fNum i++)                
                tCoords.put(new float[] { 0f, 1f, });
                tCoords.put(new float[] { 1f, 1f, });
                tCoords.put(new float[] { 0f, 0f, });
                tCoords.put(new float[] { 1f, 0f, });
                tCoords.put(new float[] { 0f, 0f, });
                tCoords.put(new float[] { 1f, 1f, });
+      }                    
        faceCount += fNum;

EDIT: when debugging openGL, a good idea is to have a method like this:

   public static void GLError(){
      int GLErr = GL11.glGetError();
      while(GLErr != 0){
         System.err.println("Error " + GLErr + ":");
         GLErr = GL11.glGetError();

This method GL11.glGetError() will return an non-zero number if there has been an issue.
while(GLErr != 0) will iterate until there are no more issues to be resolved.
GLU.gluErrorString(GLErr) will give greater insight into what the error is beyond just the error code.
NOTE: GLU.gluErrorString() requires that you have lwjgl_util.jar importing into your workspace.
28  Games Center / Cube World Projects / Re: Texturing a VBO? on: 2014-06-08 11:14:00
With the tCoords.put(...) you're passing texture coordinates to openGL that define which part of the texture correlates to each vertex, where the top left corner is (0, 0) and the bottom right is (1, 1)

Would someone please explain what this means?, Why di I need todo this? From what I understand I'm telling openGL the coordinates of the texture, but I thought I did that with this...

Each time you call glTexParameteri, you're defining something about your texture.
GL_TEXTURE_MIN_FILTER means your specifying the minification filter (AKA how it reacts to be being scaled down), where GL_TEXTURE_MAG_FILTER filter defines how it is when it is magnified, or scaled up.
GL_LINEAR is what you're specified the scaling filters to do. GL_LINEAR blurs each pixel into the next pixel, making it good for high-res things as it gets rid of any pixelation. What you should probably be using considering what you're texture looks to be, is GL_NEAREST. This doesn't do any blurring, and is good for lower-res stuff like pixel art and subsequently what you appear to be doing. Here is a good representation of GL_NEAREST v. GL_LINEAR

The second two lines effectively define what happens when you give texture coords (otherwise know as UV or ST) that are greater than one. GL_CLAMP_TO_EDGE means that the edge pixels will be repeated continuously, while the alternative GL_REPEAT means the texture will just repeat itself infinitely.  In images:

I hope I have cleared things up a little for you Smiley
29  Games Center / WIP games, tools & toy projects / Re: Gunslugs 2 - 5th week of development on: 2014-06-07 07:56:40
Haha, high quality games as always orangepascal. I like how you've made the terrain out of slightly misaligned tiles instead of the somewhat standard practices used now of making a world of squares.

Also that art style and gameplay pace is great.
30  Game Development / Newbie & Debugging Questions / Re: LWJGL - Rendering A Texture Onto A VBO on: 2014-06-05 21:25:34
Can you post a screenshot what's happening? It would make the problem a lot easier to solve.
Pages: [1] 2 3 ... 6

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

The first screenshot will be displayed as a thumbnail.

Longarmx (39 views)
2014-10-17 03:59:02

Norakomi (30 views)
2014-10-16 15:22:06

Norakomi (24 views)
2014-10-16 15:20:20

lcass (28 views)
2014-10-15 16:18:58

TehJavaDev (57 views)
2014-10-14 00:39:48

TehJavaDev (58 views)
2014-10-14 00:35:47

TehJavaDev (48 views)
2014-10-14 00:32:37

BurntPizza (64 views)
2014-10-11 23:24:42

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (78 views)
2014-10-11 22:30:10
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 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!