Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (690)
Games in Android Showcase (200)
games submitted by our members
Games in WIP (764)
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
1  Games Center / Showcase / Re: Astronaut - a light puzzle game with a powerful twist on: 2014-07-15 04:52:38
Awesome! Very cool concept!

If a few more game-play elements were added (possibly enemies), and more difficult levels were designed, this would be 5 stars (in my opinion)

The jumping sound was a bit annoying to me Sad but other than that, I have no complaints! Smiley
2  Game Development / Game Mechanics / Re: 2D Rigid Body Rope Physics on: 2014-07-14 19:44:08
So, I've successfully implemented the rigid rope. I was wondering if there is an easy way to calculate the linear x and  y velocities of the point of the rope that is swinging?

(aside from the delta position algorithm)
3  Game Development / Game Mechanics / Re: 2D Rigid Body Rope Physics on: 2014-07-13 15:38:49
Awesome! Thank you so much! You've been extremely helpful.

Not only did your example project allow me to further test, but those 2 simple position algorithms helped me fix my own implementation Smiley
4  Game Development / Game Mechanics / Re: 2D Rigid Body Rope Physics on: 2014-07-13 03:22:21
Thank you again @quew8 Cheesy


In that model, do you know what the extension represents? Also, what the "Normal_Length" variable is? As I remember it, a normal's length is always 1 soo....not sure what else it could be.

P.S. - @quew8 how do I go about implementing the angular acceleration and angular velocity into the position of the vector?
                     I believe I have calculated all of the variables correctly, I'm just unsure of how to actually apply them.
5  Game Development / Game Mechanics / Re: 2D Rigid Body Rope Physics on: 2014-07-11 05:56:29
Oh, wow! That makes a lot more sense haha thank you Smiley I'll take this concept and see what I can do with it.

One last question though.

The way I'm currently moving my player object includes absolutely no angles, only position, velocity, and acceleration.

Should I be using angular velocity to move the player in all instances or only when I need to calculate the position of the rope?
6  Game Development / Game Mechanics / Re: 2D Rigid Body Rope Physics on: 2014-07-10 03:57:01
hmm...perhaps this is a bit above my head with the physics aspects. I understand what you are talking about with theta, but what is the "normal" vector that you list?

In order to implement your solution, I'll need to rotate the acceleration on the object?

If you could put together a quick example for me in either pseudo-code or a working example, that would be greatly appreciated.
7  Game Development / Game Mechanics / Re: 2D Rigid Body Rope Physics on: 2014-07-09 06:21:42
Thank you, I'll check it out!
8  Game Development / Game Mechanics / 2D Rigid Body Rope Physics on: 2014-07-09 06:06:03
I have a simple game created where I can walk side-to-side, and jump.
I have implemented a mechanic to shoot out a "string" or "rope" and it will attach to the sides of the screen.
I have very basic physics in place for the character (a white square), but this does not include mass yet. (I'm unsure whether I'll actually need mass or not for the rope physics).
Eventually, I would like to have a 10-15 segment rope that acts realistically, but for game design purposes, I've decided to use a rigid-body rope for now.

My problem is that I just can't find any resources online about the math involved in such physics.
The rope should have a fixed length, and should swing from the point of attachment on the screen.

P.S. - I have no interest in using a pre-made physics engine, unless the API docs have source code of their math.

Any help on the subject is much appreciated! Cheesy Thanks in advance!
9  Game Development / Newbie & Debugging Questions / Re: 2D Terrain Collision Detection on: 2014-04-24 03:56:27
wouldn't this provide a somewhat loose collision detection? with the result being that the bounding box of the character sometimes going inside the mesh?

or would they be so close together that it wouldn't matter?
10  Game Development / Newbie & Debugging Questions / 2D Terrain Collision Detection on: 2014-04-24 02:23:48
I am messing around with a project, built in the style of a 2D side-scroller game.

The ground will eventually look something similar to this:

What is my best course of action for collision detection assuming the only data I'll have are the 2D Vector coordinates of each vertex on the terrain?
11  Game Development / Game Play & Game Design / Re: Game control interface for Android phone/tablet games on: 2014-04-22 22:29:02
I can't offer any resources or advice on how to actually create this, however; if I were designing the game, I would probably either:

1) use a left/right tilt system to move the character back and forth and tap to shoot.
2) have a digital joystick and a fire button to move the player around

I would assume that android APIs have the tilting somewhat built-in, and the joystick you'll just have to do a little bit of trig to get it right.

