Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
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 ... 11
1  Game Development / Newbie & Debugging Questions / Re: Matrix not working in shader on: 2014-03-14 22:48:25
It's actually faster to create a FloatBuffer containing the matrix and then passing the matrix to the program as a uniform value. This is because shaders are run for every vertex/fragment, meaning that if you recalculate the matrix in the shader, then it's recalculated for every vertex/fragment. This is the same reason that matrix multiplication is better to be done on the CPU.

Oh and by the way, this is the orthographic projection matrix:
left, right, etc.

The translation, scale and z-Axis rotation matrices are easy to find if you don't know them already.
2  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LibGDX]Do we really need OrthographicCamera? on: 2014-03-13 21:45:28
This makes no sense.

Its a perspective matrix. There is no translation or rotation.

I'm not sure what you mean. The Camera class holds a view and a projection matrix. The view matrix is the combined translation, rotation and scale transformation whereas the projection matrix is set to the orthographic projection matrix.

i.e the view matrix describes the camera orientation and the projection matrix describes the camera lens (field of view, zoom, etc.)

Just to note here that View matrix is inverse of camera transformation.

And to explain why, it's because when you're transforming the camera, you're actually transforming the vertices of all the meshes in the "world" (in space). The camera does not exist, it's simply an object that calculates and holds the matrices which describe the transformation of vertices. Matrices are used since they simplify the calculations that are needed to describe a transformation. When you want to translate "the camera" on the X axis +100px, you're actually wanting to transform all the vertices that are drawn in the world -100px.
3  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LibGDX]Do we really need OrthographicCamera? on: 2014-03-13 19:53:14
If you want to set the coordinate system to Y-down then you can simply call setToOrtho(true) when you create the camera, or you can change the up vector to (0, -1, 0) and the direction vector to (0, 0, 1), which is pretty much what that method does (note that you have to call update to recalculate the matrices).
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LibGDX]Do we really need OrthographicCamera? on: 2014-03-13 18:12:39
This makes no sense.

Its a perspective matrix. There is no translation or rotation.

I'm not sure what you mean. The Camera class holds a view and a projection matrix. The view matrix is the combined translation, rotation and scale transformation whereas the projection matrix is set to the orthographic projection matrix.

i.e the view matrix describes the camera orientation and the projection matrix describes the camera lens (field of view, zoom, etc.)
5  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LibGDX]Do we really need OrthographicCamera? on: 2014-03-13 17:35:46
The Camera classes are designed to try and hide all of the maths behind calculating the projection of vertices in space. They're pretty much there for the Layman to use. I personally find it easier to use the Camera classes even though I understand the maths behind 3D projection transformation, simply because they do all the necessary calculations for you.
6  Game Development / Newbie & Debugging Questions / Re: Pixel Problem. on: 2014-03-10 16:26:47
Don't use Strings, it's unnecessary.
7  Java Game APIs & Engines / OpenGL Development / Re: VBO performance on: 2014-03-10 16:20:48
The whole idea of sprite batching is to group vertex data together in batches. The basic design model that you should follow is like so:

        set up matrices --> collect data  --> upload data to buffer object --> render,    repeat

