Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (688)
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 ... 72
1  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.
2  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.
3  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)

    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

    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:

    x = (x % DOUBLE_PI) + PI;
    if (x > PI) {
        x -= DOUBLE_PI;
4  Discussions / Miscellaneous Topics / Re: Music composing on: 2015-07-20 05:00:11
5  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.
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-03 05:52:35
/r/programming has just gone down Sad
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-03 04:27:08
While it's annoying to lose the big timewasting subreddits, all the programming subreddits (or at least that ones I'm subscribed to) are business as usual. Maybe I'll be productive for a change.
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-06-09 02:25:19
Enraged the internet last night by daring to be worried about the effect of Steam's new refund policy on income, spent much of today pouring water on the flames. Ended up blocking over 10,000 Twitter accounts, and then finally making the @puppygames account protected. So, well done, internet.

Cas Smiley

From the comments on Reddit it looks like your blog post calling out abusive customers is coming back to haunt you.
9  Discussions / Miscellaneous Topics / Re: IRC? on: 2015-06-06 22:28:14
Actually, it's still at 20 people. Three of them are duplicates.
10  Discussions / Miscellaneous Topics / Re: What is your opinion about ... on: 2015-05-29 05:44:19
I'm not sure debuggers are that essential in Java where errors print out a nice comprehensive message and stacktrace.

In low-level languages where you can get hit by a segfault out of nowhere, there you need a debugger.
11  Discussions / General Discussions / Re: Teaching Kids to be Independent on: 2015-05-22 05:56:00
There are small things like competitions I could put together and maybe a few small prizes. Hopefully that will make them interested enough to learn to work in teams and find eachothers strengths and weaknesses.

Heh. Maybe try something like the "King-of-the-Hill" challenges that occasionally pop up on StackOverflow (For example, the Wolf AI)

Competition will definitely be a great motivator.

Edit: Damn it BurntPizza. You must've read my mind.
12  Discussions / General Discussions / Re: Teaching Kids to be Independent on: 2015-05-22 05:45:18
Speaking from experience, I grew to hate most of the activities my parents forced me to do, and found myself enjoying programming in spite of the fact that they didn't like me spending so much time using computers ("Get off the computer and watch some TV for a while instead!").

Teaching people to be independent in their learning is kind-of impossible. Funnily enough, independence is something you have to learn on your own.

Motivation is the key. If you can get them motivated enough you don't even have to teach them yourself. But make sure they know you're available if they need to ask some questions or get a push in the right direction.
13  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-19 04:25:02
I have started messing around with Rust and while I am getting a lot out of the experience, I am still getting hung up on the ownership, borrowing, and lifetime models. I feel like I am randomly adding  'as and & until it compiles.

Don't worry. Took me about a year to fully understand how it all works. #rust on Moznet is a good place to ask for help on snippets of code.
14  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-19 02:58:47
- Not having to worry about the GC causing lag.
That's an interesting one esp. on a Java-centric forum like this one where I don't think anyone who's written any serious Java code for the last ... hmm ... 10 years or so has actually ever noticed GC occurring because it's just so fast for almost every use-case it's ever put to. A more pertinent issue with GC based systems is that they tend to require considerably more resources up-front than non-GC systems though it's remarkably tuneable and again, in most places it's deployed, not actually a relevance.

Cas Smiley

It's a problem I encountered in my voxel engine when turning up the world size to not-quite-but-almost-silly levels. No matter how hard I tried to pool data, there was inevitably a few bits of garbage that ended up being created all the time. The GC wasn't running very frequently (probably every 3-10 seconds or so and only when moving quickly towards regions that then had to be generated), when it did run there was a noticable stutter. It's not a constant lag, but more of an infrequent hit.

GC isn't such a bad feature when you have proper control over what memory needs GC and what can be freed at the end of a scope, but that is not the case in Java, hence why pooling objects is such a common optimisation.

In Rust, everything is owned by something else, whether it's a scope of a function, or another type (which is in turn owned by something). When a scope is exited or an object dropped, all of its contents in turn are dropped (Some functions and types provide ways around this behaviour, but are rarely needed). If you're creating lots of garbage it's because you're explicitly storing it.

As for compilation speeds, yes they are quite slow. Fortunately, the bottleneck is LLVM's optimisation passes, and so any errors will be caught reasonably quickly and compilation aborted. Coupled with the fact that most bugs are caught at compile time, once you've successfully compiled, any bugs will be silly logic errors (or abuse of unsafe {} code)

A few more reasons I like Rust over Java for gamedev
- Lambdas & Closures (I'll include this even though Java has it now. When I started with Rust, Java 8 was quite far away)
- The standard library is quite comprehensive for important types such as String, Vec, Option, Result, etc, whether through providing the functions outright or through composing various methods and closures together.
- The collections API is sane. For some reason in Java, Map is not a Collection.
- Iterators are composable.

That's not to say that Java doesn't have some advantages:

- Fast prototyping. Rust requires a bit more effort and thought to design the architecture of your game. In Java you can just write code and it generally works.
- Not having to worry about ownership and borrowing. While a very powerful tool, it's nice not to have to worry about it all the time.
- Rust doesn't have any mature GUI libraries (unless you count Servo, but that's an embeddable brower engine, not relly a library)
- Rust has extremely limited reflection. As evil as Java reflection is, it does have its uses.
15  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-18 08:13:57
So, other than the presumed speed increase, why do you like Rust for game development more than Java?

