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 (554)
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  Game Development / Networking & Multiplayer / Connecting and reading/writing on IRC on: 2013-07-28 13:34:44
Hey,
I wanted to connect to an IRC webchat (webchat.quakenet.org), join a channel and read the messages in there, to answer them later.
I already tested some libraries such as IRClib but none of them worked.
My plan was to make a text based game, running over IRC, wich reads some commands from IRC and answeres them. Just like a text-adventure.

How do I implement the connection, reading and writing?
2  Game Development / Game Mechanics / Re: How would you implement a stair system on: 2013-06-18 14:52:35
Another good thing would be to use states combined with those things above.
3  Game Development / Newbie & Debugging Questions / Exporting as .jar in eclipse on: 2012-10-03 19:40:50
Hey,
I just finished the alpha of my project and wanted to export it as a runnable .jar file.
To do this, I click on File -> Export..., select "runnable .jar file"and click "next".
Now, I select the Launch configuration and select an export destination. I accept it and export the .jar file.
After this, I ran the .jar, and it worked a bit. Everything's alright but the images and sounds. I don't see any images and don't hear any sounds. Things(rectangles etc.) I drew using Graphics class are shown.
That's the way I load the Images:
1  
2  
3  
try {
    skin = ImageIO.read(new File("res/guys/" + skinname +".png"));
} catch (Exception e) {System.out.println("eror loading skin at guy.java");}


That's the java project.


The .jar looks like this:

   org
     |
     +---> eclipse --> jdt --> internal --> jarinjarloader --> some classes Wink
   META-INF
     |
     +---> MAINFEST.MF
   com
     |
     +---> companyname --> projektname --> my classes
    
    
I don't know where to place the resources. How can I handle and solve this problem?
4  Game Development / Newbie & Debugging Questions / Shop Menu on: 2012-09-26 19:51:39
Hey,
I want to code my own messageDialog, but I don't know how.
My class looks like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
public class Window {
   
   public Window(){
     
   }
   
   public void infoMessage(String dialText){
      //here, i want to create a window with the text dialText in it
  }
}


It should be just a simple g.fillRect(0,0,100,100); and g.drawString(dialText,10,10);, but this doesn't work. I want the infoMessage() to show up when I hit space.

How do this works? What code should go in the method infoMessage(String dialText){} ?
5  Game Development / Newbie & Debugging Questions / Re: Collision Detection with some Rectangles on: 2012-09-18 13:28:44
You could put all the Rectangles into an array of rectangles then you can go through them all in a for loop e.g.
1  
2  
3  
4  
5  
6  
for(int i = 0; i < rectangles.length(); i++){
       if(player.intersects(rectangles[i])){
         stopMovement();
         setOffWall(rect);
       }
}


How do I do an array of recangles?
6  Game Development / Newbie & Debugging Questions / Collision Detection with some Rectangles on: 2012-09-18 13:08:42
Hey everyone,
I started learning Java some weeks ago and tried to make a little game. It should be like this game.
I made some walls using rectangles and also a little ball. The collision works really great, but only with one rectangle, wich I wrote in the code like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
public void checkCollision(){
     
      player = new Rectangle(player.x,player.y,player.width,player.height);
     
      rect = floor_mid;
      if (player.intersects(rect)){
         stopMovement();
         setOffWall(rect);
      }
   }

And the rectangles i'm using:
1  
2  
3  
4  
5  
6  
7  
8  
   
        public Rectangle floor_south;
   public Rectangle floor_north;
   public Rectangle floor_east;
   public Rectangle floor_west;
   public Rectangle floor_mid;
   
   public Rectangle player;


How can I code it so the player would stop on every rectangle?
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 (18 views)
2014-08-28 18:26:30

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

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

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

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

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

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

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

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

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