Java-Gaming.org Hi !
Featured games (88)
games approved by the League of Dukes
Games in Showcase (679)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (731)
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 ... 73
1  Game Development / Performance Tuning / Re: Faster way to find primes? on: 2016-03-14 18:55:31
You can skip over all multiples of 2/3 by incrementing in steps of 6 (starting at 0) and checking the number above and the number below.
2  Game Development / Newbie & Debugging Questions / Re: Video playing in game on: 2016-03-13 20:25:54
I have a suggestion...

Could you guys load in the video then provide the option to EXPORT the video in a raw-ish file.

I think it would be beneficial to everyone if...

> BMP-like header
> Image-like pixel storage

All I want to do is grab the initial pixel data given the data from a header and invoke each change to the pixel data over a course of time specified in the header.

<3

Do you have any idea how massive the file would be?
3  Game Development / Game Mechanics / Re: How To Rotate/Position a Camera at a Point on: 2016-03-10 05:00:29
http://mywiki.wooledge.org/XyProblem

I, along with other members of the forum, are perfectly happy to help you learn this stuff if you're willing to put in the effort. But we're not going to waste time solving all your problems when other libraries (in this case, JOML) have already done that.
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2016-03-10 03:27:22
I opened it to look at it and when it didn't explain to me what the coefficients and subscripts were I kind of just assumed and then got bored within two minutes.

Having this sort of attitude is a sure way of never learning anything. Maybe certain concepts came to you easily in the past, but that's no guarantee that it is always going to be the case.

Math is not easy. Programming is not easy. Learning any field beyond a few basic ideas is not easy. If you don't understand something you have to look for explanations, and explanations for those explanations, etc. until you finally get it.
If you find yourself in way over your head, it's probably because you're trying to learn something without the proper foundations of previous concepts, in which case you need to take a step back and learn all those.

If you want to become good at something, you have to work hard at it, whether it's interesting or not.
5  Game Development / Game Mechanics / Re: How To Rotate/Position a Camera at a Point on: 2016-03-10 02:07:12
Quick guide to your average "lookat" camera matrix:

You treat your matrix as a set of 4 columns, X, Y, Z, W, where each column is a 4-component vector.

The 4th component of the X, Y and Z matrices is 0. The 4th component of the W matrix is 1.

The first 3 components of the Z vector are a 3-dimensional vector representing the direction the camera is facing.
The first 3 components of the Y vector are a 3-dimensional vector representing the "up" direction of the camera (which direction will be 'up' on the screen).

The first 3 components of the X vector are a 3-dimensional vector representing the left/right (depending on your coordinate system) direction of the camera, ie: what direction is left/right on the screen. This vector can be derived from the previous two vectors through the cross product operation.

The first three components of the W vector are the position of the camera.

