Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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 ... 22
1  Games Center / WIP games, tools & toy projects / Re: Age of Conquest IV - Risk-like Strategy Game on: 2014-07-22 06:59:34
I really like A (Vibrant colors, 3D coastline), and C's gui.

It was a hard decision because all of the options are so good. I'm excited for this development!
2  Game Development / Newbie & Debugging Questions / Re: Why does my if statments stop working when I remove System.out statments on: 2014-07-22 06:41:15
You say that you only remove the print statements, and yet your explanation and code say otherwise:

1  
2  
3  
4  
5  
6  
  System.out.println(gameState.getCurrentGameState());
            System.out.println(gameState.getTestState());
            System.out.println("begining called");
            gameState.setTestState(gameState.getCurrentGameState());
           
            firstGo();


If I understand you, then this code is what you are removing, correct? It doesn't look like you are only removing print statements. Not calling setTestState() or firstGo() must be causing your problem, so there must be something in there that causes the if statement to "trigger."
3  Game Development / Newbie & Debugging Questions / Re: Slow FPS Problems on: 2014-07-18 16:44:14
Why not just load the textures in the create method? Or use a spritesheet with TextureRegions?
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-14 00:20:52
Is this what they used in "Sir, you are being hunted?" I watched a video of them explaining something that looked a lot like this. Good work!
5  Game Development / Newbie & Debugging Questions / Re: Java rectangles for collision? on: 2014-07-13 19:08:57
But that is what i have been doing and it's not working out. Maybe my code is wrong? Can you give me an a example?

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
// Example code
Rectangle player;
Rectangle wall;

public void update()
{
     // These will store the player's last position before it moves.
    lastPlayerX = playerX;
     lastPlayerY = playerY;

     // However you move your player
    movePlayer();

     // Set the rectangles to enclose the player and the wall
    player.set(playerX, playerY, playerWidth, playerHeight);
     wall.set(wallX, wallY, wallWidth, wallHeight);

     checkCollision();
}

public void checkCollision()
{
     // If the player rectangle is intersecting the wall rectangle
    if(player.intersects(wall))
          handleCollision();
}

// handleCollision could be like setting the player's coordinates to the last coordinates to keep it from going through the wall
private void handleCollision()
{
     playerX = lastPlayerX;
     playerY = lastPlayerY;
}
6  Game Development / Newbie & Debugging Questions / Re: Java rectangles for collision? on: 2014-07-13 17:35:13
You will have to use the rectangles as sensors. If they overlap, then you process that collision, like moving the player back to its last spot to keep it from going through walls.

If you don't want to use rectangles, then google AABB (Axis-Aligned Bounding Box) collision detection. This will give you the same result as the rectangles, but it is a different implementation for you to try out.

Edit: The rectangles will not magically keep from going through each other if that's what you want. You just have to use them to detect the collision, and then you will process it.
7  Games Center / WIP games, tools & toy projects / Re: Prophour23 - a fast-paced, randomized RTS on: 2014-07-12 22:49:44
Wow. Greenlit already? Congrats! Looks like a cool concept. I how the little bugs come clean up the body of the larger insect when it dies.  Pointing
8  Discussions / Miscellaneous Topics / Re: about WIP Posting on: 2014-07-11 21:03:07
I think unity uses javascript so you cant post here.

Java != Javascript
9  Game Development / Newbie & Debugging Questions / Re: [GLSL] How to make a gradient shader for background? on: 2014-07-11 19:24:42
This is where I got the idea from Wink You can see how he implements it in this video if you're interested.
10  Game Development / Newbie & Debugging Questions / Re: [GLSL] How to make a gradient shader for background? on: 2014-07-11 19:20:50
You can do it with your shader loading code. If it encounters a #include directive then it can search for the file stated by the include.
11  Discussions / Miscellaneous Topics / Re: Minecraft: overwriting login database? on: 2014-07-11 18:52:51
Even electrical engineering with redstone (Maybe, I'm not really sure on how electricity works, I'm still a newb here. Smiley )

