Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (555)
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  Games Center / WIP games, tools & toy projects / Re: Isotröma (Tesseract 2) on: 2013-12-06 05:42:41
This looks awesome! I am more a fan of the earlier pictures though with the lines and triangles. Keep working on this. Smiley
2  Games Center / WIP games, tools & toy projects / Re: Diamond Square Terrain on: 2013-12-05 06:59:22
Good work! I'm just trying to draw a simple triangle strip grid and man I can't imagine how hard this was....
3  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [Solved] Issue with LWJGL Space Inaders Example on: 2013-11-09 07:19:42
Thank you everyone!!

Especially Magn919 for the solution and easy fix and philfrei for all the links and info.
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Issue with LWJGL Space Inaders Example on: 2013-11-08 09:09:07
It's possible I didn't load it right? I just made a folder in my workspace project folder called 'res' and put all the files that came with lwjgl in there. I also made a folder called testdata because I thought that might work, though it didn't. The odd thing is that there is no file named 'alphamap.png' that I could find with the lwjgl resources. Is it possible this has to do something with the slick library?? There were no errors with the red Xs which it normally does when I don't have the correct packages imported. Tongue

EDIT: wow, I just found that this same exact error is happening for me on a completely different project folder. What is odd is that this other project is not using the slick libraries at all...
5  Java Game APIs & Engines / Engines, Libraries and Tools / [Solved] Issue with LWJGL Space Inaders Example on: 2013-11-08 08:22:49
Hello,

I am trying to run the Space Invaders example from the LWJGL wiki. This one.
http://lwjgl.org/wiki/index.php?title=Space_Invaders_Example_Game

What is odd to me is that there is no red 'x's in Eclipse and it seams like I have
properly attached all the libraries right.  

Here is the error it gives me.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
Fri Nov 08 02:26:45 CST 2013 INFO:Slick Build #237
Fri Nov 08 02:26:45 CST 2013 INFO:LWJGL Version: 2.9.0
Fri Nov 08 02:26:45 CST 2013 INFO:OriginalDisplayMode: 1440 x 900 x 32 @0Hz
Fri Nov 08 02:26:45 CST 2013 INFO:TargetDisplayMode: 800 x 600 x 0 @0Hz
Fri Nov 08 02:26:45 CST 2013 INFO:Starting display 800x600
Fri Nov 08 02:26:46 CST 2013 INFO:Use Java PNG Loader = true
Fri Nov 08 02:26:46 CST 2013 INFO:Controllers not available
Exception in thread "main" java.lang.RuntimeException: Resource not found: testdata/alphamap.png
   at org.newdawn.slick.util.ResourceLoader.getResourceAsStream(ResourceLoader.java:69)
   at org.newdawn.slick.opengl.InternalTextureLoader.getTexture(InternalTextureLoader.java:185)
   at org.newdawn.slick.Image.<init>(Image.java:192)
   at org.newdawn.slick.Image.<init>(Image.java:166)
   at org.newdawn.slick.Image.<init>(Image.java:154)
   at org.newdawn.slick.Image.<init>(Image.java:132)
   at org.newdawn.slick.tests.AlphaMapTest.init(AlphaMapTest.java:33)
   at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:393)
   at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:317)
   at org.newdawn.slick.tests.AlphaMapTest.main(AlphaMapTest.java:79)



Thank you so much for reading this and trying to help. Smiley
6  Game Development / Networking & Multiplayer / Re: Networking & Multiplayer - Resources on: 2012-04-01 01:29:56
Where are all the resources?
7  Game Development / Newbie & Debugging Questions / Re: me and my noobish brother are having problems with Scanners on: 2012-03-07 02:26:34
First of all, thanks to all that replied SO FAST!!! and second, me and my VERY noobish brother totally just LOL-ed ALL over the floor Cheesy it was grand! Thanks for the java-lin exp. Cheesy and IT WORKS!!!!! WWOOOOOTTTT!!!
8  Game Development / Newbie & Debugging Questions / me and my noobish brother are having problems with Scanners on: 2012-03-07 02:07:05
The problem is, every time we type "no", we have to type it twice??
We don't understand why? Please help.... Smiley

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
package dandd.aanda;

import java.util.Scanner;

