Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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 / Artificial Intelligence / Re: Help with RPG´s on: 2008-06-12 03:20:16

  Thanks, I think this will help me a lot  Smiley
2  Game Development / Artificial Intelligence / Help with RPG´s on: 2008-06-11 00:10:56

  I need help, i am trying to make a RPG but i dont know how to manage events and so on dialogs!!!!,
   so please can you help me???!!, i know how to load maps from files and that stuff but i really dont
   now how to manage events  Sad

3  Java Game APIs & Engines / Java 2D / Re: Best engine for a 2d game? on: 2008-04-08 01:19:25

  Well actually there is a java port of SDL  Tongue
      So if you´re happy with SDL, you can use SDL with java  Tongue
4  Game Development / Newbie & Debugging Questions / Re: Clipping on: 2008-03-30 16:12:18
  I hope this help you
                         [url removed]

          is all about 2d graphics  Wink clipping, grandients, tiles, textures, fonts, graphics, shapes, all 2d graphics examples

Don't link copyrighted material, please. / Markus
5  Game Development / Newbie & Debugging Questions / Re: Question: Variable name + integer on: 2008-03-30 16:07:43

  Well arrays  are exactly wath you need,
                                                   heres a example code:

                     public class Arrayer {

                                   private int number_Of_Numbers = 9;
                                   private int[] number = new int[number_Of_Numbers];    // or just new int[9]
                                                     for (int i; i < number_Of_Numbers; i++){
                                                                       number = i                                         // making the array number[0] = 0, number[1] = 1, etc
                                                                      //  so you can use them like
                                                                                  number[3] = 5;
 But arrays always starts with cero, so int[] array = new int[5], will make 5 ints starting with array[0] and ending with array[4]
you can make any object array, you can make Button[] Butt = new Button[4], making 4 buttons, and in the init method a for loop is used to initialize them - for(int r; r < 4, r++){ Button[r] = new Button("button"); Button[r].addActionListener(this); add(Button[r]); }

so your code will look like{

int[] var = new int[9];

       for(int i = 0; i < 9; i++)
    var = 1;                              // making all variables value 1
        then you will have  var[0], var[1], ........., var[9];

      Google for more Java arrays information Smiley
                      i Hope this helped you
6  Java Game APIs & Engines / Java 2D / Re: Collision Detection in simple 2D games on: 2008-03-23 21:04:48

   Well you can use simple bounding box collision detection, if you´re making a tetris game, every piece of tetris is made of rects
      for example a

                  Determining Intersections with Bounding Boxes

The easiest way to determine if two sprites intersect is by comparing their bounding boxes. A bounding box is the smallest rectangle, with edges parallel to the x and y coordinates, that contains the entire sprite.

Here’s a simple formula for determining if two sprites intersect. Let’s say that the smallest pair of coordinates of box 1 is (x1,y1), and the largest pair is (x2,y2). Similarly, box 2’s smallest coordinates are (x3,y3), and the largest are (x4,y4). Figure 5-11 shows these two boxes in the applet coordinate system. Box 1 intersects with box 2 if and only if the following condition is true:

(x2 >= x3) && (x4 >= x1) &&   // x-extents overlap

(y2 >= y3) && (y4 >= y1)      // y-extents overlap

Here’s another way of describing this equation. The x extent of a box is the range of x coordinates that the box occupies; y extents are defined analogously for y coordinates. The two boxes intersect if both their x extents and their y extents overlap. You can extend this intersection formula to three dimensions by testing whether the z extents also overlap

So this is the boolean you need  Wink

// compare bounding boxes
public boolean intersect(int x1,int y1,int x2,int y2) {

  return (x2 >= locx) && (locx+width >= x1)
    && (y2 >= locy) && (locy+height >= y1);


This routine checks if the sprite at (locx,locy), with the given width and height, intersects the bounding box between the coordinates (x1,y1) and (x2,y2).

so as example you can add a inspection rutine in the update method

public void update (Graphics g){


                                  objective_x = Rndm_num(applet_width - objective_w);
                                  objective_y = Rndm_num(applet_height - objective_h);
. . . .

Now the only thing you have to do is implementing this boolean in your code and defining sets of Rects to each piece of tetris  Smiley

Pages: [1]
DesertCoockie (20 views)
2018-05-13 18:23:11

nelsongames (68 views)
2018-04-24 18:15:36

nelsongames (65 views)
2018-04-24 18:14:32

ivj94 (748 views)
2018-03-24 14:47:39

ivj94 (79 views)
2018-03-24 14:46:31

ivj94 (555 views)
2018-03-24 14:43:53

Solater (94 views)
2018-03-17 05:04:08

nelsongames (168 views)
2018-03-05 17:56:34

Gornova (338 views)
2018-03-02 22:15:33

buddyBro (998 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!