Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (578)
games submitted by our members
Games in WIP (499)
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 ... 10
1  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Draw between 2 layers of the same VBO on: 2014-04-16 20:02:51
I can't see any problems. All I would say is check the position of "verticesChange" and "texVerticesChange" before each "put." That's generally the cause of problems but I can't see any reason it wouldn't work here.
2  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Draw between 2 layers of the same VBO on: 2014-04-15 18:46:45
I agree but without code, I can't help diagnose bugs. If I were you, I would look at the contents of the VBO before adding the extra data versus after adding (you can use the glGetBufferSubData() function) for debugging purposes. It can be extremely tedious but often will reveal the pattern which will let you solve the bug.
3  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Draw between 2 layers of the same VBO on: 2014-04-15 17:02:20
You need to change the way you think about VBOs. A VBO is just a list of numbers, think of it as an array on the GPU.

So if you have an array of data in Java and you wanted to add more data to it, how would you do it? You can't, you would have to reinitialize the array with a larger size and copy all of the original data into it and then put the new data in as well. Exactly the same with a VBO in OpenGL. If you want to add more entries, delete the VBO and create a new VBO with enough space.

And you can always create a VBO larger than you need at that moment. Leave the bits you aren't using empty and don't draw them.

So essentially what you need is a system to manage each VBO. It needs to remember what bits of the VBO are being used and which bits are not. When you want to "delete" an entry, mark it as not being used and don't draw it. When you want to "add" an entry, overwrite a section that isn't being used. If there are no sections that aren't being used then you have to reinitialize the VBO with more space or use a different VBO.
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Draw between 2 layers of the same VBO on: 2014-04-12 18:23:48
So disable depth testing. Draw the background, draw the foreground, draw the frame.
5  Discussions / General Discussions / Re: Blender Character Animation formats on: 2014-04-12 18:17:43
I use the COLLADA file format myself (.dae), it's an open, xml based file format done by Khronos (the guys in charge of OpenGL, OpenAL, OpenCL etc.) so they know a thing about making good stuff. I had to write my own importer but it isn't that complicated and since it's in xml you can easily spot the causes of bugs etc.

I'd be happy to share my importer if you'd like except that it is still a little incomplete and I'm sure there are far better ones out there. I just like doing things for myself. But if you want to look at it for whatever reason then ask away.
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Draw between 2 layers of the same VBO on: 2014-04-12 15:29:09
If the VBO is large enough then yes, you can use any of a couple of functions to change the data in the VBO.

glBufferSubData(): http://www.opengl.org/sdk/docs/man2/xhtml/glBufferSubData.xml
glMapBuffer(): http://www.opengl.org/sdk/docs/man2/xhtml/glMapBuffer.xml

If the VBO is no big enough then no you can't. But all you have to do is create a VBO big enough for whatever you might need in the future. Anything you aren't using you can just leave empty.

A little LWJGL tutorial here on glBufferSubData: http://lwjgl.org/wiki/index.php?title=The_Quad_updating_a_VBO_with_BufferSubData. It's part of a series but you can take a look at the source code at the end for a summary.
7  Java Game APIs & Engines / OpenGL Development / Re: GL_MAX / LibGDX problem on: 2014-04-08 23:46:47
From your description, to me it sounds like you don't want blending enabled at all. Obviously I've got that wrong but perhaps you could explain a little more clearly or with a picture of what you want to be happening. Or perhaps it is just me being thick and everyone else will understand.
8  Games Center / Showcase / Re: [Android Libgdx] 2048 Power of Two on: 2014-04-01 16:25:17
Why don't you explain what the difference is from "2048" before anyone accuses you of just cloning the game. Not that there is necessarily anything wrong with cloning but, if that's what it is you should come out and say it.
9  Java Game APIs & Engines / OpenGL Development / Re: Tile based terrain lighting on: 2014-03-30 15:52:08
What type of blur are you using? Because it seems to me that a Gaussian blur would look a lot smoother than what you are doing now.
10  Discussions / General Discussions / Re: Should I learn LWJGL/OpenGL on: 2014-03-29 15:30:21
+1 @LiquidNitrogen

There are plenty of good beginners tutorials for LWJGL specific OpenGL. And if you are looking to understand the lower end stuff a little more then you won't need to put much time in to understand the simple bits. Once you understand all the simple bits then the complex bits aren't that much more difficult. And the work you've done in LibGDX will probably help you out.

