Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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 ... 151
1  Discussions / General Discussions / Re: JGO Kickstarter on: 2014-04-14 21:36:14
Whoa, you're only 29!
2  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-14 02:12:46
If you are using 2.0/2.1 or compatibility profile, then you can just keep using gl_Vertex and bind the data using glVertexPointer. If you are using core, then you create your own attributes and bind the data using glVertexAttribPointer.

If all of this is flying over your head, please do read the tutorials I linked Smiley
3  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-14 01:31:52
Watch out, you're learning 2.0/2.1 OpenGL. gl_Vertex is deprecated in the core profile (GL 3.0+) and removed in 3.1+
4  Game Development / Newbie & Debugging Questions / Re: Faster transformation with VBOS on: 2014-04-13 01:04:22
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.
5  Discussions / General Discussions / Re: What hosting do you use for your websites? on: 2014-04-13 00:01:05
I prefer getting my own VPS and doing things myself. I went with DigitalOcean's $5/month VPS, which gives you a 20GB SSD, 512MB of RAM, and 1TB bandwidth. I've setup Ubuntu Server 12.04, installed Nginx, PHP, and MySQL, and installed Wordpress. I also setup SSL/TLS on it!
6  Discussions / General Discussions / Re: JGO Kickstarter on: 2014-04-03 04:31:43
EgonOlsen, it was an April Fool's joke, although I was ready to donate $102 for the blue duke Smiley
7  Discussions / General Discussions / Re: JGO Kickstarter on: 2014-04-01 05:31:14
I know I haven't been on JGO for many months (hell, I have 45 pages of unread stuff!) but it's been so valuable to me and others that I'm willing to donate almost every penny I have.
8  Games Center / Featured Games / Re: FarSky on: 2014-03-22 18:54:03
I'm so unbelievably impressed you improved this game this much and got finally greenlit on Steam! Congratulations Tim, and good luck with the release and beyond!
9  Games Center / 4K Game Competition - 2014 / Re: Java4k Launcher (v1.1) on: 2014-01-24 03:57:14
Yup with Java 7u51 and after, ALL applets and webstart applications must be signed and the permissions attribute set. These are easily google-able though so it's pretty easy to sign your application and set the permissions.
10  Discussions / General Discussions / Re: A Reminder To Everyone Here on: 2014-01-24 03:50:38
When the hell is this thread going to be moved to the ChitChat monster?

Or if not it's not bad enough enough for the monster, some mod should close this.
11  Games Center / 4K Game Competition - 2014 / Re: Java4k Launcher (Final) on: 2014-01-12 00:43:53
Java4K.exe doesn't work and neither does the JAR. Running the BAT file works.
The error with the JAR is a NullPointerException in File's constructor when you call it at line 80 of your Security class.

Also you should add judge comments Smiley
12  Discussions / General Discussions / Re: A Reminder To Everyone Here on: 2014-01-11 15:47:41
I hope you understand my point and probably change your attitude towards people making grammatical mistakes in english. Smiley
Well it was mostly a joke but I meant it towards people who actually LIVE in an English-speaking country. Foreigners are exempt from the rule Smiley
13  Discussions / General Discussions / Re: A Reminder To Everyone Here on: 2014-01-11 15:29:42
I judge people based on how many grammatical errors are in their posts. Grin



Also, terribly sorry to revive a 1-month old thread, but I'm going through 17 pages of unread JGO stuff Cheesy
14  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Questions on: 2014-01-04 01:14:58
You seem to confuse attributes and uniforms.

Attributes are per-vertex data, for example: position, color, texcoords, etc..., anything that is unique per vertex. If you are drawing an object that has 50 vertices, you upload all 50 positions, colors, texcoords, etc... to your VBO and tell glVertexAttribPointer which index each attribute is assigned to as well as enough info for it to know how big each of those 50 vertices are. When rendering with any glDraw* command, your currently bound vertex shader is called 50 times, once for each vertex. After that is done and all clipping/perspective division/rasterization happens, your fragment shader is called for each fragment (without anti-aliasing, you get 1 fragment per pixel rendered).

Uniforms are, well, uniform across that draw call. Before you call any glDraw* command, you can change your uniforms however you like. Once it's called, each vertex/fragment shader has the same uniforms. That's how you have the same matrices across all 50 vertices and the same texture bound for each time the fragment shader is called for example.
15  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Questions on: 2014-01-03 23:55:45
I hate not knowing how something works. Sad
Me too! However, knowing how the W/perspective divide works requires studying matrix theory and linear algebra. You can probably find resources online if you really really want to Smiley

Why are the frustum scale, zNear and zFar variables defined as uniform? I thought that uniform variables were used when the variable should be changed regularly. Why aren't they just defined as attributes, i.e in?
Uniform variables are variables that are applicable to all vertices rendered together, for example your matrices are the same for every vertex in some object.

Meanwhile, attributes are per-vertex data.

