Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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 ... 63
1  Java Game APIs & Engines / OpenGL Development / Re: VBOs on: 2014-07-21 02:00:42
@OP: You have a chunk system right? If so, have 1 VBO per chunk.

Also, 33000 doesn;t sound right for GL_MAX_ELEMENTS_VERTICES. I can't check right now, but are you sure you called glGetInteger(GL_MAX_ELEMENTS_VERTICES) because I think you may have just read the enum value.
2  Java Game APIs & Engines / OpenGL Development / Re: VBOs on: 2014-07-21 00:03:18
Since this thread seems to be filled with a lot of misinformation, I'll do my best to give a recommendation, although I can't guarantee that what I say is 100% correct either.

The purpose of all buffer objects to reduce the number of opengl calls.

VBOs do this by A) buffering all the data into one draw call; and B) redrawing the same buffer multiple times.

The optimal use of VBOs is one that takes advantage of both those aspects. The less VBOs you have, the less draw calls. Therefore wherever possible you should try to fit as much data as possible into one VBO.
However, some data may change more frequently than others. If you have some data that never changes, some data that changes every X frames, and some that changes every frame, you should be putting each group into a different VBO. (Another thing to note is that for data that irregularly changes, you should try and group it in a way that it changes at the same time to avoid unneccessary rebuffering)

Furthermore, you can hint to the GPU how often you the data should be changing. There's no guarantee that this will increase performance, but there's no loss and a potentially decent gain.
For data that changes every frame, use GL_STREAM_DRAW.
For data that never changes, use GL_STATIC_DRAW.
For data that is somewhere in the middle, use GL_DYNAMIC_DRAW.

Finally, there is a 'magic number' that gives you the optimal maximum size of a VBO. 'GL12.GL_MAX_ELEMENTS_VERTICES'. The closer you can get to this number without going over, the more efficient your VBOs will be.
3  Discussions / General Discussions / Re: What? Your game isn't a pixelated retro masterpiece? on: 2014-07-19 07:35:06
Quote
What makes your time more important than theirs?

Simple. My hourly rate versus theirs.
???

Quote
I'm not planning to do an LD1-30 back to back for nothing. I know there's massive monetary gain for me in doing such.
???

Quote
In fact, if I can manage even just 6 back to back, that makes me better than you by a massive longshot.
???

I am lost. Can you please explain those 3 statements, and what relevance they have to this discussion?
4  Discussions / General Discussions / Re: What? Your game isn't a pixelated retro masterpiece? on: 2014-07-19 07:10:07
Quote
and then give it to them for free to use instead. If you can't do that, then you don't have the right to (unconstructively) criticise, because you're admitting yourself that you can't do what they'd have to do.
No. One does not exert effort and give it for free. If they write a check, then certainly. I also have other plans.

So do the developers. They don't have time to do all the extra work of making more complex art for no benefit do they?

What makes your time more important than theirs?
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-19 05:27:06
I look at the first equation like this:
-1*2^2=-4

When written out like that, it is easier to see why the outcome is 4

It should still be -4.

-1*2^2        Starting equation
-1*4             Solve exponent
-4                 Multiply
6  Discussions / General Discussions / Re: What? Your game isn't a pixelated retro masterpiece? on: 2014-07-19 05:23:48
Pixel art is not better or worse than other styles of art.

It is just that: A style of art.

No style of art is superior to another. Different people like different styles more. I mean, some people spend thousands of dollars on some artist's paint spill. If someone can see art in a mess of paint, how many more people can find art in some novice low-res graphics.

Furthermore, if executed poorly, bad art is bad art, regardless of style.

Some art styles are easy to pick up and hard to master, while others are hard to get started, but when you get there, are easy to master. A programmer's main 'art' is really in their code and design, and not all of us can make art that meets everybody's expectations.

Finally, if you want to (unconstructively) criticise someone's art for their game, first make art that's better then theirs, and then give it to them for free to use instead. If you can't do that, then you don't have the right to (unconstructively) criticise, because you're admitting yourself that you can't do what they'd have to do.
7  Games Center / WIP games, tools & toy projects / Re: Moon Lite on: 2014-07-18 01:24:47
Looks suspiciously similar to Magicite.

Edit: In fact, the character in the video is directly taken from the game. Sad
8  Discussions / Miscellaneous Topics / Re: How would you define "Coding Experience"? on: 2014-07-17 06:21:26
Just put what you think is appropriate.
IIRC, the purpose of it was so member of the forum could judge how much experience someone had more accurately than forum rank. It doesn't really matter that much.

Too little and you're selling yourself short.
Too much and we'll be able to tell.

No point in looking like a person who's been programming for years but knows as much as someone who's been doing it only months.
9  Game Development / Newbie & Debugging Questions / Re: Did you know? Hints and tips on: 2014-07-15 00:40:58
I believe these versions are more succinct:   Roll Eyes  
P.S.: rx is w/2 & ry is h/2!

