Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (595)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (646)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 ... 10
 1 
 on: 2015-07-06 01:07:29 
Started by Therobodavo - Last post by Therobodavo
Ok thank you for clearing up mesh's and how quad's are a simple form of them. I get how the textures work with quads, but the thing I still don't get is this. The way I was rendering each object before I used VBO's, each vertex would be based off of an x and y, and that would run every frame. So in a sense, those coordinates would be updated every frame based on the x and y of the object. Now, with VOB's, those coordinates are made and stay the same no matter  what x and y change to. That's because the coordinates are created once, and saved.

I'm actually using the transform method in game my currently

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
   public void moveRight(float length)
   {
      direction = 1;
      //Safely moves right by the length provided if possible
      if(canMove("Right",length) == true)
      {
         //checks if the user will stay in the position it should and can actually move to where it wants to
         if(this.x < 350 && (this.x + length) <= 350)
         {
            this.x+= length;
         }
         else if(this.x >= 350)
         {
            GL11.glTranslatef(-length,0,0);
            this.x += length;
         }
         //GL15.glBufferSubData(GL15.GL_ARRAY_BUFFER, 10, vertexData);
      }
   }

This is used in moving left, and right for the player.

From my understanding, this moves the entire world, since what acts as a "camera" is always looking at the same place. I have this all working just fine for the moment, but it doesn't translate single objects in a game. Maybe I have a misunderstanding with glTranslate, but I would think I need to update the coords for the VBO still. Also I get how the texture is static and I just need to change the texture coords (even though I've never done it before), but Idk. I'm not changing the size either atm, just the location.

Anyway, I think my confusion lies based on one thing you said.

Quote
I think some of your confusion is in thinking that the mesh and/or texture somehow have to 'move' if your entity moves. They don't. The mesh and texture can be entirely static and unchanging; you move the entity by changing the transform.

I thought the transform method transforms the world... so I guess my mind is just blown lol. Maybe the 2 zeros are what dictates that. I feel like a OpenGL noob xD But really, if the transform method is a llot more flexible than what I think, my life may be a lot easier.

 2 
 on: 2015-07-06 00:52:21 
Started by BurntPizza - Last post by chrislo27
I finally combined the block and item animations into the asset registry so I only have to call dispose() on one thing and everything will be taken care of! Grin

On a side note, I tried to design the first boss in my game. Since she'll be the first step in unlocking the first major part of the tech tree related to cloning, she'll be called Lady Redundant Woman.

I love that name.

 3 
 on: 2015-07-06 00:50:20 
Started by tommohawkaction - Last post by MrMapcom
Check some Googles : https://www.google.es/search?q=a8-6410+gta+v&ie=utf-8&oe=utf-8&gws_rd=cr&ei=Pc2ZVafMH4KBUZDfh4AE
And Steam: http://store.steampowered.com/app/271590/

I will struggle but able to run it (using the GPU and not only the APU).
BTW, both processors have almost the same power. So the real difference is the GPU and the amount of RAM. And for the power those laptops have, you wont get to use 12GB RAM in a game, that amount maybe useful if you play with Blender or some video editor.
Is up to you. Pointing

 4 
 on: 2015-07-06 00:43:11 
Started by wessles - Last post by wessles
More levels / musics. Same feedback as before. Please specify the level for each score.

EDIT: almost forgot, you have to go into your home folder and delete a file called .[username]_rflexscore if you have already tested the game.

 5 
 on: 2015-07-06 00:39:20 
Started by Therobodavo - Last post by Jesse
Quote
Now regarding batching, I've never worked with this before and have no clue what to do with it. So I may just be missing what you're saying, but I don't know what to do exactly to move the coords for each "creature/texture". If batching is the way to do it, I still have no clue how to do it with VBO's xD.

To keep things simple, let's forget about batching for now. It's just an optimization, and one that you may not even need.

Quote
I guess the thing I'm still stuck on is.. so the vertex Vbo I have saves the data for the location. You're saying a static mesh doesn't change, but for a game the texture for each creature/item/entity can and most likely will move. Therefore the data will change, so I would need to do something to chanhe that data That's what I thought the SubData mathod was for, but I didn't understand how that was done.



I think I understand buffers... but I guess the way data (x,y) for each vertex is stored/changed is a little unclear for me cause Idk what to do to change it :/

Although I think I understand what you're getting at above, there are several things there that are inaccurate or incorrect as stated. There are probably some things that need to be cleared up conceptually here. Apologies if this seems too basic, but it might be worth clarifying some terminology.