When you say above layers you mean local space, world space and camera space?
Yup.
16  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Questions on: 2014-01-03 23:22:10
What I've always been confused about and what I still don't understand is the meaning of the W coordinate. What does it represent? Up until now I've always got the impression that the W coordinate is just a normalized Z coordinate, but that doesn't really make sense. All I can find on Google is "dividing by W converts clip space to NDCs". Maybe it explains it further on in the book, but I want to understand the maths behind all the projections before continuing.
That's really all you need to know, I promise. The 'W' coordinate will always be 1 as far as you're concerned (except for directional lights where it will be 0, but that is for the Lighting chapters Cheesy). Multiplying the camera world positions with the perspective matrix sets a "special" 'W' value in clip space that, divided into the XYZ components, will produce the correct NDC coordinate.

How can it be an infinite space? Why is +Z further away when in clip space -Z is further away?
In mathematical terms, it is infinite space because nothing is limiting where you place your objects. Technically, it is finite as it extends from the maximum and minimum you can fit into a 32-bit float Smiley

And again, don't worry about clip space and NDC. You will never deal with them, and that chapter just likes being complete and explaining how things work under the hood. Just remember that in camera space and above layers: -Z is forward.

EDIT: I found a nice little flowchart that shows the steps your vertices take to get from your vertex data to the screen:


Your vertex data first gets transformed by your Model-View Matrix (Model Matrix multiplied by View Matrix) where the Model Matrix positions the vertex (in Object Space) at its place in the world (World Space) followed with the View Matrix positioning the World Space vertex relative to the camera, aka Camera/Eye Space (where (0,0,0) is your camera). The Camera Space vertices are then transformed by the Projection Matrix into Clip Space (which you should never need to deal with), Perspective Divide into NDC space, and finally stretching NDC space onto the GL Viewport.
17  Discussions / General Discussions / Re: what do you code on? on: 2014-01-02 05:19:25
Those desktop shortcuts are just all my Steam games......as a reminder of how I really need to start playing them. I buy buy buy without playing any of them.
18  Discussions / General Discussions / Re: what do you code on? on: 2014-01-02 02:58:54
From the last time this was asked, I haven't upgraded much other than the OS is now Windows 8.1 x64 and I added a 120GB OCZ Vertex 4 SSD.

I'm actually thinking of upgrading my graphics card to the GTX 770, but I'm trying to limit my spending! Cheesy

I code on IntelliJ IDEA for Java, Visual Studio 2012 and 2013 for C#, and Sublime2 for C++.

Here's an updated picture btw:
19  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Questions on: 2013-12-30 12:28:55
Now about the
glBindVertexArray(glGenVertexArrays())
thing:
First of all these two functions have nothing to do with what is also called VertexArrays (drawing directly some client array). They create and use something called VertexArrayObject(VAO) which was introduced in OpenGL 3.
What this OpenGL object does is that it has an own copy of the global vertex-attribute state(glVertexAttribPointer, glEnableVertexAttribArray). When you bind such an object all following calls which change an attribute state does change the VAO state and not the global state(global == VAO with id 0).

So you can create one VAO for each model(your VBO now) you have and only have to set the attributes once. After that, to render one specific model you only have to set the shader and VAO. So only 3 function calls are needed to render something.

I see, thanks. Does calling glGenVertexArrays() when the buffer is bound associate the buffer with the VAO, or is the association made another way?
Hehe, another thing the Arcsynthesis tutorial made sure to be clear about (in Chapter 5).
- The association of the currently bound ARRAY_BUFFER with the currently bound VAO only occurs at the glVertexAttribPointer(...) call.
- The association of an ELEMENT_ARRAY_BUFFER and the currently bound VAO only occurs when you bind the buffer.

For either, after the condition is met, you can freely unbind the buffers, as the VAO now has a copy of the pointer.

I want to clarify why this is in my code. In core OpenGL, there's no more global VAO. It is now required to bind a VAO before any draw calls. Since the Arcsynthesis tutorial doesn't cover VAO's til Chapter 5, it just binds one and doesn't use it yet.

This should also explain why you get an error when you remove it Wink

I see. May I suggest adding a comment explaining this, especially since someone could confuse VAOs with VAs.
You're right. I'll go through and add that comment to each example that has that line. In fact, I think my code just needs to be more commented. Arcsynthesis's code is weird sometimes.

Yup, and the other 99% of the questions in this thread are answered in the first 7 chapters, so read thoroughly OP Smiley

I'd find it a lot easier if the book didn't say "this is explained in a later tutorial". I prefer to understand why I'm writing what I am.
Well it's quite difficult to explain everything at once. Patience, my friend. Smiley
20  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Questions on: 2013-12-30 01:33:04
Yup, and the other 99% of the questions in this thread are answered in the first 7 chapters, so read thoroughly OP Smiley
21  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Questions on: 2013-12-29 22:35:04
So in the end
glBindVertexArray(glGenVertexArrays())
is quite pointless to do because the id from the Gen call isn't saved and can't be reused.
I want to clarify why this is in my code. In core OpenGL, there's no more global VAO. It is now required to bind a VAO before any draw calls. Since the Arcsynthesis tutorial doesn't cover VAO's til Chapter 5, it just binds one and doesn't use it yet.

