Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
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] 2 3
1  Game Development / Newbie & Debugging Questions / Re: Shoot bullets out of the loop on: 2012-07-07 11:13:52
At least my code made more sense then you not making sense.
But i shall thank you for this stupid mistake i made. cant believe i did that! :|
2  Game Development / Newbie & Debugging Questions / Shoot bullets out of the loop on: 2012-07-07 00:57:50
Hello all, im finishing up some shooter game. But i have got a slight problem with my shooting mechanism. the first 5 degrees go perfectly fine, but after that it goes off.
This is the method im using to shoot bullets:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
   public void shootBullets() {
      float lengDir = 1;
      switch (Ships.currentship) {
      case Ships.NORMALSHIP:
         lengDir = 15;
         break;
      }
      float tempX = Player.getPlayer().getShip().getImageOriginX();
      float tempY = -Player.getPlayer().getShip().getImageOriginY();
      tempX += (Math.sin(java.lang.Math.toRadians(this.dir)) * lengDir);
      tempY += (Math.cos(java.lang.Math.toRadians(this.dir)) * lengDir);
      System.out.println(tempX + " , " + tempY);
      Player.getPlayer().getBullets().add(new NormalBullet(x + tempX, y + tempY, dir));
   }


lengdir is the length to the loop from the origin of the image. Im using 15 in this code.
Im using slick, so the point (0,0) is at the left top of an image.
getImageOriginX:
1  
2  
3  
   public float getImageOriginX() {
      return image.getWidth() / 2;
   }


The weapon is an object which is attached to the player. meaning that the x of the weapon is the x of the player (its basically a suit), same goes for the direction and the y position

output, starting facing north, and turning 90 degrees before shooting:
1  
2  
3  
4  
15.0 , -1.0
29.984562 , -16.680374
14.424611 , -30.98896
0.007386695 , -15.529313
3  Discussions / Miscellaneous Topics / Re: Manga + Java = ? on: 2012-02-24 20:26:39
If anyone's interested, it's possible to read it online in English, though I'm not gonna give any direct links just in case. =S Though, it might not be the best manga for a first-timer... xD If anyone happens to be REALLY interested in this I can just run off to Akihabara again, buy another set of them and mail them anywhere, assuming you pay for it of course (no extra charges xD), though the manga is obviously in Japanese.

And censoring stars is just stupid. -_- Stars are awesome, unless you're playing Terraria on hardcore and get one in your head...

Have you found out what the code does exactly already? :3
Or isnt it compilable code?
4  Games Center / 4K Game Competition - 2012 / Re: [WIP] Dungeon 4Keeper on: 2012-02-23 00:18:50
This looks neat! plans on developing it further?
5  Game Development / Newbie & Debugging Questions / Re: I'm a noob to Java, can you point me in the right direction? on: 2012-02-22 17:46:27
Most Mac users I know swear by TextMate, but the best text editor is the one you're most comfortable with.

Library copies of books tend to be really obsolete.  From what I can see from the Amazon summaries of Java for Dummies, the only one that I'd even bother with is the most recent edition (previous editions were using JCreator of all things).  You're probably better off following the java tutorial trails on oracle.com


Second that, the tutorials at oracle are very useful! And not just the drawing ones, but also the ones about streams events etc.
6  Game Development / Newbie & Debugging Questions / Re: What do I need to learn? on: 2012-02-22 12:00:00
I think isometric is the word you're looking for.  However, Catacomb Snatcher (correct me if I'm wrong) seems to be  just a top-down tilemap, and not isometric.  Basically just a grid of rectangular tiles with the player able to move halfway through the near walls to give it the appearance of "depth".  Making a tilemap like this would be pretty easy.  I think main challenge would be creating the AI for the enemies and turrets.  I would do some research on making tower defense games to get a feel for how the turrets should work.   

