Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
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 ... 11
1  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-14 18:27:16
ok so which matrix would I send to the shader?
EDIT: ive fixed it I passed in a vertical scalar which is the height divided by width, then the vertex.y is divided by it inside the shader.
2  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-14 18:06:50
I am wandering what the new form of modelviewprojectionmatrix is , when I try to multiply by it in my shader I get no result. I know that the code would work with it as I tested it in the shader IDE.
3  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-14 11:27:48
i have been and there very good tutorials. I sort of understand, however I am using the lower version shader loading and binding.
4  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-14 01:37:04
so im required to bind it?
5  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-14 01:21:45
so basically ive setup a vertex shader

1  
2  
3  
4  
5  
6  
uniform vec2 transform;

void main()
{
   gl_Position =gl_Vertex+vec4(transform,0,0);
}


I then bind transform per VBO which is done through
int transloc =  GL20.glGetUniformLocation(shaderprogram, transform);
GL20.glUniform2f(transloc,transformationx,transformationy);

going to have to test it tommorow though. thanks for the help
6  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-13 19:25:30
oh ok thank you
7  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-13 18:02:19
yes because once you have bound the value I thought you could stop that and leave the shader active.
8  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-13 15:51:46
No. You want the shader active when you render or else it won't be used!
Oh no not like that I mean activate the linking the attribute then disable it then render then cancel the shader.
9  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-13 13:17:56
I'd advise you to learning OpenGL properly. Here's a link to a great tutorial on modern OpenGL 3.3 along with the ported Java+LWJGL code accompanying each example.
Thanks that has really helped.
So looking at it I would think that firstly when im using the shader I bind the object , I activate the shader variable then I point to it to assign the value , deactivate the shader variable and then render.
10  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-13 00:50:11
Also in your post how would I bind the transformation object you passed into the shader?
11  Game Development / Game Mechanics / Re: Mathematical curves. on: 2014-04-12 22:56:47
You could use the cubic root of an increasing value, the value given by the cubic root plateus fairly quickly. you could have a simple for loop  for(int i= 0; i < 50;i++) {pos = Math.cbrt(i); update();}
12  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-12 22:47:31
Thanks for your help I will try that in a little while however, I am wandering if there is a way to still do it inside the class though. I saw at one point using glmatrixpush() worked but I didnt understand how you would get it to function.
13  Game Development / Newbie & Debugging Questions / Faster transformation with VBOS on: 2014-04-12 22:24:17
Hello, im attempting to use a transformation method to modify my VBOS however I would like to know what toher way I can edit the positions within the VBO without having to create it again. This is how I am doing it at the moment. I get 30fps doing 10000 transformations.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
   public void translate(int x, int y) {
      verticies.clear();
      for (int i = 0; i < position.length; i++) {
         float cx = position[i].getx();
         float cy = position[i].gety();
         verticies.put(cx + x);
         verticies.put(cy + y);
         position[i].setcoordinates(cx + x, cy + y);
      }
      verticies.rewind();
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vertid);
      GL15.glBufferData(GL15.GL_ARRAY_BUFFER, verticies, GL15.GL_DYNAMIC_DRAW);
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
   }