- Easy-to-use FFI which means accessing OpenGL and GLFW (and various other things) is much easier.
- Lots of rust's restrictions actually help you write code with less bugs. Unique mutability means you never accidentally modify the wrong variable.
- Algebraic Data Types (Rust's enums) are extremely useful.
- Generics without type erasure.
- Type erasure is still available when you really need it (Which is very rare).
- Not having to worry about the GC causing lag.
- Borrow checker stop pointless copying of data.

Probably a lot of other things I can't think of off the top of my head.
16  Discussions / Miscellaneous Topics / Re: Rust 1.0 has been released on: 2015-05-16 22:12:58
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.
I don't think fragmentation is really a concern, and the license doesn't affect it anyway.

@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?

In addition to what @BurntPizza said, there's also the problem of shared mutability. One of rust's memory-safety guarantees is that when a mutable reference to an object is available, nothing else can read from or write to that object. If you tried to write lots of Java code in Rust, every type would pretty much be Rc<RefCell<Option<T>>> (Rc allows shared immutable ownership. RefCell allows runtime-checked internal mutability). This is a lot of unnecessary overhead and syntax noise.

(Fun fact about Rc: There is only an overhead when cloning the Rc to create a new shared owner or when an Rc gets destroyed. Accessing the contained value is absolutely zero-overhead thanks the the borrow-checker.)

But if you write Rust in Rust, you'll be surprised how little you ever need shared ownership, multiple mutable references, global variables, or even nullable values.
17  Discussions / Miscellaneous Topics / Rust 1.0 has been released on: 2015-05-15 22:58:56
(Rust the programming language, not the game)

Throughout Rust's development, a lot of breaking changes have happened, but now that 1.0 is released, things are guaranteed to be mostly backwards-compatible (Changes are allowed that would require parts of code to be more explicit, as long as the explicit form works on both the old and new versions of the compiler).

Over the last 1.5 years I've been learning Rust (well, you never really stop learning a language until you stop using it), and have found myself preferring it over Java for use in gamedev. I've entered two Ludum Dares, written an Entity-Component System library, amongst other various utility libraries (thankfully, most of which I've abandoned as the language and other libraries evolved to make them redundant), and have two more libraries in progress (windowing and graphics) that aren't publicly available yet.

This paragraph from the documentation does a better job of explaining Rust than I ever could.
Rust is a systems programming language focused on three goals: safety, speed, and concurrency. It maintains these goals without having a garbage collector, making it a useful language for a number of use cases other languages aren’t good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems. It improves on current languages targeting this space by having a number of compile-time safety checks that produce no runtime overhead, while eliminating all data races. Rust also aims to achieve ‘zero-cost abstractions’ even though some of these abstractions feel like those of a high-level language. Even then, Rust still allows precise control like a low-level language would.

The biggest difficulty I found in learning Rust was that you have to get out of the OOP & inheritance mindset of Java. Rust still supports OOP, but not in the same sense that Java does. Think of Java where you can extend interfaces, but not classes and you get the general idea of Rust's OOP. Fortunately, the generics system is very powerful (not as much as C++ templates, but they cause headaches), which makes using traits (equivalent of Java interfaces) much more viable. Most importantly: You can't write Java in Rust.

Several useful features didn't make it into 1.0 because at the time they weren't deemed stable enough to commit to. If you want these features, there's always the nightly builds.

If you're interested in learning Rust for gamedev, here's a list of libraries:
  • glfw-rs: GLFW3 bindings (For those of you who like LWJGL 3)
  • rust-sdl2: SDL2 bindings (For those of you who like SDL2)
  • glutin: Cross-platform windowing library. Similar to GLFW3, but easier to compile on Windows because it's written in pure rust.
  • gl-rs: OpenGL bindings generator for the people who use `Pure LWJGL` (For those of you who only have experience with LWJGL, you'll need a windowing library such as glfw-rs, rust-sdl2, or glutin)
  • piston: Higher-level abstracted graphics library.
  • piston-image: Pure rust image encoding/decoding (Part of the piston project, but is standalone).
  • glium: Safe abstraction over OpenGL. Only supports glutin for windowing, or can run in headless mode.
  • gfx-rs: High-performance bindless graphics API (Abstracts over OpenGL/D3D/Vulkan)
  • gfx_scene: Scene management built on top of gfx-rs
  • snowmew: Multi-threaded game engine that uses a Copy-On-Write game state for high performance and safe concurrency (possibly out of date)
  • ecs-rs: Entity-Component System framework. (Written by me. Only works on nightly for now)
  • Various other things

Various useful links:

It would also be interesting to have a discussion on what you think of the language.
18  Discussions / Miscellaneous Topics / Re: What do you define as a programming language? on: 2015-05-01 23:30:01
Language can really mean any system that can be used for communication. Not everything has to be spoken and/or written.

If you can use various cellular automata to communicate instructions to a computer, then I'd call those programming languages.
19  Discussions / General Discussions / Re: Synchronous loading on: 2015-04-07 06:15:57
Loading multiple resources at once is not a good idea. The biggest bottleneck in resource loading is the hard disk read speed, and trying to read two files at once will add overhead because the hard disk has to keep switching the location it reads from instead of reading contiguous chunks.
20  Discussions / General Discussions / Re: Looking for a developer on: 2015-04-01 22:52:13
To avoid this thread collapsing like all the other similar ones, you should make sure you show what you can bring to the team. ('ideas' or 'management' do not count)
21  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-03-30 02:05:06
Finally finished my new in-line string colors.. here's a bunch of pages that now use it. Cheesy

Surely there's a better escape sequence than '§'.

It was just the only thing I could think of off-hand that absolutely would never need to actually be displayed on the screen and had a fairly easy to remember ASCII code (ALT+21) Smiley

ASCII alt-codes aren't cross-platform. You can use any symbol, as long as you have an escape for the symbol itself. (eg: for backslash escape sequences, you use \\ to show '\')

I wouldn't use backslash though, because then you have to double-escape it in your code ('\\\\')
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-03-30 01:00:37
Finally finished my new in-line string colors.. here's a bunch of pages that now use it. Cheesy

Surely there's a better escape sequence than 'ยง'.
23  Game Development / Newbie & Debugging Questions / Re: Trouble making VBO rendering easier on: 2015-03-30 00:55:36
You can't call glGenBuffers() in a static context.
I'm confused. What exactly do you mean?

public class Drawer {
    static boolean initialized = false;
    static final int vertices = 6;
    static final int vertexSize = 6;
   static int vboVertexHandle = glGenBuffers();
    // snip

I'm pretty sure you need a GL context available to call that.

Since it's a static variable, it is likely to be initialised before a Display or GLFW window is created. (I say likely because the JVM isn't very deterministic with this sort of thing)
24  Game Development / Newbie & Debugging Questions / Re: Trouble making VBO rendering easier on: 2015-03-28 21:55:56
You can't call glGenBuffers() in a static context.

Perhaps you should have a look at LibGDX, which will handle all this stuff for you, and uses good practices.
25  Java Game APIs & Engines / Engines, Libraries and Tools / Re: OBJ model is not rendering whole ( only part of it) on: 2015-03-28 21:05:42
You've already asked this question, and people have already given you a number of solutions.
26  Game Development / Newbie & Debugging Questions / Re: Trouble making VBO rendering easier on: 2015-03-28 20:10:05
I won't go into whether or not this approach is a good practice, but initialised is a local variable that is always set to false. You probably want it to be outside of the function.

Furthermore, you are redeclaring vertices and vertexSize in the if-block, whereas the drawArrays call will use the static class variable (which remain 0).

Fix those two up and it should work.
27  Discussions / Miscellaneous Topics / Re: What Anti-Virus are you using? on: 2015-03-22 03:17:26
It's been a while since I used Windows, but I used Avira when I was. It was nice and lightweight, and seemed to get the job done.
According to reddit, Avira+Malwarebytes is a good combination, using Avira for real-time protection, and Malwarebytes for scanning.

I've heard Avast was great in the past but that now it has sort of slipped.

Generally anything that comes preinstalled on a machine is crapware (Norton, Mcafee, etc.). Just because you get a paid product for free doesn't mean it's any good.

I'm on Linux, and I check everything I download before I run it, so I don't bother with an antivirus. Worst case scenario I can just nuke the system partition, clean out my home folder, and reinstall Arch.
28  Game Development / Newbie & Debugging Questions / Re: Basic enemy movement where A* isn't really needed? on: 2015-03-21 22:47:38

It's a bit confusing. The 'State' section talks about state machines, in the context of AI, even though the contents don't mention AI at all.
29  Game Development / Game Mechanics / Re: Push objects when walking into them on: 2015-03-20 03:55:25
The current top post on /r/ProgrammerHumor is somewhat relevant:

Reading how to do something is very rarely enough to solve a problem. Most of learning to program programming is guessing how something should work, trying it, inevitably breaking it, and after a few repeated cycles, getting the correct answer.

Unless you know what doesn't work, you're just going to run into the same problems later when you try something slightly different.
30  Discussions / Business and Project Management Discussions / Re: Newbie Dev Looking for a Team. on: 2015-03-12 03:33:29
All of those projects fail to even start. Pointing
Pages: [1] 2 3 ... 72
Dwinin (77 views)
2015-11-07 13:29:08

Rems19 (83 views)
2015-10-31 01:36:56

Rems19 (82 views)
2015-10-31 01:32:37

williamwoles (108 views)
2015-10-23 10:42:59

williamwoles (95 views)
2015-10-23 10:42:45

Jervac_ (113 views)
2015-10-18 23:29:12

DarkCart (139 views)
2015-10-16 00:58:11

KaiHH (120 views)
2015-10-11 14:10:14

KaiHH (162 views)
2015-10-11 13:26:18

BurntPizza (174 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 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‑
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!