Hope this helps you get started Smiley
12  Game Development / Game Play & Game Design / Re: Overall design strategy. on: 2014-04-22 20:29:31
Thank you everyone for the responses! You've all given me some stuff to think about, and hopefully I can use this to get my head in a different state of mind while creating future programs.

One follow-up question though:

Some of you mentioned certain standard program models such as the model-view-controller approach, and the entity structure.

What are some other common structures that I could research to get a basis to work from?
13  Game Development / Game Play & Game Design / Overall design strategy. on: 2014-04-22 01:01:50
I've gotten to the point where I'm fairly comfortable with lwjgl, however; my issue is that when I start a new project, I have issues deciding where to put everything in the overall structure.

ie: I don't know where to put certain rendering methods to make everything easier on myself.

Are there any design structure articles or references that might be of use to me?

or do you guys have any suggestions on how to plan out the structure of the game?
14  Game Development / Newbie & Debugging Questions / Re: Correct way to render thousands of polygons on: 2013-03-20 20:50:45
Yeah I suppose that makes a lot more sense now that I think about it.

However; I may have misled you a little bit in the OP, it's not this program that I'm having FPS issues with, I'm only having issues with it not drawing at all.

Do you see anything important missing? Or anything that might make the objects not be rendered at all?

Oh god I feel dumb.... Lips Sealed

*whispers*forgot to flip the buffers...
15  Game Development / Newbie & Debugging Questions / Re: Correct way to render thousands of polygons on: 2013-03-20 20:33:05
Thanks for the information Cheesy although I believe it's what I already had in my mind. (see Map Class below)

In regards to the 3rd question's answer:

From what I understand, this should draw 1 square (as they're all on top of each other due to the 0L offset), yet nothing is drawn at all.
I'm certain that openGL is set up correctly because I can draw immediate mode just fine. It's something to do with how I'm using the VBOs.

Tile Class:
Map Class:

Edit: lol ignore BufferHelper.reserveData(150000) that was just a hotfix so that I could continue testing
16  Game Development / Newbie & Debugging Questions / Re: Java - LibGDX - Ease Rotation with Speed? on: 2013-03-20 19:36:09
So, if you take out the rotation ease code, it works correctly?

I'm not 100% sure, but it looks like either _rotationSpring or _rotationDamping will affect what you want.  The variables are constant at the moment, and one or both of them need to change according to the speed.  Try messing around with the variables to see which one affects what, and go from there.

I can't tell exactly what's going on with the math because the variable names are so ridiculous..._dr, _ar, _vr...Huh

17  Game Development / Newbie & Debugging Questions / Correct way to render thousands of polygons on: 2013-03-20 19:25:51
I understand that VBOs are currently the best way to render polygons.

Here is what I understand VBO's to be:
(please correct any of the following information if it is wrong)

- Vertex Buffer Objects take an array of data, package it tightly, and send it to the GPU to be rendered.
- The memory must already be reserved on the GPU before the data is sent.
- The goal of using VBOs is to keep the data stored on the GPU for as long as possible (therefore, better for static drawing?)

That being said, I have a couple of questions about them.

1) What parts of the vbo should be done only once, and which need to be called every tick?
2) What parts of the vbo fast and which parts take the most time? (when drawing thousands of polys *wrongly*, it will slow down to about 1fps)

Now, if somebody really feels like helping me:

3) What is the correct way to render a huge amount of polygons with VBOs in the following example:

I'm rendering a 2d environment made up of probably millions of squares (think terraria).  
I have a class for each tile, and a map class that holds 1 list of tiles at the moment.
Should I store the buffer data in the tile class and call it to the map class when needed?
Should I package all of the arrays into one huge array before I send it to a VBO?

Hopefully you've got an idea of what I'm trying to do now.

Any information would be helpful as I'm still a newb! xD

Edit: sorry, forgot to mention that I'm using LWJGL to do this.
18  Game Development / Newbie & Debugging Questions / Re: Widescreen Display without skewing (LWJGL) on: 2013-02-20 08:35:05
Thanks guys.

ra4king: debugging doesn't have much to do with being smart, only with looking in the right places.  I apparently was not.
(you're normally really nice and helpful so I won't hold a grudge Tongue)
19  Game Development / Newbie & Debugging Questions / Re: HD resolution without skewing (LWJGL) on: 2013-02-19 10:36:00
I'm sorry Danny. I wrote the wrong thing.  I meant when the aspect ratio AND the screen dimensions are a 1:1 ratio.  