Let me give you an example. If you've used LibGDX before, you'll have noticed that the sprite batcher requires you to call the begin and end methods, and between those method calls you have to add the sprites to the batch. The begin method simply sets up the matrices, enables blending if used and if using shaders it prepares the shaders and their variables. When you add in data to the batch, it stores the data (probably in an array, I'm not sure tbh) and then when you call the end method is flushes the batch (uploads the buffer objects data and renders it all), then disables blending.

Since indexed drawing is effectively useless, you'll want to use interleaved vertex buffer objects.

Oh and may I recommend that you move on to OpenGL 2.0 and learn how to use shaders after you're done with buffer objects. It's a big step learning the maths, and despite what others have said about sticking to immediate mode, they're still useful for 2D.
8  Game Development / Newbie & Debugging Questions / Re: i got a problem with buttons on: 2014-03-10 13:39:59
@VirtueeL You're such a good troll by the way.
Oh I'm oozing sarcasm today.
9  Game Development / Newbie & Debugging Questions / Re: i got a problem with buttons on: 2014-03-10 13:34:08
1  
public ButtonState buttonState = ButtonState.DOWN;
10  Games Center / Contests / Re: [IDEA] 1 Hour Game Jam on: 2014-03-10 13:15:50
No, no, I didn't mean it that way. You don't seem to understand.  Stare
11  Games Center / Contests / Re: [IDEA] 1 Hour Game Jam on: 2014-03-10 12:54:08
That would be interesting too, a game jam where debugging a single time would result in DQ.
Are you joking?
12  Discussions / Miscellaneous Topics / Re: What's your rig? on: 2014-03-10 12:49:39
You are aware we could just go around in circles here, right? We test it on what we have, it would be impossible to test for every hardware configuration.

If you're testing a game on a good computer then there's a chance that you're assuming that it'll run fine on a cheap computer, possibly meaning that you'll lose a good chunk of your target market.

However your statement was just stupid and asking to me smacked imo.

What.

I wasn't trying to win a debate, Troubleshoots. I was trying to get my point across, my point being that you are acting really immature.

- Jev

Sorry, I'm bored of pixel art.
13  Discussions / Miscellaneous Topics / Re: What's your rig? on: 2014-03-10 12:39:49
Guys, break it up, and let it be.

- Jev

Nice way to win a debate, might use this one some time.
14  Discussions / Miscellaneous Topics / Re: What's your rig? on: 2014-03-10 12:32:42
That being said, those topics are about development rigs, not gaming rigs, and that's why I find them interesting.

Yeah amazing computers really help with development. Allows you to open up your IDE 10 seconds faster.

Yeah, who needs to test there games at 60fps, totally overrated. As long as it loads right?

Yeah games shouldn't run at 60fps on cheap and basic computers. You don't even need to make sure that they work on cheap and basic computers. The target market all have $5000 super duper awesome computers with built in nuclear reactors.
15  Discussions / Miscellaneous Topics / Re: What's your rig? on: 2014-03-10 12:15:10
That being said, those topics are about development rigs, not gaming rigs, and that's why I find them interesting.

Yeah amazing computers really help with development. Allows you to open up your IDE 10 seconds faster.
16  Discussions / Miscellaneous Topics / Re: What's your rig? on: 2014-03-10 12:07:53
Don't get me started.  Angry

One of these old, show off, who even cares, boring, typical gaming forum threads...
An even older, show off, who even cares, boring, typical gaming forum thread.
17  Game Development / Newbie & Debugging Questions / Re: Compile and Debug Java on: 2014-03-10 11:36:42
**yawn**

IDE wars v242.
18  Discussions / General Discussions / Re: Family problems because of programming? on: 2014-03-10 11:05:54
As a 29 year old who is old enough to possibly be close to your dad's age...
Sorry you made me chuckle. Are you trying to say something there?

I live with my fiance atm, at first she was bitching something rotten because on my days off and the weekend I would sit at the computer 0700-0300 without rely talking to her, reading, forum browsing, coding etc.

I've made more time now but my progress is defo hampered by it.

However after having a talk with her, she needs to understand that if I don't study and practice, I'll be working in McDonald's by the time I am 25.

If I would do that my gf would kick me out of the house, and I cant say I would blame her.
I can't tell if you're talking about sitting at the computer 7 till 3 or working in McDonalds.

OT: If you don't have family problems, you don't have a family, but then again, you probably still have family problems.
19  Discussions / General Discussions / Re: Making everything by yourself. And loving it! on: 2014-03-10 10:42:36
For the past month or so I've been using LibGDX and for the 3 months before that I was using LWJGL, attempting to create my own game engine. Though I wouldn't say that that 3 months was a waste, as I learnt a lot of the maths and the jargon, I would say that attempting to create my own game engine was a painstaking long, and in the end boring process. After switching to using LibGDX everything became much more fun as I'd actually started making a game.

In the end you'll eventually get bored. Have fun at the start though. Smiley
20  Game Development / Game Play & Game Design / Re: RPG armor/weapon system? on: 2014-03-08 20:12:24
It's simple. If you have lets say 10 different hats, you could create 10 head sprites facing forward, 10 facing left, 10 facing right and 10 facing backwards. You could do the same for the body, legs, feet and hands.
21  Games Center / Showcase / Re: Flap Cat ! (not a flappy bird clone) on: 2014-03-08 19:37:40
Looks cool. Sadly I can't try it out, though I just wanted to share a quick tip for drawing good looking clouds. If you use the oval tool in an image editor and just draw 6-7 circles, you can end up with something like this (not the best result I've gotten) in two minutes.