I dont think that isometric is the word hes looking for. Thats a different view of angle.
I think its birds eye.
7  Games Center / Showcase / Re: Empire In Ashes on: 2012-02-22 11:14:13
this seems original! curious how it turns out to be.
8  Game Development / Game Play & Game Design / Re: Your first game! (adventure/rpg like) on: 2012-02-22 11:12:59
I hate to be the mean negative downer guy but if you're going to post tutorial code, you should be writing proper multithreaded code, and you're doing stuff like drawing from outside the EDT.   Then there's other stuff like catching all exceptions and just printing their stack trace and continuing on. 

At this point, I have to say DO NOT RECOMMEND as a tutorial g.oes.  If you're going to evolve code to eventually be correct, this isn't the board to do it in.


Hmm that was a bit harsh, you could have said it differenty. But oh well.
On your responce, thanks for the feedback anyway. I talked to Riven and he moved it out of the tutorial section.
However, there is a reason why you are not learning complicated math at your first school, little steps at first. This was meant to be a tutorial on the basics of the basics. Sure i can go ahead and write complicated code. But people wont understand the basics then. Yeah i could have done it better then only printing the stack. But since i wanted to expand that part to a more advanced part, it seemed not necesary to me at the moment. Sure i couldve used a swing worker or something in that direction, for the 0,1 times it goes wrong.
But youve made your point.
9  Discussions / Miscellaneous Topics / Re: Single atom transistors! on: 2012-02-22 09:20:56
That is really small! D: this is amazing indeed. How do they produce something this small? Shocked
10  Games Center / 4K Game Competition - 2012 / Re: PORT4K on: 2012-02-21 22:18:09
FUN! Cheesy thats what i had while playing it.
What i did not exactly got, were the areas where i could shoot, and where i couldn't. Marking these a bit better wont be a bad idea me thinks Smiley.
Finished all btw, make more! Cheesy
11  Game Development / Game Play & Game Design / Re: Your first game! (adventure/rpg like) on: 2012-02-21 22:16:51
Ok, basics are covered (real basics). Im curious what people come with! So if you made anything after following this tut, post a screenshot of it! Wink
Also if there are any requests, i'll gladly take them! Smiley
12  Game Development / Game Play & Game Design / Re: Your first game! (adventure/rpg like) on: 2012-02-21 20:56:44
Yes im working hard on it Smiley.
13  Game Development / Newbie & Debugging Questions / Re: Graphics on: 2012-02-21 20:16:05
What is it exactly that you want to implement?
Just plain .png images?
14  Game Development / Game Play & Game Design / Your first game! (adventure/rpg like) on: 2012-02-21 17:24:04
[size=14pt]Introduction[/size]
Dynamic
This will be a dynamic tutorial, meaning that I will keep changing and editing it on the demand of the users. So this tutorial will probably never finish (Unless I'm getting bored of writing it). Also, this tutorial will probably never be totally finished.
I'm not perfect
I'm not perfect, like almost everybody. First of all, I'll probably have a large amount of spelling mistakes, and grammar incorrectness. Second, my code might be obsolete and badly written. But at least I can assure you that it will work! If you see anything that I could've done different, then please say so! So that I can change the tutorial to a better version
Coverage
I will cover a few aspects of a basic adventure/RPG game. Of course the aspects can be used in almost every game!

[size=14pt]Basic thoughts [/size]
Classes & Roles
The first thing i mostly do when designing a game, is thinking of a data-flow. Why? Because while doing this it will give you a much better vision what you should do, how you want the data to go, and the most important bit, what classes you will need. Ive made a simple one quickly (Also, my paint skills are medal worthy! :p

With send image, i more mean retrieve image. Now we can prepare our classes. As you can see we need a couple of classes:

Main
This class will basically start the whole process. The engine will keep running in the background. Meaning that we will have to make it a threat (multithreading). However we need to start this thread from some place, we will start the thread in the main (you could also do it in the engine class itself, but I like it a bit more ordered. So go ahead, make a new class, and call it main. Now be sure to generate the Main(arg) function with it as well! If, for some reason, you cant generate the Main, copy and paste mine(this is my entire main class):
1  
2  
3  
4  
5  
6  
 public class Main{
     public static void main(String [] args){
        System.out.println("Application, started!");
      }
}
 

Now we’ve got our first class. But in order to start our engine class, we first have to make it multithread compatible. Ill cover this in the next class.

Engine
This class will make sure everything will get updated every tick. And will make sure that the screen will render when its necesary. First of all, engine is a name not used often for this purpose)because an engine could be anything, it could be the engine of a car. Or used for inheritance (being the superclass). So let’s give it a different name, Game would fit for this purpose. So go ahead and make a new class, called Game. First we will have to make it multithreading in some way, there are multiple ways of doing this. You can either extend your class with the class Thread, so you can use its functinos trough inheritance. Or you can implement Runnable. I will go for runnable, there is however no difference between these two(as far as im concerned). So what you have to do now is implement Runnable. Your class should now look something like this:
1  
2  
Public class Game implements Runnable{
}

Now because we implemented runnable, we have a new function to use. Namely run(). This function will have to be a loop, which will update the game according to its game-state. Now for the time being, make It an endless ‘while’ loop, with an println function in it. Just for testing purposes. It should be along the lines of:
1  
2  
3  
4  
5  
6  
public class Game implements Runnable{
public void run(){
    while(true)
    System.out.println(" While ! ");
}
}

But now we have to start the thread. If you look back to our dataflow, you see that this will be the purpose of my main class. You can start an object of a class really easily! All we have to do is declare our object, and then execute the run() function. The execution of the run function is done a little bit different, instead of using: object.run(); we will use object.start(). This will start the thread and the whole process. You should have this now:
1  
2  
3  
4  
5  
6  
 public class Main{
     public static void main(String [] args){
         Game ex = new Game();               //Creates new object of type Game, and name it ex.
        new Thread(ex).start();            //Start this so called ex object.
     }
}

Now as you start your application, it will automaticly start the game thread. Which will keep printing out messages as you can see. This is the first step of our tutorial. I will explain what we will do here later on.

Player
This class will be the player, it will react on Key presses (move in the right direction) and it will check for collisions. It will update every tick from the engine. How we will do these things I shall explain later. Before we make our player class, let’s think for a moment what we need in it. First of all we need to be able to retrieve the location of the player (x,y) for drawing purposes. Secondly we need an update function which will move the player, if it has to be moved, which will attack, if it has to attack, and which will check if the player is actually still alive. Thirdly we need 4 functions which can set the directions.
So our class will look like this:
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  
public class Player {
   //variables which we will use
  private int x, y;
   private boolean  left, right, up, down;

   
   public void update() {
   //In this function we will do the required checking and updates
   }
   
   //These 4 functions are able to set the direction
  public void setLeft (boolean newLeft  ){
      left  = newLeft;
   }public void setUp   (boolean newUp   ){
      up    = newUp;  
   }public void setDown (boolean newDown ){
      down  = newDown;
   }public void setRight(boolean newRight){
      right = newRight;
   }
   //This function will return X as an int.
  public int getX(){
      return x;
   }
   //And this function will return Y as an int.
  public int getY(){
      return y;
   }
}

Now we’ve got the basics. But the player wont move with this just yet. For that we need a move function. So lets do this, we will make a simple move function. We will make it private, since there is no need for other classes to acces it, and i twill be of type void ofcourse, since there is nothing to return in this function.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
   //In this function we will do the required checking and updates
  public void update() {
      move();
    }
   //This function will move the player according to its direction
  public void move(){
      if(left){
         x--;
      }if(right){
         x++;
      }if(up){
         y--;
      }if(down){
         y++;
      }
   }

This will work, will be very buggy, but it will work. I’ll explain a more advanced movement system later on, which wont be very buggy.
 
Instances
This class will contain the arrayLists to objects. Why? Because we have to retrieve information about our objects somewhere, but at the same time we’ll also need to add new objects to the same arrayList. So we will have to make them static. But we don’t only need arrayLists. We also need to add our player here. Lets do that first. First of all, create a class and name it Instances. You’ll end up with something like this:
1  
2  
public class Instances {
}
Now we have our class. Lets add our first object to it! We want to add the player first. This can be done very easily with the following line:
1  
   public static Player player = new Player();

You should add this line in the body of your instances class.

Now we can acces it from anywhere we want. All we have to do is: Instances.player.[function here];.
Later on I will explain what more objects we need in this class, and how we have to handle that. But for now this is enough.

Input Manager
This class will handle the input. We want to make our player move, as soon as we hit the up arrow on the keyboard. But how is this done? Don’t worry! Java has a lot of functions and classes build in already. It even has a class which will handle key input! All we have to do if check if the key input is being pressed or released. And what key this might be. So lets go and make our ButtonHandler class! First in order to use the easy functions, we will have to inherite the java class “KeyAdapter” and we will have to import 2 headers. Your class should now look like this:
1  
2  
3  
4  
5  
6  
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class ButtonHandler extends KeyAdapter {
               
    }
Now i like it to have some debugging in it as well, so i added a constructor, with a simple System.out.println(“”); in it. So go ahead and add the following to your class:
1  
2  
3  
    public ButtonHandler() {
       System.out.println(" Button handler initialised! ");
}

Now as soon as we make an object from this class, a message will pop up in our eclipse.
Now in order to make use of our KeyAdapter, we will have to add 3 functions. 2 of the 3 we will use. Add the following functions:
1  
2  
3  
4  
5  
6  
7  
8  
9  
   public void keyTyped(KeyEvent arg0) {
   //This one we wont use. Its unreliable for making a game handler      
  }
    //This function will be used as soon as a key is released. they KeyEvent key we can use to determine what key we just released
   public void keyReleased(KeyEvent key) {
    }
  //This function will be used as soon as a key is pressed.
   public void keyPressed(KeyEvent key) {
    }

Now in order to determine what kind of key we just pressed/released, we will need a couple of statements. Or we could use the switch statement. I prefer to use the switch statement because your program will look much more organised then. Basicaly if we press the left arrow key, then the keycode from ‘key’ from KeyEvent will be equal to VK_LEFT. So we need something along the lines of:
1  
2  
3  
If(key.getKeyCode == VK_LEFT){
Instances.player.setLeft(true);
}

And in the key release function it would be:
1  
2  
3  
If(key.getKeyCode == VK_LEFT){
Instances.player.setLeft(false);
}

So this brings us to the following code:
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  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class ButtonHandler extends KeyAdapter {

    public ButtonHandler() {
       System.out.println(" Button handler initialised! ");
               
    }
  //This function will be used as soon as a key is released.
   public void keyPressed(KeyEvent key) {
       
              switch (key.getKeyCode()) {
                        case KeyEvent.VK_UP:
                           Instances.player.setUp(true);
                             break;
                        case KeyEvent.VK_DOWN:
                           Instances.player.setDown(true);
                            break;
                        case KeyEvent.VK_LEFT:
                           Instances.player.setLeft(true);
                            break;
                        case KeyEvent.VK_RIGHT:
                           Instances.player.setRight(true);
                            break;
              }
    }  
    //This function will be used as soon as a key is released. they KeyEvent key we can use to determine what key we just released
   public void keyReleased(KeyEvent key) {
        switch (key.getKeyCode()) {
           case KeyEvent.VK_UP:
              Instances.player.setUp(false);
              System.out.println(" Released UP!");
                break;
           case KeyEvent.VK_DOWN:
              System.out.println(" Released DOWN!");
              Instances.player.setDown(false);
               break;
           case KeyEvent.VK_LEFT:
              System.out.println(" Released LEFT!");
              Instances.player.setLeft(false);
               break;
           case KeyEvent.VK_RIGHT:
              System.out.println(" Released RIGHT!");
              Instances.player.setRight(false);
               break;
        }
    }
   
   
   public void keyTyped(KeyEvent key) {
     
   }
}

However, we still need to make the object somewhere. We will do this as soon as our screen is getting initialized. I will cover this in the next class.


 Draw
Ok, most of the basic game play is done. But now we want to draw it to the screen! First of all we need to make the class. So go ahead and make a new class and call it Draw. Also make a constructor in it, we will use this for setting up everything. It should be like this:
1  
2  
3  
4  
public class Draw{
   Draw(){
              }
}

Now we will prepare our screen so that we can draw on it. We will do this in Java2D. But you can of course also follow another tutorial for this which will cover other libraries. I wont cover much of the drawing, since its library based. So instead i will post some code and comment it (Unless people really want me to explain in detail). This is what my Draw class looks like(taken from another tutorial on this site, i believe written by either ra4king or riven. props to them! Smiley ):
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  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics2D;
import java.awt.image.BufferStrategy;

import javax.swing.JFrame;
import javax.swing.JPanel;


public class Draw{
   JFrame frame;
   Canvas canvas;

   BufferStrategy bufferStrategy;

   private int WIDTH = 640;
   private int HEIGHT = 480;

   Draw(){
      //Makes a new window, with the name " Basic game  ".
     frame = new JFrame("Basic Game");
      JPanel panel = (JPanel) frame.getContentPane();
      panel.setPreferredSize(new Dimension(WIDTH, HEIGHT));
      panel.setLayout(null);
     
      canvas = new Canvas();
      canvas.setBounds(0, 0, WIDTH, HEIGHT);
      canvas.setIgnoreRepaint(true);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.pack();
                             //this will make the frame not re-sizable
     frame.setResizable(false);
      frame.setVisible(true);
                             //this will add the canvas to our frame
     panel.add(canvas);
      canvas.createBufferStrategy(2);
      bufferStrategy = canvas.getBufferStrategy();
                            //This will make sure the canvas has focus, so that it can take input from mouse/keyboard
     canvas.requestFocus();
                             //this will set the background to black
     canvas.setBackground(Color.black);
      // This will add our buttonhandler to our program
     canvas.addKeyListener(new ButtonHandler());
      }
   void render() {
      Graphics2D g = (Graphics2D) bufferStrategy.getDrawGraphics();
      g.clearRect(0, 0, WIDTH, HEIGHT);
      render(g);
      g.dispose();
      bufferStrategy.show();
   }
   protected void render(Graphics2D g){
      //Here we will render everything
  }
}

Now we want to draw a rectangle on the place where our player is. Why a rectangle? Because this is easy to set up, easy to draw and easy for debugging. Later in this tutorial i will explain how to work with images. Java2d has a fairly easy function to draw a rectangle, namely the following:
1  
g.fillRect(X position, Y position, Length, Height)

For this example we will use a fixed length and height, we will set it to 15. Now we also need to give it a color. That can be done by:
1  
g.setColor(Color.white)

Now we need to draw it at the player's x and y coordinates. How can we do this...?
Remember that we made the player in the Instances class static? we can easily aces it from anywhere now. All we have to do is:
1  
Instances.player.getX();

and
1  
Instances.player.getY();

So lets go ahead and do that. your render(Graphics2D g) should end up looking like this:
1  
2  
3  
4  
   protected void render(Graphics2D g){
      g.setColor(Color.white);
      g.fillRect(Instances.player.getX(), Instances.player.getY(), 15, 15);
   }
Now this is done. Lets move on and make sure everything will get updated! Smiley

Game-Loops
So we have got our classes now. But now we have to make sure the player gets updated every once in a while. For now, lets do it VERY simple and VERY wrong. This code wont serve well, at all. In my next update I will cover a good game loop, which is stable, efficient and which will have the same effect on all computers, fast or slow.
Remember that we made our Game class? Now go back to there. In the run you'll find a while(1) System.out.println(“Thread”);
But instead of printing a line to the console, we want to move our player! Remember that our Instances class has a static Player object? we will update this one every 10 milliseconds. It is actually fairly easy. All you have to do is change:
1  
2  
3  
4  
public void run(){
    while(true)
    System.out.println(" While ! ");
}
into:
1  
2  
3  
4  
5  
6  
7  
public void run(){
    while(true){
    Instances.player.update();
    try {Thread.sleep(10);} catch (InterruptedException e) {e.printStackTrace();}
   }
   
}
Now this is VERY inefficient. Also you will see that it wont work! you wont see the player moving. This is because we also have to draw everything on the screen. For this we will have to make an object of type Draw. this is easily done by adding this in the Game class:
1  
Draw drawing = new Draw();

Now the last thing we have to do, is actually make it render once in 10 seconds as well. This is easily done by adding the following line to our while loop:
1  
drawing.render();
. Our final run function will look like this:
1  
2  
3  
4  
5  
6  
7  
8  
public void run(){
    while(true){
    Instances.player.update();
    drawing.render();
    try {Thread.sleep(10);} catch (InterruptedException e) {e.printStackTrace();}
   }
   
}


If enough people comment on this (so that i actually know that people want to know how it goes on) then I'll have the next part done on Friday! Smiley
 Also, don't forget to give me a nice medal if this helped you!
And many thanks for JGO. where i learned a lot about this, and got some code off as well.
Future ideas to implement in the tutorial (i already have written code for this, but its not very efficient. So ill make more efficient code for this):

[size=14pt]Map [/size]
Drawing a map
Readying from a text file
Map Manager
setting up the map, map manager etc
15  Game Development / Newbie & Debugging Questions / Re: I'm a noob to Java, can you point me in the right direction? on: 2012-02-20 19:34:16
[snip]
Those aren't IDEs, they are text editors. The programs StonePickaxes suggested are IDEs.

I clicked the appreciate button instead of quote >_> so... Have a free medal Cheesy

In that case... Quote me as well please Cheesy.
Also totally agreed with Beamery, and you should start working OO from the beginning in my opinion. Might be hard to work with in the beginning, but later on it will be so much easier to work with! Smiley trust me Wink.
16  Game Development / Newbie & Debugging Questions / Re: I'm a noob to Java, can you point me in the right direction? on: 2012-02-20 18:21:00
Either eclipse or netbeans. Those are the 2 best IDE's. I personally like eclipse better.

-Nathan

Not for learning the basics in my opinion. I used BlueJ at school. Really useful tool, easy to debug with. Also easy to see what actually changes if you make changes in your code.
17  Games Center / WIP games, tools & toy projects / Re: Beasts & Pirates on: 2012-02-20 18:20:01
One thing though,
I understood from your video that you are sending the map and mob movement via the server. Wont you need quit a strong server+internetconnection if many people will join for this?  Yawn
18  Discussions / Miscellaneous Topics / Re: O RLY on: 2012-02-20 18:18:13
What is the use of this countdown?

Also, im afraid of this jens posting the link of JGO. Now new people might come persecutioncomplex.
19  Game Development / Newbie & Debugging Questions / Re: Displaying a Tile Map help needed on: 2012-02-19 20:32:00
Thanks im working on a more detailed tutorial, with better code Smiley
20  Games Center / WIP games, tools & toy projects / Re: Beasts & Pirates on: 2012-02-19 16:41:35
This looks pretty neat! Cheesy

Im curious about further development of this project Smiley.
Also, just out of curiosity, are you using tcp or udp?
21  Java Game APIs & Engines / Java 2D / Re: Loading A 2D Array Into A Image. Drawing Not Working! on: 2012-02-19 16:38:48
hmmyez, that seems to work ra4king.
I know this class might not be to your standards, but the mapToArray class works perfectly fine. And yeah its not efficient, but the efficiency isnt really important at this point Smiley.
Also i used to have it differently, untill somebody on this forum told me this way it was better. But ill have to do some research to it i guess.

And write a foolproof tutorial as well it seems.
22  Games Center / WIP games, tools & toy projects / Re: Pong - Evolution on: 2012-02-18 15:16:42
Nicely polished game! Smiley

Only it would be fun to have some different challenges, Instead of making blockades only(maybe something where there are 2 balls or so?)

Also i second rolands idea, let the ball go a little bit slower in the beginning. I lost 2 points before i could even hit the ball :|
23  Game Development / Newbie & Debugging Questions / Re: ImageIcon - Loading Images Relative to the Class Files on: 2012-02-17 20:11:54
This is how i do it:
1  
2  
3  
4  
5  
6  
7  
8  
9  
BufferedImage imgSheet;
   void init(){
      try {
         imgSheet = ImageIO.read(new File(location));
      } catch (IOException e) {
         System.out.println("Error while loading image sheet! \n Program will now abort.");
         e.printStackTrace();
      }
   }

Where location is a string, and defined in my constructor.
Try that.
24  Java Game APIs & Engines / Java Sound & OpenAL / Re: Sound leak on: 2012-02-16 20:56:04
That's normal.  Are you actually running out of memory?  Is it growing continuously?


Nah i dont thats normal lol. It should give me back all the memmory, and more!
No but seriously, it keeps continueing with each sound play.
Also cero, what do you suggest i use for sound then?
25  Java Game APIs & Engines / Java Sound & OpenAL / Re: Sound leak on: 2012-02-16 20:38:15
What are the symptoms of having a memory leak?  How are you measuring this?  Have you looked at the heap usage with jvisualvm or looked at a heap dump with the Eclipse heap profiler?





not so much at the same time! :|
Im measuring this with the most useful tool ever made, windows task manager.
Im just looking at the memory costs of my game, then as soon as a sound starts memory size increases and decreases again. But the amount that it decreases is smaller then the increasement! Sad
26  Java Game APIs & Engines / Java Sound & OpenAL / Re: Sound leak on: 2012-02-16 19:47:04
bump bump bump. still with this problem.
somebody help me? Kiss
27  Discussions / General Discussions / Re: Recommend me a route... on: 2012-02-16 19:45:07
1:
I think this one comes down to personal opinion as well. There was once a nice list on this forum with each library and its advantages. But i guess for 2d you can just keep using the java2d? Otherwise use something like slick or  lwjgl if you have openGL
2:
no clue
3:
What do you mean by totalitarion state? when i google it i come around 2nd world war stuff and dictators.
28  Game Development / Game Play & Game Design / Re: Game Thoughts / Criticism on: 2012-02-16 00:40:16
Micromanaging one minion?  I won't prejudge, but I'd call it a tall order to make that fun...  Maybe if it were as frantic as a shmup, but then, well, it's a shmup.  Maybe a shmup where you can call on other minions to saturate the defenses.  Hmmm...


Its going to be so fun! all you have to do is press arrow up, and hope you wont get killed. then you die, get another minion, do the same, you die again. Its never stopping, you see? so endless amounts of fun!

I wonder why nobody has ever made it...

Anyways, Just copy a game, copy it good and then add new elements to it Smiley.
29  Game Development / Game Play & Game Design / Re: Game Thoughts / Criticism on: 2012-02-15 23:37:13
But what about, a towerdefence where you play the creeps? Where you have to lead them on the map? I think thats rather original tbh.

There are a lot of games like that, it even has its own genre: "anti td". Wink

Mike

Nononono, i think there is a miscomminucation here. The genre you mean has to send the minions. Im talking about PLAYING on of them.
30  Game Development / Game Play & Game Design / Re: Game Thoughts / Criticism on: 2012-02-15 23:26:36
I kind of wanna make a game that has never been made before.

Oh, I know one! A multiplayer game where you control a man that lays eggs that blow up after a few seconds and you need to blow the other people up! Smiley

All jokes aside, coming up with something really unique is very difficult without making something known into something absurd (see above).

Mike

Absurd? i just thought it was a cool idea, you crushed my dreams! Cry

But what about, a towerdefence where you play the creeps? Where you have to lead them on the map? I think thats rather original tbh.
Pages: [1] 2 3
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (70 views)
2013-05-17 21:29:12

alaslipknot (80 views)
2013-05-16 21:24:48

gouessej (111 views)
2013-05-16 00:53:38

gouessej (106 views)
2013-05-16 00:17:58

theagentd (117 views)
2013-05-15 15:01:13

theagentd (106 views)
2013-05-15 15:00:54

StreetDoggy (150 views)
2013-05-14 15:56:26

kutucuk (174 views)
2013-05-12 17:10:36

kutucuk (171 views)
2013-05-12 15:36:09

UnluckyDevil (180 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
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!
Page created in 0.58 seconds with 20 queries.