ps: I know what HD means, please don't be a jerk.
pps: I am well aware of the difference between OpenGL, and LWJGL.

ppps: Your reply was neither constructive nor informative, please reply with a better response next time. But thank you for at least taking the time to read the post I guess...
20  Game Development / Newbie & Debugging Questions / Re: HD resolution without skewing (LWJGL) on: 2013-02-19 05:57:20
The aspect ratio is technically correct, and maybe this is just an issue with OpenGL itself.

When running a game on the source engine (and most other engines), you can look straight down (assuming a 3d environment) and rotate on the y axis extremely fast.

It will produce what appears to be a perfect circle.  With LWJGL using gluPerspective, it creates an oval (unless the aspect ratio is 1).  It's even an issue in one of the most popular titles of our days (Minecraft)

Some might not consider it an issue, but to me, it creates an unrealistic 3d environment.
21  Game Development / Newbie & Debugging Questions / Widescreen Display without skewing (LWJGL) on: 2013-02-19 02:58:12
When working with LWJGL in a 3d environment using gluPerspective (using HD resolution such as 16x9, or anything larger than 1), there is the same amount of viewable space on the (2d) x and y axes.

Because of this, the screen appears to be stretched on whichever side is larger.

I've read that supposedly, multiplying all of the rendering by the projection matrix will fix this, but cannot find anywhere how I would go about doing so.
sorry, misread that tutorial.

I'm pretty confident most people know what I'm talking about, but I might have worded it weirdly. Let me know if you would like screenshots, or if you would like to test it yourself, make a button binding to toggle between gluPerspective(60, width/height, 0.1f, 1000f), and gluPerspective(60, 1, 0.1f, 1000f)

the latter is what I am trying to achieve while still keeping the same screen size (1600x900)
22  Game Development / Newbie & Debugging Questions / Re: Skybox Rendering on: 2013-02-19 02:14:52
Thank you guys! Cheesy

I've had to re-write how I load in textures, but it was worth it! It's working perfectly now Smiley
23  Game Development / Newbie & Debugging Questions / Re: Skybox Rendering on: 2013-02-17 15:46:25
Ahh thanks!

Im not near my computer atm but ive got one question about that code. Is it a one-time binding? Or do I need to do this every render tick?

Itll be nearly 24 hours before I can test this but ill let you know if it works! Cheesy

Really appreciate the feedback!
(LOVE this forum! And the community)
24  Game Development / Newbie & Debugging Questions / Re: Skybox Rendering on: 2013-02-17 12:44:36
1) It was done on the pixel-by-pixel level in Adobe Photoshop CS5

2) No. I'll research this.  If its simple to explain, feel free to explain it on this topic Cheesy

3) Yes they're on every edge, it's probably the wrapping policy that will fix it.

How would I go about separating the skybox image via an algorithm? PNG decoder?
25  Game Development / Newbie & Debugging Questions / [FIXED]Skybox Rendering on: 2013-02-17 11:42:31
So...I've got a working skybox and I'm trying to figure out how I can make it better/more realistic.

In the following screenshot, you can see that there are dark lines where the planes intersect.

I've made sure that the images themselves do not have any such lines.

Some information on how the skybox is rendered:

The FloatBuffer data fed to openGL:

The rendering method:

Also, I know that a new trend in games is to have a spherical skybox.  Should I ditch the old cube-style?

26  Game Development / Newbie & Debugging Questions / Re: Texture with VBOs and Slick library on: 2013-02-13 00:51:49
I found that client state prior to creating this post and when I tried including it with the code supplied in the OP, it crashed the IDE. Ive never experienced that type of crash before and am not sure how to debug it. I can post the crash log when I get home if that will help?
27  Game Development / Newbie & Debugging Questions / Re: Texture with VBOs and Slick library on: 2013-02-12 13:17:40
I figured it had to do with something like that, I just couldn't get a solid answer out of google as to how much memory a floating point number actually takes up.

Thanks for the reply! Smiley
28  Game Development / Newbie & Debugging Questions / [SOLVED]Texture with VBOs and Slick library on: 2013-02-12 12:31:06
Is it possible to use Textures from the Slick2D library in conjunction with VBOs from GL15?  I've got everything working, the image is loaded etc.  I'm just not quite sure how to bind the image to openGL.

