Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (602)
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 ... 9
1  Game Development / Newbie & Debugging Questions / Re: Finding out if car is sideways on: 2015-07-20 10:14:17
This is some simple code I used (where body is the car).

    * Kill the literal velocity

   void updateFriction(Body body)
      Vector2 impulse = getLiteralVelocity(body).scl(-0.1f*body.getMass()/maxSpeed*getSpeed());
      body.applyLinearImpulse(impulse, body.getWorldCenter(), true);
   Vector2 getLiteralVelocity(Body body)
      Vector2 currentRightNormal = body.getWorldVector(new Vector2(0, 1));
      return currentRightNormal.scl(;

getWorldVector returns the vector from the car's perspective, so you want to kill vertical velocity (car's perspective) although it would be quite handy for parallel parking Smiley

I followed this tutorial (implemented in Box2D) but can be applied everywhere since it's about car physics:

EDIT: It also explains an easy way to get your car drifting.
2  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-07-05 10:49:15
When I finally fell asleep, I had some extremely psychedelic dreams concerning a purple glowing clone of me created by selling my soul to some weird entity [...] Eventually the police came and I tried to escape.
I think you should definitely make an RTS game about your dream Grin

Some mentally-focussed RTS that doesn't make you king of slaves but of real people (not king of mars, but president of america).

One where you can build soul-exploitation facilities to turn villagers into purple super warriors (ghosts), and cancer research facilities to turn villagers into intelligence? (F.E. 1 villager is 1 intelligence and 1000 intelligence could be the required knowledge for a soul-exploitation facility?)
You forgot to quote the most important part, the pizza. So you can build a pizzahut, which makes villagers actually go to the above facilities out of free movement (in a dreamy state, zombielike, cuz that's what all games are about)

While we are at it, we also make a national newspaper production centre. Which provides (false) sided propaganda for us, which makes villagers fight for our mistaken cause in politics.
3  Discussions / Miscellaneous Topics / Re: What's your favorite OS and why? on: 2015-06-06 09:41:14
Arch Linux here as well.

Just the package manager is enough reason for me to love Linux. Think about the pain to install jdk on Windows, or about compiling silly programs. (You can only compile Rust programs in the Rust shell instead of cmd, there is probably a workaround for that etc.. etc.., another reason why Windows should be avoided)

Why Arch? Totally customizable, the disadvantage of 'totally customizable' is that it could need some time before it's ready to use though (depends on what you want, but I personally like the i3 tiling window-manager where you have to install every function yourself). In the beginning it's quite annoying that when you are working, think of making a screenshot, and find out that you haven't installed any software to make that screenshot. But in the end, you have something that's totally yours (although I still and probably forever make adjustments/changes). For example, I programmed my own status bar in C to replace default status bar from i3 (i3-status). In the upcoming vacation I am also planning on writing my own Display (Login) Manager.

I still use Windows a lot though, it's essential. A lot of things are Windows-dependent: games, but think about Microsoft Office or Paint.NET as well.
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-29 21:16:04
Played around with Perlin Noise for the first time to generate 'sky'. (Yes the landscape is a bunch of Math.randoms)
The following images may look better when you click on them.

Two types of space:

No doubts, this one looks craz... very abstract

Yes this one has sharp contrast with the landscape


5  Discussions / General Discussions / Re: Rayvolution's JGO Appreciation Thread (AKA: Free copies of Retro-Pixel Castles!) on: 2015-05-27 17:37:49
Sure, I would appreciate a copy, it would be rude to ignore this present, no?

I don't know if it matters but I already have an account: profile

Thanks in advance.
6  Games Center / WIP games, tools & toy projects / Re: Dominance (work title) - spaceship war game on: 2015-05-26 20:40:09
Thanks for your concern, I still am active on the forum indeed but in peace and silence!

And admirable to be able to make such a game without even one drawing, creativity does not rest within paint skills but in solvability and innovativity I suppose.
Well, about the crash... I was actually searching for a file, I didn't launch it from the terminal since I'm on Windows. I had to do some work...
7  Games Center / WIP games, tools & toy projects / Re: Dominance (work title) - spaceship war game on: 2015-05-26 19:40:02
That was a lot of fun Grin

Is all of the art generated with standard drawing functions? It all looks really good (especially the radar and spawn portal)!

I encountered one little problem though, which needed a Ctrl+Alt+Del since I played fullscreen:
The game crashed when a red enemy ship got swallowed by my portal. (It was really small when the game crashed at least)
Your program probably doesn't generate output error messages since I couldn't find a log from your game, so I am sorry for not being able to provide you more information than this.
8  Discussions / Miscellaneous Topics / Re: I'm baaaaack... on: 2015-05-23 00:48:33
Alternatively I have participated in the programming competitions at I especially like the King-of-the-hill competitions.

You made me remember them again... So I decided to do something with the somewhere on this forum mentioned Rust language (thanks for that, Rust is quite fun so far, although I'm still a newbie ofcourse).

Don't spend years of your life on something that will give you almost nothing in return.

And this is most important question in our life for all of us =)

What you can do more important in free time then programming?
In most cases: drink, make fun, play games, watch videos, sleep and another stuff “that will give you almost nothing in return” in next days even not talking about next months or years.

Let flame this question, really I want know you’re opinion – what alternative you have? =)

