Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (492)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (556)
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]
1  Java Game APIs & Engines / OpenGL Development / Re: Slick2D Problems on: 2013-07-25 22:24:45
Ok narrowed it down to the fact that im stretching a one pixel wide image across a very big length. (only the "top" and "bottom" images are effected). Any reason why this would be a problem in slick but not in normal lwjgl?

EDIT: Fixed, figured out that because my images weren't in the "power of 2" pixel grid it was doing something strange - simply had to change them from 1x6 to 4x6.
2  Java Game APIs & Engines / OpenGL Development / Re: Slick2D Problems on: 2013-07-25 20:42:39
No I did not! Thanks, that worked. But the lines (now not blurry) are still there?

http://cl.ly/image/3I030s2l1c3G
3  Java Game APIs & Engines / OpenGL Development / Slick2D Problems on: 2013-07-25 20:27:53
Hello!

I recently began converting my game to LWJGL from Java2D for obvious reasons. About halfway through the conversion I ran into drawing strings. So I switched to Slick2D. Now I have some strange bugs.
A. My images are being resampled! Why?
B. Theres a weird little bug thing over my textboxes/buttons. (these are composed of groupings of images to allow resizability)

Images:
http://cl.ly/image/3T382N1U3O0V How it used to look, LWJGL no slick
http://cl.ly/image/020t2a0G0Y1B How it looks now, with slick

Code:
http://pastebin.java-gaming.org/d6f910d6d63 GUIComponent (background is one, the buttons/textboxes are several of these)
http://pastebin.java-gaming.org/6f91d1d636d Load image function

The render function trickles down to the GUIComponents from my main loop class.

Does anyone know how to fix these issues?
4  Game Development / Game Mechanics / Re: Java G2D Game CPU Hogging (And I mean 183%) on: 2013-07-25 04:43:08
Ok.
5  Game Development / Game Mechanics / Re: Java G2D Game CPU Hogging (And I mean 183%) on: 2013-07-24 16:25:19
I'm not entirely sure what you mean by that. For what purpose?
6  Game Development / Game Mechanics / Re: Java G2D Game CPU Hogging (And I mean 183%) on: 2013-07-24 03:21:04
Figured it out! Wasn't using glPushMatrix() after each quad
7  Game Development / Game Mechanics / Re: Java G2D Game CPU Hogging (And I mean 183%) on: 2013-07-24 00:08:17
http://pastebin.java-gaming.org/d98dd665f69 - My Game Loop
http://pastebin.java-gaming.org/5d98d5d566f - Render() GUI.paint() & Component.paint()

Sorry about that, don't know why I didn't post code in the first place. As for libraries, I avoid them because I'm afraid they could be inefficient or protected so I can't produce a product with them. Is that the case, or does it not matter?
8  Game Development / Game Mechanics / Re: Java G2D Game CPU Hogging (And I mean 183%) on: 2013-07-23 22:40:28
While working on overhauling my drawing system to OpenGL, I've run into a problem. I got it to start drawing my GUI, but it will only draw two quads. It goes through the code of drawing the rest but it doesn't show them! Any ideas why?
9  Game Development / Game Mechanics / Re: Java G2D Game CPU Hogging (And I mean 183%) on: 2013-07-20 23:38:18
Wow, I had no idea OpenGL could even be used for 2D rendering, I noticed your tutorial link, I'll have to give them a read. Thanks!
EDIT: The Thread.sleep()s were a last ditch effort someone recommended as a fix.
10  Game Development / Game Mechanics / Re: Java G2D Game CPU Hogging (And I mean 183%) on: 2013-07-20 18:44:56
Went ahead and tried that, no luck. Still getting 180-200% CPU usage. Maybe I put it in the wrong place? (Tried start class and before the loop starts)
11  Game Development / Game Mechanics / Java G2D Game CPU Hogging (And I mean 183%) on: 2013-07-20 13:37:42
Hey guys, I'm making a multiplayer game with a packet system and interpolation for its loops, everything works great and no speed issues, but it literally uses 183% of my CPU, while other Java based games (minecraft, etc) use virtually nothing comparatively. I've tried several different implementations of Thread.sleep() but I can't do a sleep for longer than a few ms, so my cpu reduction is minimal. Any ideas? (Code below is the game loop class, there are also two other threads running the packet system (two while loops, one stuck on input.read until a packet comes in and the other checking an array of packets)

http://pastebin.java-gaming.org/8e5d9385d6d

EDIT: I can't do a long sleep because it will disrupt the game loop.
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Nickropheliac (15 views)
2014-08-31 22:59:12

TehJavaDev (23 views)
2014-08-28 18:26:30

CopyableCougar4 (33 views)
2014-08-22 19:31:30

atombrot (41 views)
2014-08-19 09:29:53

Tekkerue (40 views)
2014-08-16 06:45:27

Tekkerue (35 views)
2014-08-16 06:22:17

Tekkerue (25 views)
2014-08-16 06:20:21

Tekkerue (37 views)
2014-08-16 06:12:11

Rayexar (72 views)
2014-08-11 02:49:23

BurntPizza (49 views)
2014-08-09 21:09:32
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!