Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
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 / Java 2D / Re: Getting all available screen resolutions on Linux on: 2013-10-21 11:14:57
Thanks a lot for all the answers! I'll have a look over my code.  Wink
2  Java Game APIs & Engines / Java 2D / Getting all available screen resolutions on Linux on: 2013-03-11 19:57:19
Hey everyone,
I'm trying to fetch all currently available resolutions of the screen. The problem: I'm only getting the active screen resolution (on Linux).  the following code works on Mac & Windows but not on Linux:

1  
2  
3  
4  
5  
6  
7  
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice display = ge.getDefaultScreenDevice();
DisplayMode[] availableModes = display.getDisplayModes();
     
for (DisplayMode mode : availableModes) {
    System.out.println(mode.getWidth() + "x" + mode.getHeight());
}

Any suggestions?  Huh
3  Java Game APIs & Engines / Engines, Libraries and Tools / NiftyGUI: Problem with label control on: 2013-01-30 15:56:11
Dear JGO,
I'm currently writing a game with Slick2D and NiftyGUI (v. 1.3.2). As always I've created a simple XML file with a center aligned panel. The panel contains two labels (horizontal oriented):

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
?xml version="1.0" encoding="UTF-8"?>
<nifty xmlns="http://nifty-gui.sourceforge.net/nifty-1.3.xsd" xmlns:xsi="http://
www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://nifty-
gui.sourceforge.net/nifty-1.3.xsd http://nifty-gui.sourceforge.net/nifty-1.3.xsd"
>
<useStyles filename="nifty-default-styles.xml" />
<useControls filename="nifty-default-controls.xml" />
<screen id="start">
   <layer>
         <!-- Caption -->
         <panel childLayout="horizontal" align="center">
            <control
               id="lblCaption"
               name="label"
               color="#bccf39"
               text="caption"
            />
            <control
               id="lblVersion"
               name="label"
               text="version"
               marginLeft="10px"
               color="#ff6000"
            />
      </panel>
    </label>
</screen>

I can change the text content of those controls in Java:

1  
2  
3  
4  
// Inside a screen controller...
Label lblVersion = screen.findNiftyControl("lblVersion", Label.class);
Label lblCaption = screen.findNiftyControl("lblCaption", Label.class);
lblCaption.setText("A very long long long long long text!");

The text will be changed - but not the width of the label! The result: the text is cropped. That's very annoying. I've tried the following solution to solve the problem:

1  
2  
3  
4  
TextRenderer renderer = lblCaption.getElement().getRenderer(TextRenderer.class);
lblCaption.setWidth(new SizeValue(renderer.getTextWidth() + "px"));
// Update the panel and all children
lblCaption.getElement().getParent().getParent().layoutElements();

This works for me but it's not a very elegant way. Has anyone experience with this problem?  Huh
4  Games Center / Showcase / Re: Avoider on: 2013-01-23 00:37:47
Awesome game. So simple. I've reached 349 points...  Angry
5  Discussions / General Discussions / Re: Your major past/future accomplishments on: 2013-01-23 00:32:50
I want to finish something.
Made my day  Grin That's a huge task!
6  Discussions / General Discussions / Re: Your major past/future accomplishments on: 2013-01-22 23:54:23
I want to write my own 3D engine (in many many years...) and an infinite space game like Infinity from Keith Newton.  Pointing
7  Discussions / Miscellaneous Topics / Re: Java 4-Ever on: 2013-01-22 20:40:50
The movie has never existed (sad...) But the trailer is truly epic!  Grin
8  Discussions / Miscellaneous Topics / Re: Is programming as a job boring? on: 2013-01-22 20:37:31
Never! Other guys play soccer, I'm programming instead. That's it.  Pointing
9  Game Development / Newbie & Debugging Questions / Re: Java - Smooth tiles movement on: 2013-01-22 20:28:43
The moving speed should be a float value like 0.2f. To calculate the total moving amount, multiply the speed with the current frame delta:

1  
float speed = 0.2f * delta;


After that, you could move your tile (or game object, whatever) in any direction. After reaching the next tile cell, you can stop the movement (in a tile based map). Or how does your "tile" game look like?
10  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Slick2D - Zooming on: 2013-01-22 16:11:51
I've played with camera zooming in Slick2D as well. With parallax scrolling and tile mapping it becomes a little bit tricky because you've to recalculate the camera size with the current zoom factor.
11  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Slick: lwjgl in java.library.path on: 2013-01-22 16:01:43
It's also important to include the natives for the operating system you're currently working with. In Eclipse IDE you can separately determine the native folder for each jar in the library path.
12  Game Development / Game Play & Game Design / Re: Making 2D games creepy? on: 2013-01-22 15:36:07
To make a game creepy, I'd like to use simple lighting effects (in 2D with alpha mapping, you could create torches with flickering lighting effects). Additionally, you could play with camera zooming and blurring effects. Scan lines are effective as well (vintage look & sometimes creepy).

In fact, music and sounds can create a scary atmosphere. The game "SCP-087" uses several noises in order to create a creepy feeling.
13  Game Development / Game Play & Game Design / Re: Favorite Window Size on: 2013-01-22 15:28:52
I'm always using 800x600 during the development process. Higher resolutions are good but they often depend on the players available hardware.
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.

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

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

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

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

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

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

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

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

BurntPizza (42 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
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!