So you may be in for a shock but just keep at it and it'll all fall into place. And even if you don't end up writing your own games from the ground up then that extra understanding will always be an asset.
11  Games Center / Showcase / Re: Xenotron - Retro space shooter on: 2014-03-28 21:53:44
If you are going to implement vibrations, for goodness sake give an option to turn them off. Firstly, a lot of people don't even like vibrations when they use XBox/PS controllers, and phone vibrations tend to be more "annoying" if you know what I mean. Secondly, vibrations eat up battery. If you've already got all these nifty graphics burning through the battery, a lot of people aren't going to appreciate you adding vibrations to that.

I'm not saying don't do it, I'm saying give people the option to disable it.
12  Discussions / General Discussions / Re: Scripting Language on: 2014-03-26 23:46:48
Also there are Java "ports" of scripting languages to allow them to run in the JVM. The ones I've used are Ruby (in the form of JRuby) and Lua (in the form of Kahlua). Lua is the one I recommend for scripting and Kahlua was also very helpful (when I used it I had to hack and slash with a lot of the lua backend which was almost simple in Kahlua).
13  Game Development / Newbie & Debugging Questions / Re: 2D sprite animation using OpenGL ES 2.0: How to swap texture coordinate buffers? on: 2014-03-24 08:07:12
Happy to help.
14  Game Development / Newbie & Debugging Questions / Re: 2D sprite animation using OpenGL ES 2.0: How to swap texture coordinate buffers? on: 2014-03-23 20:49:35
The solution is to do it in shaders. You can simply increment the texture coords in the shader based on a uniform variable. This is essentially the equivalent of the function from GLES 1.1 that you mention. Since you didn't come to this conclusion yourself I'm guessing you don't know about shaders. They are very important in any modern graphics and I seriously advice you to learn about them before doing anything else. Seriously if you knew about shaders, this would be child's play to you.

Link to good tutorial: http://www.lighthouse3d.com/tutorials/glsl-tutorial/. Weird, this is the third time I've linked this site in as many days.
15  Java Game APIs & Engines / OpenGL Development / Re: 2d shader lighting on: 2014-03-22 12:06:16
http://www.lighthouse3d.com/tutorials/glsl-tutorial/. I advise you take a look through this. From the thread's title, you clearly know of shaders but the fact that you can't figure out how to do some 2D lighting with them suggests to me that you don't know how to use them. This tutorial will take you through that.
16  Game Development / Newbie & Debugging Questions / Re: How to transfer lighting code from vertex shader to fragment shader? on: 2014-03-19 00:01:06
No that's completely a DirectX thing. There is a loose equivalence between DirectX shaders versions and OpenGL shader versions but A) I don't know it so you'd have to look it up and B) it's only a rough and ready rule and might not be accurate.
17  Game Development / Newbie & Debugging Questions / Re: How to transfer lighting code from vertex shader to fragment shader? on: 2014-03-18 21:52:24
Try working through these tutorials before you try to implement any kind of per-fragment lighting.
http://www.lighthouse3d.com/tutorials/glsl-tutorial/
18  Games Center / WIP games, tools & toy projects / Re: audio dsp on: 2014-03-13 22:53:30
I for one would love to have a tool like this to mess around with. Are you thinking of releasing a demo? I believe the interest would be there since to my knowledge there isn't an open source tool like this out there and the commercial ones are quite expensive for casual hobbyists like most of us.
19  Game Development / Newbie & Debugging Questions / Re: Inquiry about attribute locations in glsl on: 2014-03-13 00:02:25
And pre GLSL 1.4 you can assign it in the program with glBindAttribLocation(): http://www.opengl.org/sdk/docs/man2/xhtml/glBindAttribLocation.xml
20  Games Center / WIP games, tools & toy projects / Re: "NXBG" Hexagon-Multiplayer-Tactic-Game on: 2014-03-11 00:13:47
Looks very pretty (I like hexagons too). The lighting is very pleasant to look at but somehow I don't think it's actually lighting at all. At least not the conventional phong/specular etc. And I love how it took me several minutes to realize that random hexagonal columns aren't natural formations. To me it gives the ambiance of an extremely playful game. I hope you'll keep that aesthetic.

I'm curious as to whether you're going to go for hexagon based players? I'm thinking of meshes made completely of hexagons. Might be really cool. Probably be super ugly. I'm no artist so I can't quite imagine it. Maybe partially comprised of hexagon at least? Damn, you got me babbling about hexagons now.

So what does NXBG stand for? Would that be German for "Hexagon-Multiplayer-Tactic-Game?" Because if so you might want to think up a snazzier title too? Something about hexagons I'd guess.

Also in your post you wrote "fractions" whereas I think you mean "factions." A fraction is that mathematical thing with a numerator and denominator. Like 1 / 2. A faction is a group of like-minded individuals working towards the same goals. Like NOD & GDI in CnC Tib Wars.

The above and the fact that there is no playable demo for me to indulge myself in are the only qualms I have so far.

