Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (601)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
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 ... 55
1  Games Center / WIP games, tools & toy projects / Re: Brutal Fighters - Available for Free!! on: 2015-07-26 01:34:30
Hi,
I had a game with my brother and it worked well!
The dust effect was cool, made lag look less.
The game ran flawlessly, no errors or jittery-ness. Technically the game is very impressive, but my brother had some suggested improvements about the game play which might be worth looking into:
-Should be able to shoot while jumping or walking, currently the player seems to be able to shoot only when standing still.
-Doing basic attacks while standing right on top of one another seems to not affect the enemy. This means that players having a fist fight move closer until they're on top of each other then no damage seems to be done.
-Not being able to fight when holding the flag is frustrating, particularly when there's 2 people playing and both have each others' flag!
-Needs bots.
-Level ups, items, commentator who announces triple kill bonuses and so on.

Nice job all round.
2  Game Development / Shared Code / Re: Extremely Fast atan2 on: 2015-07-26 01:22:49
These are great optimisations.

Ordering points around the players' position in an anti-clockwise direction is an interesting use-case. I made heavy use of atan2 for ordering points in path finding and line of sight algorithms.
But then I heard about an algorithm that can be used to compare points' relative angles much more quickly called relativeCCW which avoids using trigonometry. It's in the JDK's java.awt.Line2D source:
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/awt/geom/Line2D.java#Line2D.relativeCCW%28double%2Cdouble%2Cdouble%2Cdouble%2Cdouble%2Cdouble%29

Might be interesting to people using atan2 for comparing angles.
3  Games Center / WIP games, tools & toy projects / Re: Brutal Fighters - Available for Free!! on: 2015-07-21 12:25:46
I can email you to have a game this weekend with my brothers. Just personal message me your email. It's probably too hard to coordinate during the week with the different time zones.
4  Games Center / WIP games, tools & toy projects / Re: Brutal Fighters - Available for Free!! on: 2015-07-20 11:55:54
Hi, the loading screen is much better. But I've been waiting for players for a while and it seems that nobody's online.
Perhaps you could have a lobby or show some information about how many players are online, or put some bots in so that a game can begin straight away.
This weekend I'll give the game a go with my brothers and a friend and I'll report back how the game went.

EDIT: Also, there's no back button once the loading screen is encountered. I had to alt-tab and kill the game by right-clicking the icon and closing.
5  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-07-19 13:57:59
The benefit of OpenCL is transparent use of SSE->AVX2 and multithreading at the same time. The disadvantages are a) you'd have to batch up more work, going through OpenCL will have more overhead than what Kai is doing and b) OpenCL availability; SSE is everywhere, but OpenCL requires a runtime to be available at the user's machine.

Also note that using the GPU with OpenCL is not an option in this case. I'm assuming that whatever you're doing with JOML needs to be CPU-accessible, for culling, collision-detection, etc. Otherwise, you'd be using OpenGL shaders directly.

I see OpenCL a different field now which needs special treatment. The real motivating driving force for the library for me currently is easy porting of SSE intrinsics from GCC/msvc to Java.
A disadvantage of OpenCL in addition to what @Spasi already mentioned is for me: complexity in the writing of algorithms for it.
Remember that OpenCL conceptually (and with modern GPUs also physically) only has scalar operations.
Now to actually do SIMD, you would need to think about multithreading in a clever way to actually use 4 threads to simultaneously operate on a 4-component vector (or bigger).
And to have the best possible performance, those threads will likely want to be in the same wavefront and the data they access would need to be consecutive.
Also, the operational semantics and the concept of OpenCL are quite different from x86 SSE, though both provide SIMD.
If you want to think of SSE in terms of OpenCL, it would be that SSE only has 4 threads. Those 4 threads are synchronized "implicitly" after each SSE instruction. Each such instruction has lock semantics (meaning changes to memory are visible immediately) within the same thread group (those 4 threads).
In SSE you express your algorithm in SIMD form, whereas in OpenCL you express it in scalar form and hope that the runtime will execute multiple such instructions in parallel.
All in all this makes SSE a lot easier to use than OpenCL, but of course also limits you to 4 threads.
But if you want to use more than 4 "conceptual" threads you can of course always use operating system threads to parallelize your SSE algorithm even further on more data, so having "more" SIMD. Smiley

Good points, I understand the distinction better now. Thanks for the explanations.

@kaiHH Maybe I'm missing something, but I can see from the Jittest NativeCode sample you posted that you will give access to the registers as static variables of the class org.joml.jit.Registers. This makes sense for a single-threaded application but for multi-threaded use of an SSE setup like you hinted at then shouldn't these be local variables?