The only problem with teaching electrical engineering with redstone, is that it follows special rules. It does not behave like it does in the real world. The only value it would have would be mid-level, where you are building gates and latches as a whole, but even then, it is really slow and there are much better programs for that kind of stuff.
12  Discussions / Miscellaneous Topics / Re: Minecraft: overwriting login database? on: 2014-07-11 18:31:44
I think he's already got an account

I mean that form this i can set my skin without buying the game?

Minecraft does not have much educational value in my opinion. There are better programs for anything that Minecraft has to offer educationally.
13  Games Center / WIP games, tools & toy projects / Re: Astrofirm on: 2014-07-11 02:25:15
Cool work! This project has come a long way! (Love the lighting by the way. Especially at night)
14  Game Development / Newbie & Debugging Questions / Re: MouseListener ArrayOutOfBoundsException on: 2014-07-10 01:01:39
Your map array is only 20 long. The mouse coordinates are in pixels, which means that as soon as you move your mouse past 20 pixels, you will get a crash. I think that you are trying to get the tile that the mouse is over. If this is the case, then divide the mouse coordinates by the tile size.
15  Game Development / Newbie & Debugging Questions / Re: Reading world from a file on: 2014-07-09 03:16:44
Have you tried printing out the size of your array?

What is in your readFileToList() function?
16  Game Development / Newbie & Debugging Questions / Re: (LibGdx) Sprite not rendering on Box2D body on: 2014-07-09 01:45:40
Setting the userdata won't render it for you. It is simply a way to associate sprites with bodies. You have to loop through the bodies, get the sprite for the specific body, and render that.
See this video for a tutorial from Dermetfan:

https://www.youtube.com/watch?v=1cB-iWycUH4&list=PLXY8okVWvwZ2Ph9LKWiNBZ1GRAc_TyDru&index=7
17  Games Center / WIP games, tools & toy projects / Re: 3D Randomly Generated World on: 2014-07-08 22:21:03
Video is here!

<a href="http://www.youtube.com/v/-RdZxfQ3i6s?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/-RdZxfQ3i6s?version=3&amp;hl=en_US&amp;start=</a>

You may notice in the video that the water is a bit different. Yeah... specular reflection is now fixed. This will be included in the next update.

I also play around with the world generation settings, to show those who don't want to / can't run it.
18  Game Development / Newbie & Debugging Questions / Re: (LWJGL) VBO problems on: 2014-07-08 19:20:28
How would I clear them?

vertexData.clear()