public class TestPrintf {
   public static void main(String[] args)  {
     
      String yes = "yes";
      String no = "no";
     
      System.out.println("type yes or no");
     
      Scanner input = new Scanner(System.in);
     
      if (input.nextLine().equals(yes)) {
         System.out.println("Follow me then boooyyyoo!!!!");
      } else if (input.nextLine().equals(no)) {
         System.out.println("Alright then laddy, you just going to sit on the porch all day and crrry then?");
      } else {
         System.out.println("that didn't help me, yes or no?");
      }
     
   }
9  Game Development / Newbie & Debugging Questions / Re: JFrame problems "setLayout (new FlowLayout);" on: 2012-02-28 15:09:45
wow.... I am a total noob Tongue haha

thank you a ton!!
10  Game Development / Newbie & Debugging Questions / JFrame problems "setLayout (new FlowLayout);" on: 2012-02-28 14:22:42
Hello,

I am going through a tutorial on JFrame's and I ran into a problem...
The tutorial was made in 2009 so... I'm thinking maybe something has changed sense then?
This code doesn't give an error for the guy giving the tutorial, unless I am missing something.

the error is in "new FlowLayout"
It can't make a new FlowLayout object... But I imported it... Tongue huh


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
package boston.tutorial;

import javax.swing.JFrame;
import javax.swing.JLabel;
import java.awt.FlowLayout;

public class tuna51 extends JFrame{
   
   private JLabel item1;
   
   public tuna51() {
      super ("The title bar");
      setLayout (new FlowLayout);
     
      item1 = new JLabel("This is a sentance.");
      item1.setToolTipText("This is going to show up on hover.");
      add(item1);
   }
   
}


thanks Smiley
11  Game Development / Newbie & Debugging Questions / Re: Array List issues :P (advise is welcome) I'm new to java.... on: 2012-02-22 16:46:02
huh...
when i do that it gives me this

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
Exception in thread "main" java.lang.StackOverflowError
   at java.util.ArrayList.contains(ArrayList.java:199)
   at org.watersedge.Player.start(Player.java:28)
   at org.watersedge.Player.reStart(Player.java:46)
   at org.watersedge.Player.start(Player.java:42)
   at org.watersedge.Player.reStart(Player.java:46)
   at org.watersedge.Player.start(Player.java:42)
   at org.watersedge.Player.reStart(Player.java:46)
   at org.watersedge.Player.start(Player.java:42)
   at org.watersedge.Player.reStart(Player.java:46)
   at org.watersedge.Player.start(Player.java:42)
   at org.watersedge.Player.reStart(Player.java:46)
   at org.watersedge.Player.start(Player.java:42)
   at org.watersedge.Player.reStart(Player.java:46)
       // this goes on for a long time......


I think the problem is that every time the start() method runs again,
after I assign what the input variable is... It just keeps on looping and
never stops because input = "take book" every time afterwards....
I have tried assigning input to null, input = null, just before the
reStart() method... But it didn't seem to do anything....
12  Game Development / Newbie & Debugging Questions / Array List issues :P (advise is welcome) I'm new to java.... on: 2012-02-22 03:04:25
Hello,

I am having problems with a method I'm working on to handle adding and removing objects from two array lists.

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  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
public class Player {
   
   public static ArrayList<String> inventory = new ArrayList<String>();
   UserInput input = new UserInput();
   
   public void start() {
     
      if (UserInput.getInput("").equalsIgnoreCase("take book")) {
         if (Room1.room1.contains("book")) {
            inventory.add("book");
            Room1.room1.remove("book");
            getStatus();
            Room1.getStatus();
         }
      } else if (UserInput.getInput("").equalsIgnoreCase("drop book")) {
         if (inventory.contains("book")) {
            inventory.remove("book");
            Room1.room1.add("book");
            getStatus();
            Room1.getStatus();
         }
      } else if (UserInput.getInput("").equalsIgnoreCase("take paper")) {
         if (Room1.room1.contains("paper")) {
            inventory.add("paper");
            Room1.room1.remove("paper");
            getStatus();
            Room1.getStatus();
         }
      } else if (UserInput.getInput("").equalsIgnoreCase("drop paper")) {
         if (inventory.contains("paper")) {
            inventory.remove("paper");
            Room1.room1.add("paper");
            getStatus();
            Room1.getStatus();
         }
      }
      reStart();
   }


It (sorta) does what I want it to do....
But for for some reason I have to type for example "take book" like four times before it actually prints the outcome.
And for each input it seems to be random as to how many times I have to type it in before it actually prints it.

Just to clarify so you can help me better...
the reStart() method just calls the start() method again.
The getStatus() methods from both the Room1 class and Player class just print their equivalent Array list.

This is the GetInput() method...
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
public static String getInput(String prompt) {
      BufferedReader stdin = new BufferedReader(
            new InputStreamReader(System.in));
     
      System.out.print(prompt);
      System.out.flush();
     
      try {
         return stdin.readLine();
      } catch (Exception e) {
         return "Error; " + e.getMessage();
      }
   }


If there is more info you need to help, let me know....

Also, If you have any suggestion on a better idea on how I should do this PLEASE let me know Smiley
I am very new to java coding and I am learning, this is a text adventure I am working on....

Thank you!
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 (10 views)
2014-08-31 22:59:12

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

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

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

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

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

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

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

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

BurntPizza (47 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!