Do you think it would be worth making a version that operates on 2 doubles rather than 4 floats? I notice that SIMD SSE2 allows 2 doubles as well as 4 floats: https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions#Registers
Obviously there would be a 50% slowdown doing 2 doubles instead of 4 floats but it would be nice to have. I only ask because I've sometimes found that doing intermediate calculations with floats can often cause rounding problems compared to using doubles all the way through.

This is a very exciting project.
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-07-19 03:10:18
I only vaguely understand what you're doing, but it sounds like it would be a great tool and a commendable engineering feat!  Cool
Being able to batch up operations for SSE would benefit lots of areas where long calculations are done.
An advantage of the tool would be that noobs like me can use SSE without figuring out the vagaries of SSE on different architectures.
But would a disadvantage for the experts be that your tool would sacrifice some control so that the most efficient SSE code could not be made using java code? Perhaps a solution like embedding pure SSE code in the java source file directly would be better. I saw a language that did that somewhere by preceding the line with a pipe | symbol. But even doing it in a String would suffice. Then, I assume, finer control could be achieved.
Some other thoughts:
-I wonder how fast SSE is compared to using OpenCL, as @Spasi hinted at above. Since most performance-intensive programs will use the graphics card, openCL would be available to them and might even be faster than SSE given the much larger amount of cores on graphics cards and the possibility of the openCL calculation results being kept on the graphics card for drawing in openGL.
-I assume that the tool would only be available for java programs and not for Android or JavaScript code. It blows against the wind a little since java as a client-side technology is dying. The best ways to distribute our java programs these days is as WebGL, HTML5 and Javascript or as an Android program.
7  Games Center / WIP games, tools & toy projects / Re: Brutal Fighters - 2D Competitive Action Game on: 2015-07-17 16:04:14
Nice job making a release!
I played and managed to steal a flag, died to a blue dude, then I killed him a few times. I think the enemy and allied players were AI since they weren't very pro-active in killing me back.
The graphics, window, menu and sounds all worked flawlessly.
I was playing from Australia and though i did notice a lag of about 200 - 500ms, it was still very playable which is impressive.

Some things that you might consider improving:
-Implement a loading screen after choosing a character. I actually thought the game hung when all I could see was the game logo for about 3 minutes. It was only after I tried running the game on the CMD prompt to post the error for you that I heard sound effects and noticed that the game actually loaded.
-More obvious tips about the controls. I had no idea how to fight until I died and it showed the keys.
-The arrow key controls work well, they never jammed. But it is a little frustrating that you can't seem to attack while jumping or moving.
-LAN play option

Edit: The lag was only between when I pressed the controls and saw a reaction on the screen. There was no stuttering or anything else. By the way, one easy way to trick the player into thinking that there's smaller lag than there is, is to make a little dust or smoke graphic at the player's feet when he presses a key to move, which is instantaneous and gives the player feedback and distracts while the actual movement eventually starts.
8  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Java OpenGL Math Library (JOML) on: 2015-07-16 10:03:57
Your experiments are very interesting. While I don't make 3D games, it's nice to see how code can be heavily optimised.

I've read that Java's JIT compiler Hotspot uses SIMD (single instruction multiple data) in array copies and fills:
http://psy-lob-saw.blogspot.com.au/2015/04/on-arraysfill-intrinsics-superword-and.html

I haven't heard of hotspot using SIMD in anything else, so your changes are a very cutting edge optimisation. It will be interesting to see if there will actually be a significant speed up.

9  Discussions / General Discussions / Re: Oracle are winning in the 'copyright an api' legal fight on: 2015-07-02 06:09:03
Surely it's quite the opposite though; the API can *only* be expressed in one form,

That's a tautological argument.  The process(es) which the API expresses could be expressed in another form as a different API.

a precise set of class, field & method signatures.

And documented behaviour!  Without that the API is pretty much worthless.  With that, in particular in the specification of behaviour between components, you start to get the expression of the idea (IMO).

@Abuse's point is interesting. If copying the entire api is not possible, then compatibility is broken. Applying this logic to vmware and other hypervisors, which rip off entire operating systems' apis, they are all illegally copying (and distributing, @princec) and owe licensing fees to Apple and Microsoft.
Indeed, Java itself rips off windows apis such as the file system, or windowing toolkit, and every other api that exposes operating system functionality. Therefore oracle owes licensing fees to the operating system developers.
Obviously this is silly, but this chain of thought seems consistent with oracle's and some of your arguments.
10  Discussions / General Discussions / Re: Oracle are winning in the 'copyright an api' legal fight on: 2015-07-01 07:54:46
... I was pointing out that @CommanderKeith's suggestion that this case is about Google copying an open-source project is incorrect.  Had they used OpenJDK (and GPL w/CPE), which would also have required said time machine, there wouldn't be a case because of the API permission you mention. 
Ah ok, I wasn't aware that Google used Apache Harmony's java implementation in android, I thought they used OpenJDK.
This case seems to link back to Sun's refusal to grant Apache Harmony the TCK. Apparently they only wanted it to be given to GPL'ed java code.