Therefore, set the W column/vector to the location of the camera.
Set the Z column/vector to the direction the camera is facing ((target - camera).normalize())
Use various vector math trickery (which I can't remember off the top of my head) to get the Y column.
Set the X column to the cross product of the Z and Y vectors.

To pan, you translate the target point.
To zoom, either move the camera closer to the target, or decrease the FOV (they will create somewhat different effects).
To rotate, you move the camera around the target in a circle.
6  Java Game APIs & Engines / OpenGL Development / Re: Culling faces on: 2016-03-10 01:49:53
I can't prove anything and they can't prove anything. There was nothing else to say.

The internet is emotionless and I am dealing with everyone who assumes any emotion or meaning.
If I were to attack someone over the internet, I would call myself stupid.
If I were to try to make sarcasm over the internet, I would call myself stupid. (Unless message saying *sarcasm* ya kno)

I've been holding back on posting this for a while now, but I guess it seems appropriate.
I happen to have saved the ending of our little discussion on IRC, mostly because of how amusing it was, but also if I ever needed to refer back to it in a time like this.

Maybe I can't prove anything, but everyone can decide for themselves.
For those with nothing better to do with their lives, here's how our discussion ended: http://pastebin.com/r0HdQAaD
7  Discussions / General Discussions / Re: Forum is quiet on: 2016-03-08 23:13:45
It's not about the amount of posts, it's the quality and meaning.

A silent forum is just as good as, if not better than, one with a thousand posts but no useful information.

If you're looking for an online community to waste time on, there are plenty of places to go (reddit is the best I can think of). JGO is not one of them.
8  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Samples on: 2016-03-07 03:13:08
Vulkan, to my understanding, works with OpenGL, but I have 0 research and 0 understanding of Vulkan.
Vulkan and OpenGL are independent of each other, although with the latest OpenGL plus the right extensions you can get almost identical behaviour in the common cases. (And having 0 knowledge of Vulkan now only puts you behind everyone else by a few weeks)

Quote from: Hydroque
OpenGL is too big to die out immediately and in the next 10 years it will still be around.

Probably, but people won't be bothered writing new tutorials by that time.

Therefore, you should just use the resources that are already available. They are plenty good enough to learn from. Lots of other people can manage and I don't see why you can't.

Even if you plan on jumping to Vulkan later, you probably still need to learn OpenGL first or you'll completely be lost.
9  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Samples on: 2016-03-07 01:07:16
I'm going to throw in my 2c and say that writing OpenGL tutorials is soon going to be redundant.

On one side of the fence, you have people who don't care, and will just use an engine that hides it all away.
And on the other side, you have people that love all the low level fiddling, and therefore will ditch OpenGL for Vulkan.

There might be a very narrow area in the middle, but I suspect those people will be perfectly happy to use the resources that already exist.
10  Games Center / WIP games, tools & toy projects / Re: ChessBall on: 2016-03-07 00:59:07
Are you seriously arguing over switch vs if-else?

If your performance tuning is that specific then you should definitely not be using Java.
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-03-06 22:45:20
KaiHH,
Could you check out my mat4 class later and tell me what is wrong with it?

Throw up a pastebin link and I (or anyone else) can have a look through it. (Also, being more specific as to what is wrong would help)

But you really should just use JOML.
12  Game Development / Networking & Multiplayer / Re: BufferedReader.ReadLine unexpectedly blocking on: 2016-03-05 07:32:27
Taking a quick look at this, you instantaenously call

Quote
ps = new PrintStream( socket.getOutputStream());
br = new BufferedReader(new InputStreamReader(socket.getInputStream()));

When you create multiple objects trying to read from the stream, you get problems. Only ever create one printStream object for each connection (as you only need to output data one way), but as for reading, if you are reading images or bytes or strings, you need to switch between and you should only read when you are looking for input, not processing.

Er... unless you're talking about something else that I missed, one of those is an input stream and the other is an output. Only one object will be reading.
13  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Samples on: 2016-03-04 08:09:45
If you don't want to put in the effort for learning you don't deserve the results.

There are plenty of high-quality OpenGL tutorials and samples out there for anyone who looks. If you can't be bothered, then just find a library that abstracts it away.
14  Discussions / General Discussions / Re: Comparing Rust and Java on: 2016-03-01 01:30:42
@delt0r: Rust's advantage in this case is that it makes it really hard to write bad code. The compiler will scream at you and refuse to build until you write something sensible. That's not to say you can't write bad code in Rust, but you really have to go out of your way to do so.

I call bullshit.

You obviously haven't written anything in Rust Wink

The compiler doesn't need to be smart. It just has to enforce a set of simple rules. If your code doesn't fit those rules, even if it might be technically correct, it will still get rejected (but in the case of Rust, it's much more likely the programmer thinks their code is safe when it actually isn't).

Quote taken from reddit:
Quote
Borrow/lifetime errors are usually Rust compiler bugs.
Typically, I will spend 20 minutes detailing the precise conditions of the bug, using language that understates my immense knowledge, while demonstrating sympathetic understanding of the pressures placed on a Rust compiler developer, who is also probably studying for several exams at the moment. The developer reading my bug report may not understand this stuff as well as I do, so I will carefully trace the lifetimes of each variable, where memory is allocated on the stack vs the heap, which struct or function owns a value at any point in time, where borrows begin and where they... oh yeah, actually that variable really doesn't live long enough.

Rust sort-of splits bugs into two categories: accidental mistakes that can cause everything to catch fire and explode, and poorly designed or broken algorithms. It stops you doing the former by enforcing its rules, but the latter is obviously impossible (as you've said).

That said, not having to worry about the former makes it significantly easier to avoid the latter.
15  Discussions / General Discussions / Re: Comparing Rust and Java on: 2016-02-29 23:34:27
...most of the problems I have are getting obscure bullshit with makefiles, autoconf, configure, automake, etc. and libraries and types working together...

Cargo (Rust's official package manager, nearly always installed alongside rustc) is amazing. You add a few lines to a file (library_name="1.2.3"), run cargo build, and your program is compiled along with all its libraries (which can be sourced from the local filesystem, the official repository, or a github repo). I'd argue that it's far easier to handle dependencies and compilation in Rust than it is in Java.

@delt0r: Rust's advantage in this case is that it makes it really hard to write bad code. The compiler will scream at you and refuse to build until you write something sensible. That's not to say you can't write bad code in Rust, but you really have to go out of your way to do so.
16  Discussions / General Discussions / Re: Comparing Rust and Java on: 2016-02-29 22:14:48
But what most turns me off is that it's still fundamentally a very low-level language that suffers from all the pitfalls of C in that regard, throwing away all the lovely cosy virtual machine stability that I've grown to love.

Could you elaborate more on the "suffers from all the pitfalls of C" part, as Rust is designed to fix some of the most common/irritating problems (memory/type safety and a cross-platform standard library are the two main ones I can think of).
17  Games Center / WIP games, tools & toy projects / Re: WaveDefender(); //2D RPG-ish on: 2016-02-25 03:09:05
This site is called java-gaming.org. Why would you expect there to be a Javascript+WebGL version?

In all the time you wasted with your utterly useless posts, you could've just downloaded the game, allowing you to actually play it and give some feedback.
18  Discussions / General Discussions / Re: Vulkan 1.0 Release on: 2016-02-22 04:04:51
I've seen various reports on reddit/IRC channels saying some of the debugging functionality is broken. (annoyingly, I can't find any right now)
19  Discussions / General Discussions / Re: Unity3D/2D on: 2016-02-22 03:54:02
As much as I'd love to hate on Unity, it does what it's supposed to do, and does it fairly well.

As a fun exercise, let's apply all of these to Java:

Quote
Let's discuss why Java is such shit.

My views:.
Object oriented and hidden customizable things
Complicated UI that doesn't fit anyones preferences (But at least we have 2 complicated UI libraries that don't fit anyone's preferences)
Code that I don't trust is doing simplistic things (The execution of our code is at the mercy of the JVM)
Really high level code floods the space (We really should go back to punching holes in tape)
Horrible style of code (Okay this is subjective no matter what language)
20  Discussions / General Discussions / Re: Engaging the Voyage to Vulkan on: 2016-02-16 21:18:42
Guess how many lines of cross-platform C code it requires to draw a single textured triangle now?
Answer: 2413
Count probably another 1000 lines for proper API error checking, which this demo explicitly omits.
Now Java 2D Processing does not look that bad, does it? Wink

I'll need to look into it further, but a fair amount of that C code appears to be window creation, which is always going to be an absolute mess to make cross-platform unless you have a library for it.

And besides, you don't get this much extra power for free.
21  Discussions / General Discussions / Vulkan has been released! on: 2016-02-16 19:05:15
I woke up to the pleasant news that Vulkan has been released.

https://www.khronos.org/vulkan/

Also looks like I made the right decision switching to Nvidia at the start of this year, as AMD is yet to release a Linux driver.
22  Game Development / Newbie & Debugging Questions / Re: Ways(or Best Way) of Declaring Orthographic Projection on: 2016-02-12 04:49:17
(-window_width/2, window_width/2, -window_height/2, window_height/2)

Scales properly for pixel art and keeps (0, 0) at the centre of the screen (which makes manipulating the camera easier).
23  Java Game APIs & Engines / OpenGL Development / Re: Massive internal JEmalloc/Nvidia driver memory leak? on: 2016-01-09 03:13:46
@Icecore and everyone else
I really don't know where to proceed from here on. Is there any way to trace which library/.dll-file is allocating all this memory to confirm that it's the driver?

On linux there's valgrind for debugging these sorts of problems, but assuming you still haven't got a linux box/VM up and running (also the bug might be a platform-specific thing anyway), that's not exactly helpful.

A quick search on the internet turns up with https://github.com/dynamorio/drmemory, which at least has the memory-leak checking aspect.
24  Discussions / Miscellaneous Topics / Re: Happy 2016 on: 2016-01-01 22:32:22
  • Get a game on greenlight. (And at the same time, try to use it for as many school assessments as possible, eg: Music, Computing, Business)
  • Get said game through greenlight and make some sort of profit.
  • I'd like to do some sort of 3D project, but it'll depend on how much time I have between school and getting my main project greenlight-able
  • Get my restricted driver's license (total procrastination so far: 12 months)
25  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-01-01 22:17:31
Murdered 3 mosquitoes..

Apart from that, slept most of the day (was awake up to 3:40 AM yesterday) and just now started back on the daily routines.

Just murdered another mosquito making the count to 4.

Amateur. My walls (and 1 window) are covered with the two-dimensional remains of those suckers (and a bit of my blood).

18 confirmed kills since the last time I cleaned them all off (a month or so ago). 14 with a book against the wall and 4 with bug spray (because I can't reach the ceiling).

I'd like to think that the violent display of what happens to mosquitos is what has scared them all off lately, but it's probably the fact that I now keep my windows shut all the time.
26  Discussions / Miscellaneous Topics / Re: How to disable the DOTA game on my LAN? on: 2015-11-30 03:09:47
AFAIK he plays in newest DOTA 2.
DOTA 2 and Dota 2 Reborn = are different game platforms ^^

Dota 2 Reborn was the name of the new client and update to Dota 2.
27  Game Development / Game Play & Game Design / Re: What makes a good simulation game? on: 2015-10-06 00:04:52
When you're asking what makes a good simulation game, you're actually asking two things at once and hoping they have the same answer:

  • What makes a good simulator?
  • What makes a good game?

However, realism very rarely aligns itself with fun, so at some point, you're going to have to pick one or the other. If you set out to make an accurate simulator, it probably won't turn out as a very fun game, and vice versa.

eg: Goat Simulator is a good game and a terrible simulator.
28  Game Development / Shared Code / Re: Extremely Fast sine/cosine on: 2015-07-25 23:59:29
(referring to kappa's implementation. Keep in mind I could've missed something rather important)

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
    if (x < MINUS_PI) {
        x += DOUBLE_PI;
    } else if (x > PI) {
        x -= DOUBLE_PI;
    }

    x += PI_2;

    if (x > PI) {
        x -= DOUBLE_PI;
    }


Should probably be replaced by

1  
2  
3  
4  
5  
6  
    x += PI_2;

    x = (x % DOUBLE_PI) + PI;
    if (x > PI) {
        x -= DOUBLE_PI;
    }


For 1) simplicity, and 2) so it works properly on numbers outside the range of -3*PI to 3*PI. Unless the JVM is doing some insane stuff under the hood it shouldn't really impact performance. And if it is, you may as well remove some of the if checks in the original code and just assume the values passed in were within +-PI as specified.

The sine function can be changed similarly:

1  
2  
3  
4  
    x = (x % DOUBLE_PI) + PI;
    if (x > PI) {
        x -= DOUBLE_PI;
    }
29  Discussions / Miscellaneous Topics / Re: Music composing on: 2015-07-20 05:00:11
MuseScore
30  Discussions / Miscellaneous Topics / Re: Looking for early testers for We Shall Wake Demo 7 on: 2015-07-19 04:08:39
I don't think I'll have the spare time to play through it and test for those kind of bugs, but I can check it works on linux with catalyst and/or radeon drivers if you're in need of that.
Pages: [1] 2 3 ... 73
 
Mac70 (15 views)
2016-05-24 21:16:33

theagentd (40 views)
2016-05-14 18:38:35

theagentd (71 views)
2016-05-10 22:37:41

theagentd (75 views)
2016-05-10 22:33:46

IanParcs (107 views)
2016-04-18 14:18:53

KaiHH (100 views)
2016-04-18 08:35:41

KaiHH (128 views)
2016-04-15 12:43:58

theagentd (132 views)
2016-04-14 02:16:17

theagentd (154 views)
2016-04-14 02:15:43

IanParcs (248 views)
2016-04-12 03:51:16
FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50
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!