Edit: Sorry I got a bit carried away there.
21  Discussions / Miscellaneous Topics / Re: Math problem on: 2014-03-05 23:03:05
I'm pretty sure that isn't possible to solve. There are three unknowns and only two sets of data. What is the context? Are you sure there isn't any more information?

Edit: Sorry, I didn't realize x and y were natural numbers. Read it but didn't take it in. @The Lion King has got it.
22  Discussions / Business and Project Discussions / Re: Looking to create a small dev team on: 2014-02-25 18:15:00
I have PM-d you with offers of myself and a musician.
23  Discussions / Business and Project Discussions / Re: Looking to create a small dev team on: 2014-02-24 21:45:18
So what role do you play in this team?
24  Discussions / General Discussions / Re: new Youtube? on: 2014-02-22 09:36:20
Although I have no technical basis to make a statement like that, purely from a user experience point of view, I think they did make it better before they started making it worse.
25  Discussions / General Discussions / Re: new Youtube? on: 2014-02-22 09:27:24
The fact that you can make awesome technology like google search engine, doesn't mean you can make awesome video website..

The really annoying thing is that they did make an awesome video website, now they seem to be on a feature rampage which is trampling over all their original hard work. Whether you like the new features/layouts or not, it's as if they have forgotten the meaning of debugging. Every single thing they do seems to cause problems for quite a lot of people.

What they need is some proper competition because at the moment they literally have a monopoly. Some competition will force them to put some proper thought into what they are doing and (I can't believe I'm criticizing Google about this) inject some innovation into the mix.
26  Game Development / Newbie & Debugging Questions / Re: Open World Map Generation Feedback on: 2014-02-21 18:42:07
And http://docs.oracle.com/javase/tutorial/java/javaOO/nested.html there you go. Can be extremely useful stuff. Also I don't mean to patronize but in case you don't know about it, read about anonymous classes (there's a C thing called something like that - I can't remember exactly what - but don't be fooled, they are not the same thing) because when I learnt Java that wasn't even on the tutorial and I didn't know about them for several weeks. It made understanding other peoples code so much harder.
27  Game Development / Newbie & Debugging Questions / Re: Open World Map Generation Feedback on: 2014-02-21 18:38:05
1  
short one = 1;

should compile. It does for me.

You were sort of right though with the method calling. In my defense I avoid using shorts and bytes because of this very problem. You should however be able to do:

1  
new StarMap_block( (short) (center_x - 1), (short) (center_y + 1), stage)


The one thing I got right was not using "one" as a defined constant.

And as @Roquen says, it is actually quite hard to cause a memory leak in Java without using native code.
28  Game Development / Newbie & Debugging Questions / Re: Open World Map Generation Feedback on: 2014-02-21 18:16:10
In the interest of correctness (since we're there anyway) your resource names are slightly wrong.

In science a superscript number after an element refers to an isotope of that element.

So U232 is Uranium-232, the isotope of Uranium with a relative atomic mass of 232. Likewise with He3. Those are fine.

The problem is that the "2" in H20 and O2 is referring to the molecular formula and so it should be done with subscript. "H2O" and "O2". Also if you are going to refer to Oxygen as O2 you should probably refer to Hydrogen and Nitrogen as H2 and N2 as they are generally diatomic molecules as well.

Sorry, I don't like to pick holes but if I don't, someone else will.
29  Game Development / Newbie & Debugging Questions / Re: Open World Map Generation Feedback on: 2014-02-21 18:09:43
So is your question about Java syntax then?

1  
short one = (short)(1);


No - "short one = 1;" would be fine. Obviously defining a constant like this is a bad idea but I see why you did it. Just don't.

1  
new StarMap_block((short)(center_x-one),(short)(center_y+one), stage)


Again no. As long as this constructor expects shorts then you don't need to cast to shorts. If the constructor expected int s or long s or something then Java would automatically convert them to that type. byte s are another matter.

Also for your information "StarMap_block" is not a Java class name convention. In Java we do camel case starting with capital for class names. Letters and numbers only. No underscores. So I would change it to StarMapBlock. Or you can make it a static nested class (define the class inside another class and make it static) in which case it would be referenced as "StarMap.Block" or you can import it and just reference it as "Block." I know your coming from C and you aren't used to it but if you are looking for help on a Java forum, it annoys some people when they see stuff like this. Also "embrace the native culture" and stuff.
30  Discussions / Miscellaneous Topics / Re: for loop? on: 2014-02-20 20:06:17
I wasn't trying to imply that you didn't know what a for loop did. I thought we were just posting our thoughts on the for loop.
Pages: [1] 2 3 ... 10
 

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

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

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

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

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

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

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

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

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

CJLetsGame (197 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!