Still, this is an unusual step for API's to be copyright-able. It's a break from past cases and norms. Copyrights last much longer than patents.
11  Discussions / General Discussions / Re: Oracle are winning in the 'copyright an api' legal fight on: 2015-07-01 07:33:51
I still can't understand how Oracle won in the higher courts after it was established that Google:
-Didn't violate any patents.
-Did do a clean room approach besides a small number of methods' code that the lower court judge said was 'overblown' by Oracle.
-It has been established in past cases that API's are not copyright-able.

As Cero made clear, morally and from the point of view of a lawyer's "reasonable person", open-sourced software is fair game to be copied.
It's bizarre that the US courts are allowing API's to be copyrighted.
What's the point of an object-oriented language that allows inheritance if you can't copy the API to inherit the methods Clueless

EDIT: By the way, wikipedia has a good run-down of the case:
https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google,_Inc.
12  Discussions / General Discussions / Re: Oracle are winning in the 'copyright an api' legal fight on: 2015-06-30 13:50:53
I can't understand how oracle can be seen as being'right'.
They are suing Google for copying an open source project. Seems pretty obvious to me that google is right and oracle is wrong.

Edit: Assuming that google kept to the terms of the open source license agreement, which I think they did.
13  Discussions / General Discussions / Re: Oracle are winning in the 'copyright an api' legal fight on: 2015-06-30 13:22:24
Well that's a relief, hopefully common sense prevails.
Thanks for the link and explanations.
14  Discussions / General Discussions / Re: Oracle are winning in the 'copyright an api' legal fight on: 2015-06-30 08:28:17
Thanks for your comments, very interesting.

Google is wrong because they knew about Java ME and that companies are supposed to pay royalties for mobile development.
Why are companies supposed to pay royalties for mobile development? It seems that is the Apple model, but it's certainly against consumers' interests and the anti-trust pro-competition legal framework. Also, Java ME was a flagging under-invested framework that was dying. It was only a matter of time before it was going to be replaced.

Oracle hasn't won the fight yet but unfortunately they are on their way to success. As part of the JCP EC I know of the hard confrontations...
If you don't mind me asking, what's your involvement in the JCP EC?

Apparently the case has become political, with the US government weighing in and asking the court not to accept Google's appeal. I'm not a lawyer, but to my knowledge, if an appeal is refused then Google can't escalate the matter and therefore has to accept the last (unfavourable) judgement.

From that Reuters article:
Quote
The Obama administration, which was asked to weigh in on the issue earlier this year, asked the Supreme Court not to take the case. The administration said the dispute had raised important concerns about the effect that enforcement of Oracle's copyright could have on software development, but said those issues could be addressed via Google's fair use defense.
15  Discussions / General Discussions / Oracle are winning in the 'copyright an api' legal fight on: 2015-06-29 14:38:45
http://mobile.reuters.com/article/topNews/idUSKCN0P91O720150629?irpc=932

http://theconversation.com/oracle-vs-google-case-threatens-foundations-of-software-design-42517

It seems so silly that Java was open sourced, yet these legal shenanigans are allowed to occur.
Ironically, this expansion of copyright powers will probably be the death kiss for copyrighted programming languages. Why would a company use, extend, interface with and rely upon copyrighted programming languages when it is liable to pay fees?
The unowned languages such as JavaScript, c, and rust may become more popular.
16  Game Development / Performance Tuning / Re: Video frame grabbing to bufferedImage on: 2015-06-25 03:14:30
I have used Xuggle for this, so it does work, but I cannot remember how fast it was, sorry. I don't recall it being noticeably slow though.

I wouldn't be surprised if nsigma had a good solution to this built in to Praxis Live.

Yes that's true, I think @nsigma uses a java wrapper on gstreamer, perhaps this:
https://github.com/gstreamer-java