This should also explain why you get an error when you remove it Wink
22  Game Development / Newbie & Debugging Questions / Re: OpenGL: Can you use a mixture of old and new OpenGL functions? on: 2013-12-26 09:28:35
That OpenGL function is not deprecated. That LWJGL method is deprecated. It is now called glGetShaderi(int, int) Smiley

See here for more details about this change: http://lwjgl.org/forum/index.php?;topic=4721.0
23  Java Game APIs & Engines / OpenGL Development / Re: Back to openGL on: 2013-12-26 08:15:40
LWJGL groups functions and enums by the version they were introduced in. OpenGL 1.5 (GL15) introduced VBO's. OpenGL 3.X (GL3X) uses and builds on them.
24  Java Game APIs & Engines / OpenGL Development / Re: Back to openGL on: 2013-12-26 07:17:22
This actually brings up a really rough spot with me. So I know that we are in the OpenGL 4.X range in terms of what is 'up to date'. I know that 2.1 and down is legacy. And Then 3.0 becomes all shaders (No more fixed function pipeline). So in your opinion ( or anyone that wants to weigh in on this) I kinda want to support legacy hardware, but do you think I should just skip them and go on to 3.0? I mean is it a big impact?
Most computers today support OpenGL 2.1 and it's pretty safe to make that your base supporting version. Shaders were introduced in 2.0, so you're still fine. It's only 3.1 that everything fixed function was deprecated. I would suggest you learn modern OpenGL 3.3 first, as it becomes much easier in my opinion to learn older versions.

Dear god that is a horrible name... I thought these were separate objects the whole time

And the part about the struct, yeah I wish you could do this, when I made a SpriteBatcher in DX11 that was awesome. You can just pop them in on a Map call and you were good to go
They are separate objects. VBO's store plain old data that you upload. VAO's store which VBO's are being used and how.

And structs can't be used for input attributes. They can, however, be used as uniforms. Smiley
25  Java Game APIs & Engines / OpenGL Development / Re: Back to openGL on: 2013-12-26 06:36:59
Nope, vertex shader input attributes cannot be objects. Attributes also don't have to be only vertex, color, or index. That link you posted shows deprecated functions glVertexPointer and glColorPointer. Those were the old ways of doing things. Now, OpenGL doesn't care what data is position or color, they're all inputs to your vertex shader! You control how the data is sent and processed, and how the output results.

VAO's just hold state: which VBO's are used, which attributes they map to, and any index buffers if used.

I don't know of any resources that teach 2D OpenGL only, as it's best to usually learn how to do 3D with it and then 2D becomes simple.

A really good tutorial I recommend that covers modern core OpenGL would be this: www.arcsynthesis.org/gltut
That tutorial's code is in C++ though, so I ported it to Java+LWJGL: www.bitbucket.org/ra4king/lwjgl-shader-tutorials/
If you're not interested in focusing on 3D much, then I would recommend going through chapters 1-7 and 14-16 only.

Another excellent resource is our own Davedes's tutorials: https://github.com/mattdesl/lwjgl-basics/wiki
26  Java Game APIs & Engines / OpenGL Development / Re: Back to openGL on: 2013-12-26 05:21:40
An index buffer IS a VBO. A Vertex Array Object doesn't store vertex data, but holds state.

Maybe you should re-learn OpenGL from scratch Smiley
27  Game Development / Newbie & Debugging Questions / Re: OpenGL: Can you use a mixture of old and new OpenGL functions? on: 2013-12-26 05:19:57
New versions build (or deprecate) on older versions. LWJGL simply has the functions and enums grouped into the version they were introduced in. You can use all that's appropriate and necessary.
28  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Questions on: 2013-12-25 07:48:10
Also another quick note, LibGDX uses OpenGL ES so its versions are different from OpenGL. GL ES 1.X was fixed function, GL ES 2.0 is programmable. There's now GL ES 3.0 which adds more goodies to the programmable pipeline.
29  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Questions on: 2013-12-24 01:13:27
Beware, glVertexPointer and glColorPointer are deprecated and not part of core OpenGL.

Concerning your question, "first" is the first index to start at, as defined in the docs (which you should most likely try to reference more often Wink). If you want to render everything, you start at 0 and "count" is how many vertices there are.
30  Discussions / Miscellaneous Topics / Re: javadoc tool doesn't document all overloaded methods on: 2013-12-21 21:03:24
JGO should send you an email by default. Check your settings.

Considering your problem, is there any way you can see what parameters Eclipse runs the Javadoc tool with?
Pages: [1] 2 3 ... 151
 

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 (63 views)
2014-04-15 18:08:23

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

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

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

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

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

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

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

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

CJLetsGame (215 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

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
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!