Agreed upon. The best would be thinking/studying about the afterlife, if it exists life on earth is literally a wink, philosophy is quite fun too + makes people more interesting IMO.
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-30 21:08:30
Started this week working on my own project since school started -.-

I started to built random level generation which I'm going to use for my project.
The last time I posted something about it was a (very much alpha) video on page 10 in this thread.

More fun than school! Wink
10  Games Center / WIP games, tools & toy projects / Re: Bit Siege - 2D Competitive Multiplayer PvP Game. (Patch v1.3.1 out now!) on: 2015-01-20 18:45:03
Your website looks nice and clean. Your game LOOKS a lot of fun too. Sadly enough there aren't any games up, atm.
I also would suggest a server setup page where you can choose max players, etc.. and most important choose the port the server should use .

A little bit of curiosity: what future plans do you have for this game and are you working on this project all alone (that's how it sounds)?

I hope I can play it soon. Wink
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-15 21:01:23
How do you know the names/addresses and the layout of the data in the executable?

It's crazy what people can do with memory searchers like CheatEngine...
I have messed for a little while in that business but I don't think I have it in me.
12  Game Development / Newbie & Debugging Questions / Re: Java code migration to Android on: 2014-11-26 09:53:23
This is one reason why people use libraries... If you want to do coding for multiple platforms at once (android, computer, ios etc.)
use LibGDX for example (it even supports WebGL). Otherwise, you have to do some "simple copying" yourself.
13  Game Development / Newbie & Debugging Questions / Re: Adding a ActionListener to JOptionPane.showOptionDialog? on: 2014-11-03 21:33:57
Had to change it to:

That while-loop is out of the question...
The custom dialog is a better option.

But I would say to just 'do nothing' when the user leaves it empty.
Error messages are really annoying sometimes, certainly when you accidentally activate something and it doesn't leave after a blow on ENTER.
14  Discussions / General Discussions / Re: Icebucket challenge ??? on: 2014-08-29 19:15:00
This Ice Bucket Challenge is like 'race against cancer'.

People want to do 'weird' things (race, nominate), and what do they do? Connect it with something 'good': "Hey I'm Chris and I'm squeezing boobs for charity" (this quote is real, three guys gave 20 dollars to charity per pair of squeezed boobs, it's not really the same, but comparable).
15  Game Development / Game Play & Game Design / Re: Need Opinions - yes really - Game Control on: 2014-08-23 18:07:49
It's kinda make to be a successor to Legends of Yore, so I'm thinking mobile is where I like to play best.

It's really where the question came from, I love the free movement but on mobiles past experience makes me think it's not as nice as infrequent tapping.

There is a certain difference between turn-based games and infrequent tapping...
It's not like free movement can't have that infrequent tapping, moving tile by tile, the difference is kind of that other objects in the world keep moving whether you do something or not.
16  Game Development / Game Play & Game Design / Re: Need Opinions - yes really - Game Control on: 2014-08-23 17:16:33
For desktop I would use: keyboard
For mobile I would use: touchscreen
For ouya I wou...

Oh wait, that's not the question, next time I will read the main post, promise. Kiss

Certainly free movement. I would have played LOY so much more if that game wasn't turn-based...

And about 2: Players want to do things (move/attack) themselves, if everything happens for them, (no choice, for as far as 'free will' exists Roll Eyes) and they can't decide to exchange some loot for some health, it's the end of the fun.

Sorry for this subjective post, but you asked for our personal opinions, so here it is. Smiley
17  Games Center / Contests / Re: Ludum Dare 30 (Connected Worlds) on: 2014-08-23 13:15:17
Oh, my suspicions about notch participating were true:

Edit: his internet connection probably can't keep up very well (2.6k+ viewers, if that matters) Tongue
18  Discussions / Miscellaneous Topics / Re: Life is like a strategy game sort off on: 2014-08-06 21:15:16
The fact that " you" can't influence the brain's electrons is a red herring - you are the brain's electrons!

That's funny, since electrons can't do anything on themselves... Smiley:
basically an electron is moved by the forces they exert on each other
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-08-02 10:02:24
How will it become scrap?

It was a joke/sarcasm. Some people think that way... So don't take me too serious Wink

Your memory seems quite slow compared to the other high-end PC's, didn't you pay attention to the CAS Latency?
You have the best processor out there, so I don't understand why that score is so 'low' either, you were probably gaming, watching movies, video-editing, installing windows and recording while doing that test. Wink Or maybe it is because your memory 'under-performs' compared to other desktops (or even your laptop with 18.26) which also has effect on your CPU, your PC is ready for his first upgrade Grin (joking joking joking).
It's (very probably) because the other CPU's are overclocked, so don't worry Wink
Very very good video card though, it should be able to handle Minecraft Wink (You know my bad-joke-habits by now, right? Smiley)
20  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-08-01 21:35:40
780 ti, i7 4770k, 8 GB of corsair vengeance DDR3, 150 GB SSD, 1 TB HD, Asus Z87 Pro Wifi AC motherboard, and an 850 watt PSU.

Ok, if you do it, you do it good.
That 850 Watt PSU is a lot though, even for your (overclocked) setup. Well, I guess it keeps the possibility to upgrade your desktop open when your PC becomes scrap over a few months when next gen Intel processors come out. Wink

Tore apart my computer, made a ton of upgrades.
Re-Installed Linux.

Tore apart my computer, made a ton of... dust disappear to live happily with his friends in the vacuum cleaner.

So you re-installed Linux? (sounds like an upgraded data storage Wink) Funny, I considered this picture quite matching, when I was searching for funny vacuum cleaner pictures out of boredom after writing this post:

21  Game Development / Newbie & Debugging Questions / Re: [LibGdx]PPM conversion Error on: 2014-07-30 20:30:41
Make it a float: float PPM = 6.0f;

An int won't work because if you do 5/6 it returns 0, like you do here:
shape.setAsBox(5 / PPM, 5 / PPM);
22  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2014-07-28 07:37:56
Finally actually built a "real" lumber mill graphic, what do you think?

How about an upgradeable lumbermill/buildings, because they both are good Smiley
23  Game Development / Networking & Multiplayer / Re: Converting from TCP to UDP - Threading Clients? on: 2014-07-26 19:26:28
Do I need to establish a specific port for the client to listen to the server?

The answer: No, you should not.

If the client doesn't receive any messages, it's because you are doing something wrong in the server or (probably) client, you are probably using more than one datagramsocket in your client? (which you should not)
24  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-25 17:49:54
Mind crushingly tedious in 30 degree heat with no air-con.
The wind blew your way a few days ago then, gheheh.

I teached my little nephew (11 yrs) HTML (yesterday evening and today), he understands the basics, head/body, and tags with properties, like <font>.
And... most importantly, I learned him how to Google!
25  Game Development / Networking & Multiplayer / Re: Converting from TCP to UDP - Threading Clients? on: 2014-07-25 15:26:59
As far as packet loss, I think I'd like to take a thwack at that myself before looking for help. Looks like it might be kinda fun Smiley

Haha, that's the spirit! And heck you will learn a lot thanks to that spirit Cheesy

And about the sending of packets, actually, in the same class, I had this function:

public void write(DatagramPacket dp, int pckg, String[] parts) {
      String msg = "" + pckg;
      for(int i = 0; i < parts.length; i++)
         msg += PackageHandler.separator + parts[i];
      msg += PackageHandler.endPackage;
      try {
      } catch (IOException e) {

int pckg, tells the server/client what to do with this data:
  • a login
  • input
  • or whatever
26  Game Development / Networking & Multiplayer / Re: Converting from TCP to UDP - Threading Clients? on: 2014-07-25 10:23:48
Possible UDP setup?:

 * Attempt to communicate with server. If successful...
   * Creates a thread to listen for messages from server.
   * Processes client input, sends messages from server, interprets server response.

 * Create Main listen thread
   * Main Listen thread gets ALL messages from ALL clients. As soon as a message comes in, it determines which client it belongs to and hands the message off to a client-specific thread (or creates one if this is the client's first time connecting)
      * Client Listen thread processes the message and passes the response back to the client.
 * Processes server input, sends messages to client, interprets client messages.

This is exactly how you should do this, I see you have already digged into this stuff (which is why I reply).
You should ignore tkausl's suggestion because I see no reason why you shouldn't do this yourself, if you want to keep it fast and organized at least...

Here is how I did it in my previous game:
   public Runnable receiver = new Runnable(){
      byte[] receiveData = new byte[1024];
      int id = 0; // until we have connection to database use this temporary!!!!
      public void run(){
            try {
               DatagramPacket datagramPacket = new DatagramPacket(receiveData, receiveData.length);
               for(Client c : clients){
                     break total;
               clients.add(new Client(datagramPacket, id++));
            } catch (Exception e) {

I also have very nice code which handles the packet loss and eventual delivers them in order (and in incredibly quick Smiley ), if you would like to have them, you know where to find me.
27  Games Center / WIP games, tools & toy projects / Re: Age of Conquest IV - Risk-like Strategy Game on: 2014-07-22 17:10:13
I wonder about the water color however! I like the water color in C. What's your guys take?

So small difference, but A wins the price.

A looks the best indeed, but I think that is because the water is varied (it is not as plain as in B/C).
There are 2 colors mixing in A (which makes it different from the water in B), but its a little dark.
If you mix another (somewhat more blue/dark) color through C like you did in A, it may be looking great.
28  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-22 12:23:42
Wauw Kev, you did that in 30 minutes Shocked
I just got an inferiority complex persecutioncomplex

Anyway, this is how my game progressed, but I took some more time though: Tongue

<a href=";hl=en_US&amp;start=" target="_blank">;hl=en_US&amp;start=</a>
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-07-16 18:50:01
I wrote a small program which does raycasting through a 3D texture.

1. Find MRI image.
2. Split it up into individual frames.
3. Put frames in folder of program.
4. Profit, in the form of broccoli!

Wow, that's actually amazing! You should make this into actual software, companies could pay big bucks for a easy to use program like this Smiley

With companies, you mean: farmers, broccoli factories Roll Eyes (I wanted to say 'plants' Wink) and greengrocers? Grin
30  Games Center / Featured Games / Re: Daedalus on: 2014-07-15 09:35:21
Actually, (after a lot of testing) the float based crap killed it. At first it works fine, but sooner or later it got out of sync anyway (with multiple devices).
I did all kinds of NASTY tricks to avoid the float based crap, I only executed steps with a delta of 1/60 (this alone already counters the frame rate thing you spoke of) and I attempted to kill the float difference by multiplying velocities/positions by 1000, making an integer of them, and divide it by a thousand again, but even if I only used small forces (or do even more really nasty tricks like checking how big the velocity is, and based on that do some multiplying/dividing), it gets out of sync after a certain amount of collision happens.

I also wanted to keep track of the game with my server (kills etc.), so you need to simulate the game anyway. And I found out that just sending positions etc. eats less bandwidth (on both sides) than sending inputs does.
Its better to just send positions etc. from the simulating server to the client so you are 100% sure each client is synchronized. Another problem were joining players, I did send all input from the beginning of the game to the player, so the client could update the game to the current state, you probably can imagine how much that is if the game is already going on for 10 minutes ... (And then I haven't even spoken of simulating the 10 minutes)

It was just not worth it, so many nasty tricks, ugly code (and processor overheating Wink) to just get them synced on inputs, and it turned out to be worse for both sides.
It was an interesting time occupation though, I learned so much. Smiley
Pages: [1] 2 3 ... 9
Jesse (15 views)
2015-07-29 04:35:27

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

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

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

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

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

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

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

NoxInc (31 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 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!