Also, @Riven's YUNPM does similar stuff:
http://www.java-gaming.org/index.php?topic=27100.0
17  Games Center / WIP games, tools & toy projects / Re: Brutal Fighters - 2D Competitive Action Game on: 2015-06-23 13:49:37
Sounds like a well thought-out design. Thanks for explaining it.
In a first person shooter I think it's easier to hide lag since the player can shoot at a lagged enemy and still score a kill that the enemy will not protest against since he can't easily tell if he was within view of the shooter or not. So interpolating (lerping) and avoiding teleportation is a good choice.
But in side-scrollers or top-down view games where all players can see the same thing, I can see why you chose to align the clients' game worlds as close as possible, despite the possible occurrence of teleportation due to lag.

I wonder how you would sync the clients if you added destructible terrain or some other large-data client-modifiable feature? Because then sending updates with all the terrain data might be too much.
18  Games Center / WIP games, tools & toy projects / Re: Brutal Fighters - 2D Competitive Action Game on: 2015-06-22 10:02:52
Cool, I'm looking forward to giving it a go! Multiplayer games are the best.

A few questions about your multiplayer implementation:
1. Do the clients' simulations run some milliseconds behind the server or do they all run concurrently with the server but the clients do "dead reckoning" to simulate where the game state would be assuming nothing has changed.
2. When a new packet arrives which shows an enemy player did a mouse click and a change in direction, do the other clients 'teleport' the enemy player to his new position instantly or do you smooth the transition?
3. How do you stop the clients' game worlds becoming out of sync with the server? Does the server send the whole world every few frames?
Sorry for the detailed questions. No need for detailed answers.
I'm always interested in how multiplayer code works under the hood. I find it one of the hardest and most interesting things.
19  Games Center / WIP games, tools & toy projects / Re: Brutal Fighters - 2D Competitive Action Game on: 2015-06-21 13:26:41
Looks great on the videos. The graphics are bright and have a nice softness.
I'm not a fan of mortal-combat street fighter type games but this one looks interesting.
For noobs like me, maybe you could make the combos executable with on-screen buttons with icons so they can all be seen.
How did you implement the multiplayer code?
20  Games Center / Cube World Projects / Re: Technetium - A realistic voxel game on: 2015-06-21 13:17:56
Honestly, I'd prefer it to be dead, because it looks EXACTLY like ThinMatrix's tutorial, but whatever.
Try to give constructive criticism. Comments like this bring down the tone of the forum.
One of the many good things about this community is that people who have nothing nice to say know how to keep it to themselves.
21  Discussions / General Discussions / Re: Nice dynamic background on: 2015-06-20 17:27:39
It's a nice image. I don't know how to create it, but it does look like a bunch of 3D sine curves with a transparent gradient fill where the colour and brightness might be based on the distance from some point.

A friend of mine has been working on some similar things with a maths twist called 'curl noise'.
http://petewerner.blogspot.com.au/2015/02/intro-to-curl-noise.html

The 3d demos were very impressive, they were rendered in real time.
Unfortunately he didn't put any videos up on youtube but there are links to github pages of (non-java) code that you can download and run on the above blog.
22  Game Development / Networking & Multiplayer / Re: KryoNet Auto Pinging (KeepAlive) on: 2015-06-10 07:54:22
Hi,
That's unusual. In the API it says that the delay is measured in milliseconds, and 1000ms is one second which seems reasonable.
https://github.com/EsotericSoftware/kryonet/blob/master/src/com/esotericsoftware/kryonet/Connection.java
The default is 8000ms which is 8s.
Perhaps the problem is that the pings have been stored up and the client doesn't receive them for a while. And then when the client finally receives the messages they're all together, when in fact they were sent 1s apart.
Networking problems are hard to debug.
Good luck
23  Discussions / General Discussions / Re: How many projects do you go through? on: 2015-05-30 02:42:53
I have a different problem were I can't get started on a project until I feel I've figured out everything it should include in my head, which is not going to happen for anything complex enough to be worthwhile.
I'm also very reluctant to start something I haven't planned out and therefore don't think I'll finish.
But that means I learn less than I used to when I would dive into things just for the fun of it.

I have a problem. I admit it. I start a project on a weekly basis, and then decide to do something else.

Am I the only one? If not, how quickly do you run through them?
I think your creativity with game worlds and art is very interesting. One of these days you'll stumble on an interesting gameplay mechanic and make something very popular (yorecraft?)  Wink
24  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Fast, reliabe & crossplatform Javascript API/Library for Java? (for game dev.) on: 2015-05-30 02:31:27
Quote
I tried Nashorn a few months ago...
Sounds like you are using some other scripting Lib/API for the time being? I'd be very interested in what you use then !? Smiley

For scripting you might like to try janino which is pure java. I highly recommend it, especially if you're not keen on javascript's loose syntax. Janino is as fast as java since it's compiled.
http://docs.codehaus.org/display/JANINO/Home

