Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Shader libs? on: 2014-07-30 07:43:53
You can create your own GLSL parser for the files, and then draw everything (through a "fragment shader") to a fullscreen BufferedImage. This isn't hardware accelerated though, which is why you would use shaders in the first place.

Also, it would be pointless to do something like this, when you have perfectly good, hardware accelerated shaders provided by Opengl that require minimal effort to get working.
2  Game Development / Newbie & Debugging Questions / Re: How to get if image is touched and not the background? LIBGDX on: 2014-07-29 06:24:26
You want to check if the mouse is within over the head?

1  
2  
3  
4  
if(x >= headX && x <= headX + headWidth && y >= headY && y <= headY + headHeight)
     // The mouse is inside the head
else
     // The mouse is outside the head


This is just simple AABB to point collision detection. If the head will be rotated, then you will have to use a different approach.
3  Game Development / Newbie & Debugging Questions / Re: Voxel Destroy Item on: 2014-07-28 20:17:54
I think that you want to break blocks with a pickaxe correct? Well, you will need to raycast to find the block the player is pointing at, then you will need to see if the player is close enough to the block. If this is true then you will break the block by setting it to something like air.
4  Game Development / Newbie & Debugging Questions / Re: How do I make biomes in a 2d array game (tiles) on: 2014-07-28 17:51:30
LostWarrior has the right idea. You will need some sort of noise function. But FIRST: Learn Java.
5  Game Development / Newbie & Debugging Questions / Re: OpenGL Fragments on: 2014-07-28 01:17:00
Another way to do this is to switch your blending mode to additive blending.

Sorry, if I wasn't on my phone then I would provide some example code. To aid you in your googling, you change the blending mode to GL_ONE and GL_ONE.
6  Game Development / Game Mechanics / Re: Improving performance for a blood rendering on: 2014-07-28 01:11:46
One of the easiest ways to increase performance is to stop using immediate mode  Wink
7  Game Development / Newbie & Debugging Questions / Re: [Game] How do i make a camera.class? on: 2014-07-28 01:09:21
If you have a separate question, then please start a new thread so we can keep the forum organized and easily accessible  Pointing
8  Discussions / Miscellaneous Topics / Re: Pixel art? Creating pixel art from image!? on: 2014-07-28 00:58:22
It actually looks very good. Only the tip of the staff looks a little strange, but that can easily be fixed. As Ray said, some shading would go a long way, especially at the bottoms of his robe, under the arms, and the tip of the hat. You have a great outline to work with, now you just need to give it life!
9  Game Development / Newbie & Debugging Questions / Re: LIbgdx: Tips on best practices for tilemap (Polygon?) collision detection on: 2014-07-24 18:09:03
So what you need is the Separating Axis Theorem (discussed in the thread you linked). This solution only applies to convex polygons (yours are concave) so you will have to "triangulate" your polygons, or split them up into triangles. You can do this manually or you can find an algorithm to do this for you (Googling gives many results).
10  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!
11  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."
12  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?
13  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!
14  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;
}
15  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.
16  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
17  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
18  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.
19  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.
20  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.
21  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.
22  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)
23  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.
24  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?
25  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
26  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.
27  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
28  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.
29  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.
30  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
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.

CogWheelz (9 views)
2014-07-30 21:08:39

Riven (20 views)
2014-07-29 18:09:19

Riven (14 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (32 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (29 views)
2014-07-23 21:07:15

Riven (30 views)
2014-07-23 20:56:16
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!