Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (736)
Games in Android Showcase (223)
games submitted by our members
Games in WIP (813)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  RGB (Red Green Blue)  (Read 7420 times)
0 Members and 1 Guest are viewing this topic.
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Posted 2015-06-01 19:47:45 »

Hello JGO:

Today I will show you my game RGB. It is named so because of the color of the items within the game. Red is the player, green are the enemies, and blue is the target. This game is based off of "The World's Hardest Game", except for the fact that it's all in about 16 KB. Here's a fairly non-descriptive screenshot:



The enemies move forwards and backwards (not very well represented in the picture), and you (the red square) are trying to get to the target (the blue square). Please ignore the _MacOSX file that will probably occur when you extract the archive. There are 3 levels. Once you get to the end, it will say "You Win!" regardless of your score.

If you'd like to try the game, the link is here

- DarkCart

The darkest of carts.
Offline Jesse

JGO Coder


Medals: 23



« Reply #1 - Posted 2015-06-01 19:58:32 »

Tried it (OS X). For me, the green squares are moving repeatedly right to left (wrapping at the left edge), and not back and forth. Also, they're moving in noticeably discrete steps (looks like about 5 frames per second) rather than smoothly.

Does that sound right? Just wondering if maybe I'm seeing some bugs on my system.
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #2 - Posted 2015-06-01 19:59:25 »

Tried it (OS X). For me, the green squares are moving repeatedly right to left (wrapping at the left edge), and not back and forth. Also, they're moving in noticeably discrete steps (looks like about 5 frames per second) rather than smoothly.

Does that sound right? Just wondering if maybe I'm seeing some bugs on my system.

Yeah, that is all supposed to be happening.

The darkest of carts.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jesse

JGO Coder


Medals: 23



« Reply #3 - Posted 2015-06-01 20:03:03 »

Oh, ok - just making sure Smiley
Offline SauronWatchesYou

JGO Ninja


Medals: 33
Projects: 4
Exp: 2 years


Hi there! :)


« Reply #4 - Posted 2015-06-01 20:26:41 »

Was it compiled with Java 8? Got the following error

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/darkcart/
game/hg/HardGame : Unsupported major.minor version 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

Hey, you! Back to work
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #5 - Posted 2015-06-01 20:29:33 »

Yes, it is Java 8, I forgot to mention that

The darkest of carts.
Offline SauronWatchesYou

JGO Ninja


Medals: 33
Projects: 4
Exp: 2 years


Hi there! :)


« Reply #6 - Posted 2015-06-01 20:31:30 »

Yes, it is Java 8, I forgot to mention that

*waggles fist* Tongue

Hey, you! Back to work
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #7 - Posted 2015-06-01 20:49:13 »

Yeah... sorry..

The darkest of carts.
Offline chrislo27
« Reply #8 - Posted 2015-06-02 02:59:30 »

Started up the game (Windows 7) by right clicking and opening with Java and got this:


However opening with command line (java -jar RGB.jar) worked.

It's definitely very... choppy. I don't mean that negatively, but it's not exactly positive either. Maybe that's the point of the game so you have to use reflexes and timing to win. If you had more levels with varying difficulty this would definitely be a lot more playable and fun.

Keep up the good work!  Grin
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #9 - Posted 2015-06-02 10:49:53 »

It's definitely very... choppy. I don't mean that negatively, but it's not exactly positive either. Maybe that's the point of the game so you have to use reflexes and timing to win. If you had more levels with varying difficulty this would definitely be a lot more playable and fun.

Keep up the good work!  Grin

I'm actually working on killing some of this choppiness as we speak, so it may not be choppy for (much) longer. I agree, it could use more levels. Thanks for your feedback

The darkest of carts.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline craftm

JGO Coder


Medals: 15
Projects: 1


_Keep Trying


« Reply #10 - Posted 2015-06-02 14:46:33 »

Tried it (OS X). For me, the green squares are moving repeatedly right to left (wrapping at the left edge), and not back and forth. Also, they're moving in noticeably discrete steps (looks like about 5 frames per second) rather than smoothly.

Does that sound right? Just wondering if maybe I'm seeing some bugs on my system.

Yeah, that is all supposed to be happening.
Very low FPS here, win7 64x, but the game is running properly (I realized that sometimes I do not even die in collision with green squares).

Why should it low FPS happen? it is on purpose?

_ Wink
Offline SHC
« Reply #11 - Posted 2015-06-02 14:57:16 »