I'm currently using only 1 float buffer with position vertices, colors, and texture coordinates.

My FloatBuffer is as follows:
FloatBuffer buffer = BufferHelper.reserveData(32);
      buffer.put(new float[]{
         //position vertices
         x - width, y - height, 0,
         x + width, y - height, 0,
         x + width, y + height, 0,
         x - width, y + height, 0,
         //color vertices
         1, 1, 1,
         1, 1, 1,
         1, 1, 1,
         1, 1, 1,
         //texture vertices
         0, 0,
         1, 0,
         1, 1,
         0, 1

My drawing method is as follows:
public void draw() {
      glBindBuffer(GL_ARRAY_BUFFER, vboHandle);
        glVertexPointer(3, GL_FLOAT, 0, 0L);
        glColorPointer(3, GL_FLOAT, 0, 48L);
        glTexCoordPointer(2, GL_FLOAT, 0, 96L);
        glDrawArrays(GL_QUADS, 0, 4);
        glBindBuffer(GL_ARRAY_BUFFER, 0);

Is there a client state that needs to be enabled?
Am I binding the texture correctly?
Should I be using GL_TEXTURE_2D instead of slick?

Any input would be appreciated, even pointing out bad coding practices! (please do!)

P.S. - if anybody could explain to me why 48L is the correct offset for the colors, that would be great! Smiley

Edit: Sorry, guess I should have brushed up on basic openGL texturing first.  Fixed it by enabling GL_TEXTURE_2D and GL_BLEND. (using a .png)
29  Game Development / Newbie & Debugging Questions / Re: Is a drop of 60 fps to 57 noticeable? on: 2012-10-31 09:10:43 3D they won't, no. But in 2D it is like a GIANT BALL OF PUS RUINING YOUR LIFE.

Cas Smiley

Right you are, haha I've been working in 3D so much, I actually forgot about 2D..... Cry
30  Games Center / Cube World Projects / Re: VBO order of operations on: 2012-10-31 03:44:34
Thanks for the replies guys! That really clears up some things that I didn't know about VBOs!

@ra4king the reason I'm now using FloatBuffer vertexData = BufferUtils.createFloatBuffer(294912); is because I had tried what you suggested prior to posting this, and couldn't get it to work.

I'll take what you guys said, and try to fix my chunk code! I'll update this post after I've attempted it! Smiley


Okay, so...I've tried many things to no avail.

Let me make sure I have things right in my mind. (Note: this is to create a VBO for 16x16x16 cubes)

1) create the chunk-specific FloatBuffer (vertexData) with enough space to hold all indices of all vertices (294912)
2) generate the ID for the buffer (glGenBuffers()) -- there should be only one of these right?
3) run through 3 nested loops (x, y, z) to create the indices
4) put the indices in vertexData
5) after the nested loops, flip vertexData
6) bind the ID generated in step 2, provide the VBO with the vertex data, and unbind the ID generated in step 2
7) after all of the above steps have been completed, run this every draw tick:
public void draw() {
      glBindBuffer(GL_ARRAY_BUFFER, vboVertexHandle);
      glVertexPointer(3, GL_FLOAT, 0, 0L);
      glBindBuffer(GL_ARRAY_BUFFER, vboColorHandle);
      glColorPointer(3, GL_FLOAT, 0, 0L);
      glTranslatef(curx, cury, curz);
      glDrawArrays(GL_QUADS, 0, 98304); //98304 derived from 4 vertices per face and 6 faces (4*6) * (16*16*16)
   } usual I feel extremely dumb because I found out my problem as I was writing this out.
M issue was in glDrawArrays()...I was only allowing enough indices for 1 cube.

I decided to go ahead and post this in case anybody else finds it useful Smiley thanks for the help guys! I still learned a good bit about VBOs from this Smiley
Pages: [1] 2
xTheGamerPlayz (16 views)
2016-09-26 21:26:27

Wave Propagation (225 views)
2016-09-20 13:29:55

steveyg90 (338 views)
2016-09-15 20:41:23

steveyg90 (338 views)
2016-09-15 20:13:52

steveyg90 (376 views)
2016-09-14 14:44:42

steveyg90 (403 views)
2016-09-14 14:42:13

theagentd (434 views)
2016-09-12 16:57:14

theagentd (367 views)
2016-09-12 14:18:31

theagentd (297 views)
2016-09-12 14:14:46

Nihilhis (729 views)
2016-09-01 13:36:54
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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!