I'm not sure if you're interested in html maths rendering, but I continue to use MathJax which is ok but it re-flows the html page for the client which is not ideal.
http://mathjax.org/

Cheers,
Keith
25  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Fast, reliabe & crossplatform Javascript API/Library for Java? (for game dev.) on: 2015-05-29 08:15:35
Stay away from Rhino, go with JDK 8 and Nashorn. It's massively faster, is 100% ECMAScript 5.1 compatible and has additional features that make Java interop easier. Also make sure to keep your JDK updated; Nashorn is under active development, there have been many fixes and performance improvements and more are coming.

Nashorn is still unreliable. I tried Nashorn a few months ago and was disappointed that it threw the following exception
1  
java.lang.RuntimeException: Method code too large! 

I was attempting to run the katex math html rendering library (https://github.com/khan/katex/releases) server-side using java.
Apparently this exception is because javascript methods can be too long for the JVM:
http://stackoverflow.com/questions/26329503/troubleshooting-nashorn-method-code-too-large-exception
26  Discussions / General Discussions / Re: Teaching Kids to be Independent on: 2015-05-22 07:21:26
Interesting topic, I'm also trying to figure out how to motivate students to learn.

I read once that a key way to motivate employees is to present the job as an impossible challenge that has never been done before. Then the employees rise to the challenge and over-achieve because they take pride in breaking new ground.

I think this can also work for learners because then any progress that they make proves their intelligence and self-worth to themselves, giving them the confidence to continue breaking new ground and allowing them to write-off failures as inevitable which doesn't make them feel stupid.

I agree that competition, examples and relevance are important for effective teaching.

Learners often don't know where to start, so it's important to show them a simple working example.

Relating the theory back to reality helps show relevance. I remember studying trigonometry in school and hating it. Then I voluntarily studied it by myself when I found out that it can be used to calculate projectile paths in games.

I've also noticed that the most effective teachers interact with the class by posing questions, and budget more time for students to do problems themselves rather than making the student listen to the teacher solve problems.
27  Game Development / Networking & Multiplayer / Re: How to properly benchmark server performance. on: 2015-05-17 03:30:47
I'm not an expert, but I run a small Tomcat server and found that JavaMelody (https://code.google.com/p/javamelody/) was very useful for monitoring connections, RAM, CPU, etc. Might be worth checking out just for ideas.
Good luck with the big launch, sounds like an exciting project.

Edit: to test your server setup, couldn't you have another server with the same specs that just keeps connections open with the other one you're actually trying to test
28  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-16 04:28:22
Interesting. I notice that the Rust license is MIT and apache. It's nice to have a less-constraining license than java's GPL, but the downside might be the chance of fragmentation.
Also it looks like Rust is cross-platform since it uses LLVM.

@HeroesGraveDev, you said that you can't write java in rust.
Is that because Rust doesn't support classes and there's no such thing as null? Or are there other more serious problems with translating java source across to rust?
29  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-16 02:02:16
Looks like an interesting language. I haven't read much about it, but apparently it's much more low-level than java and seeks to compete with C++.
For example, its memory management decisions evolved to be similar to C++ with manual heap or stack allocation, and optional library-level garbage collection.
http://pcwalton.github.io/blog/2013/06/02/removing-garbage-collection-from-the-rust-language/

This sounds like a handy feature of the Rust language: "sharing mutable state across a concurrency boundary without a mutex is a compile-time error in Rust". That would have saved me some time finding bugs and learning how to code with threads properly.
https://www.codementor.io/rust/tutorial/steve-klabnik-rust-vs-c-go-ocaml-erlang
30  Games Center / WIP games, tools & toy projects / Re: GNetLib V0.0.0.3 (A Simple Java Networking Library) on: 2015-04-27 13:02:58
Try to avoid morbid thoughts and jinxing fellow members.
TehJavaDev was last active on December 20, 2014. I'm sure he's alive and well.
Best wishes to him and his excellent library.

Edit: oops, wrong person.
Pages: [1] 2 3 ... 55
 
Jesse (12 views)
2015-07-29 04:35:27

Riven (33 views)
2015-07-27 16:38:00

Riven (18 views)
2015-07-27 15:35:20

Riven (20 views)
2015-07-27 12:26:13

Riven (10 views)
2015-07-27 12:23:39

BurntPizza (30 views)
2015-07-25 00:14:37

BurntPizza (40 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (27 views)
2015-07-22 22:16:53

NoxInc (18 views)
2015-07-22 22:13:39
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21
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!