I tried to debug this JAR to find the cause, he is using a swing Timer with a sleep time of 25 milliseconds, yielding 1000/25 = 40 FPS. And the movement because he is jumping 15 pixels per key press.

Offline gzuzboey
« Reply #12 - Posted 2015-06-02 15:55:38 »

I tried to debug this JAR to find the cause, he is using a swing Timer with a sleep time of 25 milliseconds, yielding 1000/25 = 40 FPS. And the movement because he is jumping 15 pixels per key press.

@DarkCart Why are you using a swing Timer, you really should consider trying out libgdx or even lwjgl. You wouldnt have these types of problems if you did use those. But anyways, best of luck Wink

YA BOI
Offline CopyableCougar4
« Reply #13 - Posted 2015-06-02 16:26:54 »

For better FPS syncing, check out https://github.com/LWJGL/lwjgl/blob/master/src/java/org/lwjgl/opengl/Sync.java

Either wandering the forum or programming. Most likely the latter Smiley

Github: http://github.com/CopyableCougar4
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #14 - Posted 2015-06-02 16:57:27 »

I'll say it again. I am working on the lag and FPS. (Also coins.)

The darkest of carts.
Offline gzuzboey
« Reply #15 - Posted 2015-06-02 17:27:04 »

Are you using Java2D?

YA BOI
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #16 - Posted 2015-06-02 17:32:47 »

Are you using Java2D?

Yes. I know what you're going to say ("You should use LWJGL or LibGDX!!"). I wish people would stop pushing me to use LWJGL or LibGDX.

The darkest of carts.
Offline SHC
« Reply #17 - Posted 2015-06-02 17:35:13 »

I wish people would stop pushing me to use LWJGL or LibGDX.

Even if nobody said that to you, you will find yourself using one of those in the near future, when you get to make actual games. I don't want to make any offence to Java2D, it is just not the right tool for game development.

Offline gzuzboey
« Reply #18 - Posted 2015-06-02 17:35:54 »

Are you using Java2D?

Yes. I know what you're going to say ("You should use LWJGL or LibGDX!!"). I wish people would stop pushing me to use LWJGL or LibGDX.

No... i wasnt. I was just asking because since shc was talking about the swing timer, I thought you were using swing only.  Undecided
But still, out of curiosity, why do you use Java2D?

YA BOI
Offline DarkCart

JGO Kernel


Medals: 121
Projects: 9
Exp: 50 years


It's all in the mind, y'know.


« Reply #19 - Posted 2015-06-02 17:54:00 »

Are you using Java2D?

Yes. I know what you're going to say ("You should use LWJGL or LibGDX!!"). I wish people would stop pushing me to use LWJGL or LibGDX.

No... i wasnt. I was just asking because since shc was talking about the swing timer, I thought you were using swing only.  Undecided
But still, out of curiosity, why do you use Java2D?

Oh. I'm sorry for jumping to conclusions. I guess I still use Java2D because that's the API I used to make "Mazer" with, and I guess I never looked back to see what other options there were.

To provide some insight on this, here's what I can do with LWJGL at the moment.



That's all direct rendering, no VBOs or anything. In Java2D, I can do things like RGB.

The darkest of carts.
Offline chrislo27
« Reply #20 - Posted 2015-06-02 22:38:46 »

I understand you're quite comfortable with Java2D at the moment. I was like that with Slick (an outdated game library). I decided to give libGDX a shot only last summer and while it's definitely more powerful, it in turn is much more complicated (I still don't understand the Camera class Lips Sealed).

I suggest you keep going with something you're comfortable with, and maybe on your other time try to re-create an older game of yours to libGDX or some other library. LibGDX is basically a kind of wrapper for LWJGL to make it more understandable.

Good luck! Grin
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 
cybrmynd (120 views)
2017-08-02 12:28:51

cybrmynd (144 views)
2017-08-02 12:19:43

cybrmynd (139 views)
2017-08-02 12:18:09

Sralse (154 views)
2017-07-25 17:13:48

Archive (624 views)
2017-04-27 17:45:51

buddyBro (733 views)
2017-04-05 03:38:00

CopyableCougar4 (1260 views)
2017-03-24 15:39:42

theagentd (1239 views)
2017-03-24 15:32:08

Rule (1216 views)
2017-03-19 12:43:22

Rule (1268 views)
2017-03-19 12:42:17
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!