1  
2  
3  
public boolean isColliding(Actor a) { // CENTER coords.
 return x >= a.x-rx & x < a.x+rx & y >= a.y-ry & y < a.ry;
}


1  
2  
3  
public boolean isColliding(Actor a) { // CORNER coords.
 return x >= a.x & x < a.x+w & y >= a.y & y < a.y+h
}



Those methods you posted are exactly the methods that are beaten ~2x by my code. Short code does not equal fast performance.

If you want the short versions:

1  
2  
3  
4  
5  
6  
7  
8  
9  
public boolean collides(AABB aabb)
   {
      return Math.abs(x - aabb.x) < w + aabb.w && Math.abs(y - aabb.y) < h + aabb.h);
   }

   public boolean inside(float ox, float oy)
   {
      return Math.abs(x - ox) < w && Math.abs(y - oy) < h;
   }
10  Game Development / Newbie & Debugging Questions / Re: Did you know? Hints and tips on: 2014-07-14 23:48:13
I've posted these on the forum before, but I may as well do so again.
They're quite simple, but judging from the amount of people who don't know about them, maybe they're not so obvious.

1. You can cut AABB collision checks almost in half by changing the internals.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
public class AABB
{
   public float x, y; // The centre of the AABB.
  public float w, h; // The extent (distance from centre to edge) of the AABB. Half of the actual width/height

   public boolean collides(AABB aabb)
   {
      if(Math.abs(x - aabb.x) < w + aabb.w)
      {
         if(Math.abs(y - aabb.y) < h + aabb.h)
         {
            return true;
         }
      }
      return false;
   }

   public boolean inside(float ox, float oy)
   {
      if(Math.abs(x - ox) < w)
      {
         if(Math.abs(y - oy) < h)
         {
            return true;
         }
      }
      return false;
   }
}

It's not actually as well known as it should be.