Edit: Ninja'd
19  Game Development / Newbie & Debugging Questions / Re: (LWJGL) VBO problems on: 2014-07-08 18:57:10
If you update the data every frame, then yes.
20  Game Development / Newbie & Debugging Questions / Re: (LWJGL) VBO problems on: 2014-07-08 18:47:42
Those just provide hints to OpenGL to help it optimise the buffer. Every time you want the data to change, you have to call glBufferData() again to provide it the updated data.
21  Game Development / Newbie & Debugging Questions / Re: (LWJGL) VBO problems on: 2014-07-08 18:33:39
You have to re-upload the data using glBufferData(); (or glBufferSubData()Wink
22  Games Center / WIP games, tools & toy projects / Re: 3D Randomly Generated World on: 2014-07-08 16:13:59
Update 0.0.5.2! Download is in the OP.

[Latest Update]
  • Water!
  • Performance greatly improved
  • You can now launch directly from data/launch_direct (if the launcher isn't working for you)
  • VSync option in the launcher
  • Increased available display dimensions
  • Added more debug information

[Controls Added]
  • n & m - decrease or increase the water quality (Warning: very taxing)
  • j & k - decrease or increase the water wave height

I plan on making a video soon to show off the water  Smiley



Warning: Using launch_direct will not perform preliminary checks on your system for Opengl version and may crash. Requires version 3.3
23  Game Development / Newbie & Debugging Questions / Re: Should I move to LibGDX? on: 2014-07-08 06:41:29
You can set the camera to be y-down like you're used to by calling
camera.setToOrtho(true);


Or just simply deal with it. Any snippets you find using LibGDX will be using y-up, so you might just end up confusing yourself.

Especially when it comes to fonts.

Agreed. I have never used LibGDX with y-down because everything is written for y-up. I just wish that it would automatically position the mouse origin at the bottom left too. Unfortunately (on desktop at least), y coordinates go up as your mouse cursor moves down... Really simple conversion, but still...
24  Game Development / Newbie & Debugging Questions / Re: (LWJGL) VBO problems on: 2014-07-08 06:38:15
Great, thanks. Was I correct about moving the triangles though?

Would I replace the numbers with ints that I just trabslate?

You would just provide a different float. The coordinates range from -1 to 1, so anything between that will be on your screen. So, if you want your triangle to be translated .1f to the right, you would just change it to:

1  
2  
float trans= 0.1f;
vertexData.put(new float[]{-0.5f + trans, -0.5f, 0, 0.5f + trans, -0.5f, 0, 0.5f + trans, 0.5f, 0});


See how I modified all of the x coordinates?
25  Game Development / Newbie & Debugging Questions / Re: (LWJGL) VBO problems on: 2014-07-08 06:19:59
Ok, I get you now. You want to use something like pixels to define your positions, correct?

For this, you are going to need a perspective projection matrix (or orthographic if you're wanting 2d). These basically transform the points that you provide (in pixels) to the coordinates that Opengl uses (-1f to 1f).

To learn about matrices:
Matrices
Perspective Projection
Orthographic Projection

To translate your point (from a pixel) to opengl (as a normalized float) you would need to multiply by a matrix. You can do this on the CPU in your program, or on the GPU in your vertex shader.

Search around on these forums and you will find something. These kind of matrix questions have been asked a lot. Also google around, many questions like this have been asked (and answered) all over the internet, with specific implementations).
26  Game Development / Newbie & Debugging Questions / Re: (LWJGL) VBO problems on: 2014-07-08 05:58:10
1  
2  
 glDrawArrays(GL_TRIANGLES, 0, amountOfVertices);//what does
           //this do ^? how would i draw another triangle?


This draws your triangles with the data that you provided. Every 9 floats that you provide (3 vertices make up a triangle, 3 floats per vertex for x,y,z) will draw a new triangle.

But If that does make a second triangle. How do I move only one of them instead of moving both of them. I still don't fully understand this.

I don't understand your problem / question. Are you asking how to move only one of the triangles? I guess that you are coming from the land of
glTranslate()
? All you need to do is modify the vertices to different positions.

Also how do I convert ints to floats for this?

Add an
f
after the number. I assume that this is what you are asking.
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-08 05:41:03
Got some water implemented into my 3d world.



The water is animated in a sinusoidal wave. You can change the resolution of the water, as well as the wave height. Maybe I'll post an update soon Wink
I first want to experiment with animated noise on the waves to give it a bit more depth.

Edit: This picture sucks at showing off the water. I might just make a video to provide it justice.  Smiley
28  Game Development / Newbie & Debugging Questions / Re: Should I move to LibGDX? on: 2014-07-07 21:46:51
You can set the camera to be y-down like you're used to by calling
camera.setToOrtho(true);
29  Games Center / WIP games, tools & toy projects / Re: [Slick2d] Retro-Pixel Castles >>NEW MAP EDITOR BUILD: 6-22-2014!!<< on: 2014-07-07 21:42:21
I tweaked the minimap generation to make the topography more defined, and then started working on the map again.

Looks cool! How are you doing outlining the different terrain types?
30  Discussions / General Discussions / Re: The Wrath of Ackermann on: 2014-07-07 21:36:03
The mother of all computations:

ack(g64, g64);
Pages: [1] 2 3 ... 22
 

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

The first screenshot will be displayed as a thumbnail.

ctomni231 (34 views)
2014-07-18 06:55:21

Zero Volt (30 views)
2014-07-17 23:47:54

danieldean (25 views)
2014-07-17 23:41:23

MustardPeter (27 views)
2014-07-16 23:30:00

Cero (42 views)
2014-07-16 00:42:17

Riven (44 views)
2014-07-14 18:02:53

OpenGLShaders (32 views)
2014-07-14 16:23:47

Riven (34 views)
2014-07-14 11:51:35

quew8 (30 views)
2014-07-13 13:57:52

SHC (66 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!