A mesh, as you probably know, is a collection of data such as vertex positions, texture coordinates, and so on that can be used to render something. (The quads you're working with are meshes, just simple ones.) A texture is an image that's 'painted' onto mesh geometry. For a simple 2-d game, entities are often just quad meshes with a single texture (I think that's what you're doing).

A transform specifies how some set of geometry should be positioned, oriented, and otherwise shaped and placed in the world. Transforms can be pretty complex, but for a 2-d game all you usually need is translation (the position of the object), and maybe scale (its size) and orientation (what angle it's at). If your entities don't change size and never rotate, all you need is translation (position). In the OpenGL fixed-function pipeline, there's a family of functions (e.g. glTranslatef() and so on) that allow you to specify the transform for the next draw call.

An entity in your game will typically consist of a mesh, a texture, and a transform. I think some of your confusion is in thinking that the mesh and/or texture somehow have to 'move' if your entity moves. They don't. The mesh and texture can be entirely static and unchanging; you move the entity by changing the transform.

So:

mesh+texture+transform = entity

Mesh and texture are static, transform changes as needed.

Once again I'll stop there due to length, but maybe that will help clear things up a bit.

 6 
 on: 2015-07-06 00:24:20 
Started by aclimb - Last post by Paddi27
Please have a look at my project http://www.java-gaming.org/topics/java-2d-multiplayer-coop-rpg/35974/msg/340836/view.html#msg340836 and tell me if this is something you had in mind. This is a typical top down perspektive which is used by the most rpgs. I could give you a few tips for example on tile based map rendering and using programms like Tiled a graphical map building tool which will save a lot of work for you.

 7 
 on: 2015-07-05 23:53:44 
Started by Therobodavo - Last post by Therobodavo
I guess the thing I'm still stuck on is.. so the vertex Vbo I have saves the data for the location. You're saying a static mesh doesn't change, but for a game the texture for each creature/item/entity can and most likely will move. Therefore the data will change, so I would need to do something to chanhe that data That's what I thought the SubData mathod was for, but I didn't understand how that was done.

Now regarding batching, I've never worked with this before and have no clue what to do with it. So I may just be missing what you're saying, but I don't know what to do exactly to move the coords for each "creature/texture". If batching is the way to do it, I still have no clue how to do it with VBO's xD.

I think I understand buffers... but I guess the way data (x,y) for each vertex is stored/changed is a little unclear for me cause Idk what to do to change it :/

 8 
 on: 2015-07-05 23:42:02 
Started by BurntPizza - Last post by basil_
i didn't leave my cave.

 9 
 on: 2015-07-05 23:33:55 
Started by tommohawkaction - Last post by tommohawkaction
The first one has a better GPU and I think 8GB RAM is ok. You wont get to play new games at Ultra Settings, but theyll work. And in the end, laptops are not for gaming.

For the HDD, do you really need that much? And you can get an external HDD for the difference, or dont store so much junk.

The one which has the better graphics card, do you think the processor which is a apu be able to handle games for example (GTA 5 ultra low I know it is a bit extreme but just wondering)

 10 
 on: 2015-07-05 23:30:56 
Started by Therobodavo - Last post by Jesse
Quote
What do you mean by static meshes?
Quote
Also if you wanna explain more about SubData feel free.

Well, I admit it can be a little hard to explain, but I'll try to answer both the above questions in one go.

First, by 'static' I just mean that the mesh data never changes after you initially create it.

When you allocate a buffer in OpenGL (using glBufferData), you get to supply a hint for how you expect the buffer to be used. For example, you'd specify 'static' if you never expect to change the buffer data after the initial upload, or 'stream' if you expect to change the data frequently. To the best of my knowledge these are just hints and don't actually have any effect on what you can or can't do with the buffer later, but for performance reasons you should try to choose a hint that matches how you intend to use the buffer.

In simple terms, glBufferData and glBufferSubData do the following:

- glBufferData allocates memory for a buffer, and optionally allows you to upload data to the buffer as well.
- glBufferSubData allows you to upload data to a buffer that's already been allocated via glBufferData.

So, glBufferData is more or less required (that is, you have to call it at some point if you want to use the buffer at all), but glBufferSubData is entirely optional and only need be used if you want to update the data in an existing buffer for some reason.

A lot of times in OpenGL you just want to create a mesh and never change it. This is often referred to as a 'static' mesh both because 'static' means unchanging, and also because the corresponding OpenGL usage hint is called 'static'. So whenever I say 'use a static mesh' I just mean to create a mesh once using glBufferData (with the 'static' usage hint), and then never change it.

Sometimes however you want to modify the data in an existing buffer. There are a lot of use cases for this: batching (like I was describing earlier), animation, deformation, and so on. The use case that could be of immediate interest to you, I think, is batching. But, to repeat myself, I don't think you necessarily need to start with that, as it can be a little complicated.

That's pretty long already, so I'll stop there, but feel free to ask for clarification if you need it.

Pages: [1] 2 3 ... 10
 
deepthought (47 views)
2015-06-30 15:39:44

deepthought (51 views)
2015-06-30 15:39:09

deepthought (62 views)
2015-06-30 15:36:52

Za\'Anzabar (38 views)
2015-06-29 05:44:54

TritonDreyja (47 views)
2015-06-24 17:10:40

CopyableCougar4 (46 views)
2015-06-23 00:34:45

BurntPizza (52 views)
2015-06-21 20:36:46

cookiecompiler (93 views)
2015-06-11 15:42:53

cookiecompiler (55 views)
2015-06-11 15:41:14

NegativeZero (80 views)
2015-06-11 09:49:18
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14
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!