Make sure to disable anti-aliasing if you want to get a blocky effect. Smiley
22  Game Development / Newbie & Debugging Questions / Re: Why should I use a Game-Engine like lwjgl or libgdx instead of Swing? on: 2014-03-05 15:21:55
You cannot make 3d games in swing. You can only make really simple 2d games in swing. The reason is performance. opengl is just plain faster..
Though what you're saying is generally correct, I find this quite misleading. First off, it's possible to create 3D games in Swing, though impractically difficult. Also, you cannot directly compare the speed of OpenGL and Swing. OpenGL is a low level graphics specification, however Swing is a high-level graphics API.

Op: LWJGL contains an OpenGL binding which allows you to take advantage of the speed of the GPU, by manipulating data at a low level. Doing so allows you to optimise the handling of data to increase the performance of your game. It also makes 3D graphics programming much easier than if you were to have to do it in Swing for many reasons which I can't be bothered to go into. LibGDX on the other hand is a mid level framework which hides most of the low level code. It is based on OpenGL ES which allows you to develop multi-platform games which work on Desktop, Android and iOS.
23  Game Development / Newbie & Debugging Questions / Re: New to java, where do i start? on: 2014-03-04 21:39:35

Just some general thoughts:

If there's one thing you shouldn't do, it's jumping straight into game development. For a start, learn the language. Use whatever works for you. To counteract what other people recommend, I personally don't think that watching videos is a good way to learn, as all you're doing is copying and pasting/reading the code that is written. People generally make a lot of mistakes in their videos and teach you bad practices. That said, keep an open mind. They're useful for getting a basic idea of some programming concepts.

What worked for me was reading The Java Tutorial, Googling things that I didn't understand, and just writing programs that did some simple calculations. After I felt confident enough and I'd learnt a good bulk of the language, I started exploring game development and learnt the rest of the language from there.

2.

https://www.eclipse.org/
24  Game Development / Game Play & Game Design / Re: Is this game made in Perspective or Ortho Projection? on: 2014-03-03 21:09:48
It seems as though the image of the school is an orthographic projection yet below that it's a perspective projection. When the depth is increased, the orthographic projection moves upwards. The sprites are all orthographic and are scaled at certain depths.

It does seem quite odd though.
25  Game Development / Newbie & Debugging Questions / Re: [GLSL/LIBGDX] Using shaders on: 2014-03-03 17:11:39
Solved. Five hours wasted.
26  Game Development / Newbie & Debugging Questions / Re: Libraries vs. Pure Java on: 2014-03-03 17:07:24

LWJGL:

Pros:
  • Low level, a lot of flexibility
  • Maintained, up to date

Cons:
  • Relatively difficult to use
  • A lot of work to do
  • Desktop only

Slick2D:

Pros:
  • Easy to use

Cons:
  • Unmaintained & old
  • Desktop only

LibGDX:

Pros:
  • Relatively easy to use
  • Multi-platform, iOS, Android & Desktop
  • Maintained, up to date
  • Access to low level code
  • Scene2D
  • Lots of good documentation

Cons:
  • Requires some LWJGL/OpenGL knowledge
27  Discussions / General Discussions / Re: Plagiarism on: 2014-03-03 16:44:59
The mobile gaming industry is a disgusting place.

Sadly it's close to inevitable that you have to enter that marketplace to be successful nowadays. While PC is still a widely available and widely used platform, the mobile industry is hacking off a big chunk of the potential market. Though I despise of the pay-to-win culture in the mobile industry, I cannot blame those that take part in it. Business will always go wherever there is a demand from the consumer, which is unfortunately pay-to-win. Pay to play simply does not appeal to the consumer any longer.
28  Game Development / Newbie & Debugging Questions / [GLSL/LIBGDX] Using shaders (solved) on: 2014-03-02 23:09:20

Previous issue, for our ancestors.

Problem: nothing rendered.
Solution: don't set pedantic to false and then you can see your compile errors.

Another previous issue, for our ancestors.

Problem: texture is rendering black.
Solution: texture was 10000px by 100px. It now works as I changed it to 100px by 100px.
29  Game Development / Game Mechanics / Re: Corners of rotated rectangle wrong on: 2014-03-01 21:26:22
That's not actually a rotation matrix. These are the three axis rotation matrices.



You'll want to use the last one. You have to find matrix (dot) vector.
What you're doing currently should work though; just make sure you're translating after you're rotating.
30  Games Center / Showcase / Re: Project Raft - An Indie Shipwreck Survival on: 2014-02-27 00:00:47
I'm interested, how many sales?
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.

CogWheelz (18 views)
2014-07-30 21:08:39

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

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

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

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

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

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

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

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

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

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