EDIT:
Note is that position is an array of vertex2d objects (not OpenGL ones).
14  Game Development / Newbie & Debugging Questions / Re: Vertex shader on: 2014-04-12 16:19:51
Ive figured it out thanks to the well scripted and documented mercury engine files. No worry nothing is copied I just need to understand exactly how opengl functioned.
15  Game Development / Newbie & Debugging Questions / Re: Vertex shader on: 2014-04-11 22:34:27
Or is there a way to do it outside of a shader but still on the GPU such as glmatrix multiplication but would I need to put these into a new vao each time.
16  Game Development / Newbie & Debugging Questions / Re: Vertex shader on: 2014-04-11 20:04:58
So I understand about sending the attributes to the shader by firstly setting the location and then querying it. Im a bit stuck on how I would send data for each vertex, so say I have a square with v1,v2,v3,v4 and I want to transform each vertex by  vector vc5 how would I bind Vc5 for v1v2v3v4 only but not any other vertex.
17  Game Development / Performance Tuning / Re: Huge lag in voxel engine using lwjgl on: 2014-04-11 14:01:36
ok so what I would do for this is , store all data for the cubes in one big VBO. When you add to the VBO you also have to add your texture coordinates. They are added to the texture buffer in the same position. Im not sure that GL_TRIANGLE_STRIPS would work though.
18  Game Development / Newbie & Debugging Questions / Re: Vertex shader on: 2014-04-10 23:37:55
Ok so ive looked and most of the stuff inside the shaders seems fine however How do I send data to the shader Per Vertex for its new coordinates or rotation.
19  Game Development / Newbie & Debugging Questions / Vertex shader on: 2014-04-10 22:30:42
Hi , im trying to learn shaders but im finding it difficult due to the lack of tutorials and the complexity and lack of explanation with the ones that are up on various websites. I was wandering if anyone either new of some tutorials or could run me through a few things. I am simply trying to make a shader that performs the transformations on a 2d object in a 2d space , so a rotation on the z axis and translation.
20  Discussions / General Discussions / Re: languages and learning on: 2014-03-25 23:23:17
well I think it may also be the tutorials we using it litterally jumped straight from basic stuff to TKINTER and designing that kind of thing.
21  Discussions / General Discussions / languages and learning on: 2014-03-25 23:00:09
Well ive just started learning two languages, one in school and one externally, in school we are learning python from books and outside of school I am learning C++ from a very nice website. I am personally finding python much harder to learn and I am not sure wether its the way I am learning it or its the formatting of the language. Ive found C++ very easy to grasp as to me it makes sense , when im coding I understand why the function is called what it is and preciesly what it does however with python I find im always having to look for the bit of code or the bit of syntax.
22  Games Center / Showcase / Re: Project Raft - An Indie Shipwreck Survival on: 2014-03-19 21:59:32
It sadens me that you want to make people pay to buy this when others who have created better works give theirs out for free.
23  Game Development / Newbie & Debugging Questions / Re: Done with "core" Java , but now... on: 2014-03-17 17:06:13
So the proceedural generation is it somewhat random. What I would do for the object is list some component shapes and connectors that can be "stretched". You could apply set rules to when using the components this would create more natural modular stations.
24  Discussions / Miscellaneous Topics / electronics: inverter on: 2014-03-12 18:31:30
Hi , im trying to build an inverter to produce high voltage and I wandering if this circuit design will work . Im quite new to electronics.
http://gyazo.com/3fe3f5fe24ae8199a35f61004daf0ed6 ((wouldnt let me put it as an image Sad ))
25  Discussions / General Discussions / Re: Ever forget how your own code works? on: 2014-03-12 16:58:59
yes thats why i make like 100 classes to create a button xD
do you use it with supers like Component > GUI > graphics component > button or button>button.....
26  Games Center / WIP games, tools & toy projects / Re: Procedural 2d Pixel Vessels / Space Ships on: 2014-03-09 20:35:10
I must say these look epic. I think they would go great for the kind of "The ship is a living thing" games.
27  Game Development / Game Play & Game Design / Re: RPG armor/weapon system? on: 2014-03-08 20:54:22
rotation and drawing it ontop is probably the easiest way. you can do 8 different sprites however you will have memory issues if you have thousands of items.
28  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-08 20:33:11
So I was watching the video,  it seems like the thing is ai controlled maybe make it so that you have to control each ship so to keep it flying you need to get people to shovel fuel into he engine and that if you run out of fuel it splats to the floor(not sure if thats what brought the big one down) . That said there is huge potential in this and I would willingly play this and have a lot of fun. ps love the graphics Smiley
29  Game Development / Newbie & Debugging Questions / Re: First Person Shooter with LWJGL on: 2014-03-03 21:40:33
For the gradients of the projectile if you use the same rotation math for a block but instead for where you are firing. I would store my values as floats then you can directly calculate the gradients using basic trig.
30  Game Development / Newbie & Debugging Questions / Re: Tips on making a Voxel engine on: 2014-03-03 21:38:06
There are many ways to perform "invisible face" culling. Most of them use fairly simple ideas one of them is very easy to implement however the other is harder (but if done correctly a lot faster), So the first method is to calculate each faces normal then compare it to the cameras normal. Upside of this is it is fairly easy to implement and can be extremely effective however the downside is that if you have two blocks infront of each other and dont account for the visibilty of both one can be drawn ontop of the other when its not supposed to. The second method is to use raycasting, this can be much more complex due to implementation, you have to account for the cameras rotation , position , the block rotation and wether the block is visible or not. Upside is that GPUS are designed to perform these tasks with ease and the fact that the ray can be canceled after you have done one block is useful and can drastically improve performance. These methods can be implemented together which each raycast block only showing the faces required dependent on the first method and not having to do this to every block.

Of course you can choose the method and I would recommend asking the community if there are any better methods that they know of.
Pages: [1] 2 3 ... 11
 

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

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (20 views)
2014-04-15 18:08:23

BurntPizza (16 views)
2014-04-15 03:46:01

UprightPath (29 views)
2014-04-14 17:39:50

UprightPath (14 views)
2014-04-14 17:35:47

Porlus (30 views)
2014-04-14 15:48:38

tom_mai78101 (55 views)
2014-04-10 04:04:31

BurntPizza (112 views)
2014-04-08 23:06:04

tom_mai78101 (212 views)
2014-04-05 13:34:39

trollwarrior1 (181 views)
2014-04-04 12:06:45

CJLetsGame (187 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!