Drenius
|
 |
«
Posted
2014-02-22 23:34:42 » |
|
Hi there! Just got a little frustrated by my main project and decided to make something small. Here it is! It is... well... Pong. But with more boards and more balls and without game over. Hope somebody likes it. DownloadScreenshot: 
|
|
|
|
LiquidNitrogen
|
 |
«
Reply #1 - Posted
2014-02-23 03:23:27 » |
|
the game runs so fast that i cant play it.
|
|
|
|
Drenius
|
 |
«
Reply #2 - Posted
2014-02-23 03:46:53 » |
|
Uploaded a new version in which you can hold F1 to show FPS - could you report your average? Maybe it is just my device where it has maximum about 60 FPS...
|
|
|
|
Games published by our own members! Check 'em out!
|
|
saucymeatman
|
 |
«
Reply #3 - Posted
2014-02-23 03:54:12 » |
|
Im getting 1500 fps. Unplayable. :{
|
|
|
|
Drenius
|
 |
«
Reply #4 - Posted
2014-02-23 03:55:07 » |
|
Ugh, okay, sorry! Will limit it, wait a minute!
|
|
|
|
Opiop
|
 |
«
Reply #5 - Posted
2014-02-23 03:55:27 » |
|
I'm getting 60... odd! I still gave up after I hit -16 points though... 
|
|
|
|
Drenius
|
 |
«
Reply #6 - Posted
2014-02-23 04:01:49 » |
|
Okaay, limit implemented! Better?
@opiop64: Thats reassuring! About "-16" - it takes some practise, but it is possible to get over +20!^^
|
|
|
|
LiquidNitrogen
|
 |
«
Reply #7 - Posted
2014-02-23 05:22:30 » |
|
still running about 1400fps here
|
|
|
|
BurntPizza
|
 |
«
Reply #8 - Posted
2014-02-23 05:35:35 » |
|
I'm getting a smooth 60 here. Running Win7 64
Pretty hard, I keep bouncing between (pun intended) -2 and 1 or so. The opponents move quicker and can launch the ball (square?) much faster than the player.
|
|
|
|
Drenius
|
 |
«
Reply #9 - Posted
2014-02-23 13:31:03 » |
|
@LiquidNitrogen: *facepalm* forgot to update the "lastFrameStart" variable every frame. But now it should be better... @BurntPizza: Normally the boards should be exactly equal fast. There are some glichy balls exceeding the velocity limit, are you talking about those?
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Gibbo3771
|
 |
«
Reply #10 - Posted
2014-02-23 13:36:43 » |
|
LOL dude this is awesome, you know why? 
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
Drenius
|
 |
«
Reply #11 - Posted
2014-02-23 13:48:33 » |
|
Of course there has been something like it. The concept is just too simple...
|
|
|
|
Gibbo3771
|
 |
«
Reply #12 - Posted
2014-02-23 14:14:10 » |
|
I had a ton of fun playing crash bash, if you made this local multiplayer for giggles it would be epic lol.
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
Drenius
|
 |
«
Reply #13 - Posted
2014-02-23 14:23:02 » |
|
Er... What?
|
|
|
|
Opiop
|
 |
«
Reply #14 - Posted
2014-02-23 14:31:10 » |
|
If you made the game multiplayer and included LAN capabilities you will giggle, apparently
|
|
|
|
Gibbo3771
|
 |
«
Reply #15 - Posted
2014-02-23 14:33:50 » |
|
Er... What?
Basically just have different keys to control different paddles, that means when I am drunk with a bunch of mates we can play this and have epic battles lol. It is good, simple and nice.
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
Drenius
|
 |
«
Reply #16 - Posted
2014-02-23 15:45:54 » |
|
Okay, new version: F2 enables 2-player mode! Control with A/D.
|
|
|
|
Danny02
|
 |
«
Reply #17 - Posted
2014-02-23 18:37:51 » |
|
can you package lwjgl with it? I can't play because it can't find lwjgl native libs
|
|
|
|
Drenius
|
 |
«
Reply #18 - Posted
2014-02-23 19:10:00 » |
|
Okay, another update. F2 now switches between 1-2-3-4-player mode. Leftshift/Ctrl for Player3 (West) and Enter/+ for Player4 (East).
@Danny02: It should extract its natives automatically. On which OS are you trying to run it?
|
|
|
|
kappa
|
 |
«
Reply #19 - Posted
2014-02-23 19:15:59 » |
|
I can't play because it can't find lwjgl native libs
Same problem here, on Linux.
|
|
|
|
Drenius
|
 |
«
Reply #20 - Posted
2014-02-23 19:20:42 » |
|
Thats good. Just have to find a way to determine whether the OS is Linux... Just a moment...
|
|
|
|
Longarmx
|
 |
«
Reply #21 - Posted
2014-02-23 19:23:56 » |
|
1
| String os = System.getProperty("os.name").toLowerCase(); |
|
|
|
|
Drenius
|
 |
«
Reply #22 - Posted
2014-02-23 19:26:26 » |
|
Using this, but the Strings for all the OSs... What are yours?
|
|
|
|
LiquidNitrogen
|
 |
«
Reply #23 - Posted
2014-02-23 20:12:07 » |
|
sweet i got 12 points
|
|
|
|
BurntPizza
|
 |
«
Reply #24 - Posted
2014-02-23 20:15:22 » |
|
Using this, but the Strings for all the OSs... What are yours?
Should work: 1 2 3 4 5 6 7 8 9 10 11 12
| public enum OS { Windows, Mac, Unix, Solaris; }
public OS detectOS() { String os = System.getProperty("os.name").toLowerCase();
if(os.indexOf("win") >= 0) return OS.Windows; if(os.indexOf("mac") >= 0) return OS.Mac; if(os.indexOf("nix") >= 0 || OS.indexOf("nux") >= 0 || OS.indexOf("aix") > 0 ) return OS.Unix; if(os.indexOf("sunos") >= 0) return OS.Solaris; } |
Adapted from http://www.mkyong.com/java/how-to-detect-os-in-java-systemgetpropertyosname/
|
|
|
|
Drenius
|
 |
«
Reply #25 - Posted
2014-02-23 20:49:51 » |
|
Ok, changed the determination to this method. Does it work?
|
|
|
|
kappa
|
 |
«
Reply #26 - Posted
2014-02-23 21:02:32 » |
|
Ok, changed the determination to this method. Does it work?
Tried download again, nope still doesn't work.
|
|
|
|
Drenius
|
 |
«
Reply #27 - Posted
2014-02-23 21:07:20 » |
|
Is there any error log?
|
|
|
|
BurntPizza
|
 |
«
Reply #28 - Posted
2014-02-23 21:14:24 » |
|
@Drenius, you should add some print statements or something to Project.loadNatives() so that people can see if their os was even detected.
|
|
|
|
Drenius
|
 |
«
Reply #29 - Posted
2014-02-23 21:19:16 » |
|
Well, it should print "Unable to load native libraries: Operating System not supportet or not recognized" if not... Uploading another new version printing which OS was detected.
Does it run now or what does it print in?
|
|
|
|
|