2. A reliable and cross-platform way to get the location of the executing jar file.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
   public static String jarDir()
   {
      try
      {
         return new File(SomeClass.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();
      }
      catch(URISyntaxException e)
      {
         e.printStackTrace();
         return null;
      }
   }

And obviously the file of the jar itself can be obtained by removing the getParent() call.
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-13 23:47:44
DISCLAIMER: This is Rust, not Java.
DISCLAIMER 2: This is not what I did today. It actually took me about 2 days.



A voronoi graph generator and renderer.

And here's one with 2048 nodes:

12  Java Game APIs & Engines / OpenGL Development / Re: VBO and Shaders on: 2014-07-09 07:02:06
I think it's been said before, but the stride should not be zero.
13  Java Game APIs & Engines / OpenGL Development / Re: VBO and Shaders on: 2014-07-09 06:55:04
Could it be a case that you've transformed the camera the wrong way and you're just not looking at what's being drawn?
14  Java Game APIs & Engines / OpenGL Development / Re: Regarding Shader Attributes on: 2014-07-09 04:25:48
I don't think you can use immediate mode and shader attributes together.

The function you're looking for is `glVertexAttribPointer()`, but it's for use with VBOs or VAOs.
15  Java Game APIs & Engines / OpenGL Development / Re: VBO and Shaders on: 2014-07-09 03:06:03
Shouldn't it at least render a black box if it doesn't have color?

Depends on what colour you're passing in with your shader.
16  Java Game APIs & Engines / OpenGL Development / Re: VBO and Shaders on: 2014-07-08 22:47:07
Try simplifying it down to just vertices, get it working, and then build back up, and then it will be easier to find where you are going wrong.
17  Game Development / Newbie & Debugging Questions / Re: For advice on where beginners should go to start making games on: 2014-07-07 03:52:18
No one tutorial can teach you exactly how to do something. Chances are you'll have to follow heaps of tutorials before you even get a basic game working.

You could try the cokeandcode tutorials. They're not perfect, but I remember finding them quite helpful when I started.

Of course, not very many tutorials (including the above) are aimed at people new to programming. You will probably need to learn Java before you follow along tutorials.

For learning Java, follow these three in this order:

http://docs.oracle.com/javase/tutorial/getStarted/index.html
http://docs.oracle.com/javase/tutorial/java/index.html
http://docs.oracle.com/javase/tutorial/essential/index.html

For learning programming, there's not much we can help with. It's something you have to work out yourself.

Finally, Google is very useful. Use it when you can to solve problems.
18  Game Development / Newbie & Debugging Questions / Re: For advice on where beginners should go to start making games on: 2014-07-07 02:34:33
Read articles and tutorials rather than watch videos.

Haven't watched a single video tutorial and I like to think I'm doing fine.
19  Discussions / General Discussions / Re: Rock Simulator 2014 funded on IndieGoGo on: 2014-07-05 23:42:00

I don't know why people were expecting a bull**** game to not cause a bull**** reaction.
20  Games Center / WIP games, tools & toy projects / Re: Mortal Terminus on: 2014-07-05 06:09:01
You could blur the shadows.

I'm not sure how you render things at the moment, but you could draw the shadows to an FBO, and then blur it when rendering onto the main framebuffer.
21  Games Center / Featured Games / Re: Droid Assault now on Steam! on: 2014-06-30 05:02:23
A friend got me the Ultrabundle about a week ago for my birthday. (Again, $2.50)

I have been playing way too much Droid Assault lately.

Although I'm stuck around the level 35-40 mark. The danger level at 35 destroys most of my droid army, and I'm left struggling to recover in time for the boss. After the boss, I'm low on transfers, and the droids are dangerous due to their numbers, but weak on their own, and so useless when I transfer to them. And then the assassin droids...

Still, it's a great game, and despite my steam library doubling over the last week, I've played this one game for more than double the time of the next best. Cheesy
22  Discussions / Miscellaneous Topics / Re: Integrated Graphics on: 2014-06-29 06:42:48
Most people (on linux) run the x server on their integrated chip, and offload graphics-intensive games to the dedicated GPU.

Because that's what hybrid graphics are designed to do, and it works very well.
23  Game Development / Game Play & Game Design / Re: The ultimate sandbox game on: 2014-06-25 07:49:02
A true sandbox is where the player never runs out of things to do.

This either requires extreme low-level mechanics (currently too costly) or randomly generated mechanics (not reliable enough). Anything else would require the developer to create mechanics faster than the player could explore them.

Personally, I think people need to take a break from making sandbox games. Each new one adds about one new feature, and the rest has all been done before. For anything awesome to come out, it needs to be fresh.
24  Game Development / Newbie & Debugging Questions / Re: Java is broken on my machine - What do? on: 2014-06-24 04:00:20
Also try checking the PATH variable.
25  Discussions / General Discussions / Re: Apple announces new graphics API: Metal on: 2014-06-19 07:08:29
Not sure how that would go down.

I'd rather have Android on an iPhone than iOS on an Android Phone.
26  Game Development / Newbie & Debugging Questions / Re: When would one be ready to create advanced game engines on: 2014-06-19 06:31:50
I know some people create game engines with it and then create their game, but It seems like that would need in depth experience from college. I'm years away from college and think such knowledge would be tasty.
There are a fair number of people on this forum still in highschool that have managed to learn this stuff. It may take time, but it can be done with nothing but internet resources.

Quote
how the heck do you understand this?
By not diving in the deep end.
From what I've seen from you, you're way ahead of yourself. You need to build up your understanding of different concepts over a long time. Trigonometry may seem boring and pointless at first, but it is a must for 3D graphics.

A great way to learn is to read up on concepts well before you'll ever use them, so your brain has already had a bit of experience with the ideas before you come back and revise them for actual implementation.

The thing with learning to use LWJGL is that there are no real tutorials for it, and you have to pull in resources from all over the internet, including several in C++. I'm hoping to write a proper tutorial on how to use raw OpenGL for graphics, but it's taking time and I don't always have the motivation.
27  Discussions / Miscellaneous Topics / Re: Longest program you have written? on: 2014-06-18 10:02:31
Guardian is currently 9084 (excluding my personal libraries. Personal libraries included I get 14451 LOC)
The archived 'Guardian II' was about 15233 lines. Just as well I rewrote it.

Paint.JAVA is currently ~13000 lines, although some amount of those were written by Longor1996, BurntPizza, and some other contributors.

My voxel engine is a mere 2481 lines.

My Ludum Dare entries are all around 2500 LOC, with the exception of the 7dRTS which was 6069. (Which you'd expect from a longer competition)

Of course, a fair number of those lines aren't technically code.
28  Discussions / General Discussions / Re: Apple announces new graphics API: Metal on: 2014-06-18 07:23:07
If you're not a fanboy, you surely must work for Apple.

I stand by my original point:
Quote
If any standard is to work it must be open.
29  Discussions / Miscellaneous Topics / Re: Interesting Profile pictures on: 2014-06-17 23:27:15
Just to clear up any confusion, mine is not a picture of me.
30  Game Development / Game Play & Game Design / Re: Efficient game maps and Scrolling on: 2014-06-17 08:45:22
http://www.cokeandcode.com/main/tutorials/tile-maps/
Pages: [1] 2 3 ... 63
 

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

The first screenshot will be displayed as a thumbnail.

Riven (12 views)
2014-07-29 18:09:19

Riven (10 views)
2014-07-29 18:08:52

Dwinin (9 views)
2014-07-29 10:59:34

E.R. Fleming (26 views)
2014-07-29 03:07:13

E.R. Fleming (10 views)
2014-07-29 03:06:25

pw (40 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (27 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!