Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (535)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  A new game library: Aries!  (Read 3999 times)
0 Members and 1 Guest are viewing this topic.
Offline Alexian

Senior Newbie





« Posted 2006-09-27 16:20:55 »

Hi all!
I'm developing a new library for the creation of 2D games in Java. The main goal of the project is to give anyone the opportunity to create a game, without the need to spend a lot of time learning how game programming works. The only prerequisite is some basic java programming knowledge. The libray do not use any particular technology or other libraries (ie LWJGL, JME, ecc...), but only pure Java. The library is not ready for a release yet, but I want to know if the project might be interesting for you or not!

I give you an example what Aries can do:
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 MyGame extends AriesGame {
    private AriesPicture p1 = new AriesPicture(200, 200);    

    public MyGame() {
        game = this;            // this operation is very important when you extends the class AriesGame

        game.set(AriesGame.S_640BY480, AriesGame.FULLSCREEN);    // set up the game
       p1.drawString(0, 10, "A simple java game!");        // draw a String in the AriesPicture
       p1.drawRectangle(0, 0, 199, 199, false);        // draw a Rectangle in the AriesPicture, the 'false' determines if the shape is filled or not, in this case: not.
       p1.setPosition(100, 150);        // the position on the screen
       game.store.addObject("p1", p1);        // add the object in the game
       game.start();        // start the game :)
   }

    // this method manages the events in the game and you can manage all the game by a sequence of IF-ELSE
   // if event occurs you can manage it in this simple way
   public void events() {
        // if the space bar is hit
       if (keyboard.isTyped(keyboard.KEY_SPACE)) {
            game.store.getPicture("p1").clear();        // clear the picture
           game.store.getPicture("p1").drawString(0, 10, "You hit the Space Key");        // draw a string
       }

        // if the wheel of mouse is moved up
       if (mouse.isWheelUp()) {
            game.store.getPicture("p1").move(0, -150);        // move the picture 0 pixel for X and -150 pixel for Y
       }

        // if I'm holding pressed the Shift Key and I click on the Button 1 of mouse
       if (keyboard.isPressed(keyboard.KEY_SHIFT) && mouse.isClicked(mouse.BUTTON1)) {
            game.store.getPicture("p1").move(50, 30);        // move the picture 50 pixel for X and 30 pixel for Y
       }
    }
   
    public static void main(String[] args) {
       new MyGame();
    }
}


this is the result:
Offline Alexian

Senior Newbie





« Reply #1 - Posted 2006-09-27 16:30:38 »

Obviously here we have a simple example there are other objects that you can create/use: AriesBackground, AriesSprite and AriesTimer (I know they are not many but be patient! Smiley ). If you are interested about this project I will show you other kind of examples!
Offline Alexian

Senior Newbie





« Reply #2 - Posted 2006-09-27 20:17:21 »

Uuh... Huh
Well... What do you think about that? Mmh... Nothing? Isn't it interesting? Or is there something else?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #3 - Posted 2006-09-27 20:36:16 »

It's only been here 4hrs - what do you expect really?

To me, looks like a thin wrapper around Java2D with a central hashmap (can't really tell much from the example) - not going to spark too many responses. What sort of responses were you looking for?

Kev

Offline Alexian

Senior Newbie





« Reply #4 - Posted 2006-09-27 20:59:01 »

Well nothing special, but an opinion if the library could be useful for someone, for example Smiley
The structure of the project is big, maybe if I post a Class Diagram (or something like that) and I explain what the library does I will receive a feedback... Cheesy
Offline SluX

Junior Member





« Reply #5 - Posted 2006-09-27 23:58:32 »

I ve done something simmilar....but from the example  i would say that it is a bit more complete than ur lib. I m adding script support now- building something like torque game builder/engine...maybe we can share some experience,...

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline moogie

JGO Knight


Medals: 12
Projects: 6
Exp: 10 years


Java games rock!


« Reply #6 - Posted 2006-09-28 00:05:27 »

Hiya,

Your project sounds almost exactly like an existing mature java 2D games library which is targeted toward begginers and java programs with no game development experience.

http://www.goldenstudios.or.id/

You might want to see if this project satisfies your wants.
Offline Alexian

Senior Newbie





« Reply #7 - Posted 2006-09-28 01:13:34 »

@SluX: I wish I had! Smiley I have a lot of questions about optimization... Grin

Hiya,

Your project sounds almost exactly like an existing mature java 2D games library which is targeted toward begginers and java programs with no game development experience.

http://www.goldenstudios.or.id/

You might want to see if this project satisfies your wants.

Well I know it, but I think there are some steps of the creation of a game that could be easier than those of GTGE. It's a my personal opinion! For example the creation of an Animated Sprite in my library is more logical than GTGE (if you think the contrary just tell me! Smiley ):

AriesSprite is a class that contains a group of AriesAnimation but each AriesAnimation contains an another group of sub-type of animations, AriesAnim. Why? Well think about an isometric game like Ultima or Syndacate, you know that the main character can turn right, left, up and down (and half-positions: left/up, right/down, etc...), ok? When you create an AriesAnimation you define an animation for all these positions and each single position has an AriesAnim. The creation of the sprite is more articulate, but when you will understand its logic you will have no problems. I show you an example (I'm gonna use some AriesClasses):
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  
...
AriesAnim walkright = new AriesAnim(AriesTools.loadImage("c:\images\walkright01.png"), AriesTools.loadImage("c:\images\walkright02.png"));
walkright.setSpeed(200);
walkright.setRepeat(true);

AriesAnim walkleft = new AriesAnim(AriesTools.loadImage("c:\images\walkleft01.png"), AriesTools.loadImage("c:\images\walkleft02.png"));
walkright.setSpeed(200);
walkright.setRepeat(true);

AriesAnim stand = new AriesAnim(AriesTools.loadImage("c:\images\stand"));

AriesAnimation walking = new AriesAnimation(4); // how many directions the character has? 4 is the minimum.
// when we add an AriesAnim to AriesAnimation we must specify the direction association, EAST for the RIGHT, WEST for the LEFT, NORTH for UP and SOUTH for DOWN, the default direction is EAST
walking.addAnim(AriesDirections.EAST, walkright);
walking.addAnim(AriesDirections.WEST, walkleft);

AriesAnimation standing = new AriesAnimation(4);
// here we associate the AriesAnim "stand" to default direction
standing.addAnim(stand);

// the final step, we create the sprite and add the animations
AriesSprite mario = new AriesSprite();
mario.addAnimation("walking", walking);
mario.addAnimation("standing", standing);
...
game.store.addObject("mario", mario);
...

public void events() {
    if (keyboard.isPressed(keyboard.KEY_RIGHT)) {
        game.store.getSprite("mario").setDirection(AriesDirections.EAST);
        game.store.getSprite("mario").setAnimation("walking").startAnimation();
    }

    if (keyboard.isPressed(keyboard.KEY_LEFT)) {
        game.store.getSprite("mario").setDirection(AriesDirections.WEST);
        game.store.getSprite("mario").setAnimation("walking").startAnimation();
    }

    // here we do not have to worry about to set the direction, because when a direction is not found the engine use the default
   if (keyboard.notTouched) {
        game.store.getSprite("mario").setAnimation("standing").startAnimation();
    }
}

// and that's all.


So what do you think? If the final user must worry only for the events and not to draw the graphics or other is better or not? Smiley
In Aries library the final user do not have to learn the logic of the creation of game, his own only one worry is his creative mind! ^___^

(I hope to have written right... I'm not an english user... Embarrassed )
Offline tortoise

Junior Member




<3 Shmups


« Reply #8 - Posted 2006-09-28 01:49:24 »

Just a minor comment,

I generally dislike when libraries prefix everything with the name of the library. That was necessary in the C days, but Java has support for namespaces. I think code involving Timers, Pictures and Animations is cleaner and easier to work with than FooLibraryTimer, FooLibraryPicture, etc.
Offline Alexian

Senior Newbie





« Reply #9 - Posted 2006-09-28 10:06:02 »

I know to put the name of library before the name of object is not good, but the library is not still been released and there are many things to change! Maybe this is one! Smiley
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #10 - Posted 2006-10-02 19:41:48 »

Well I didn't read over all of it and this seems like a good idea, but I did notice:
1  
game = this;            // this operation is very important when you extends the class AriesGame

as something I would change. Why not just have the superclass contructor do this, and you can simply say super()? You'll want to have as few random things that are "put it in here because you have to." Things like this make it significantly less easy to use. Because you are targeting less experienced programmers, they won't know why they are doing things like that. It's like public static void main(String[] args), for the longest time I had no idea exactly why we were using that random jumble of words, and it drove me crazy. Make sure everything is something non-blackboxed for new programmers.

See my work:
OTC Software
Offline Alexian

Senior Newbie





« Reply #11 - Posted 2006-10-04 20:39:05 »

Well I got some problems when I want to extend a Singleton Class. AriesGame is a Singleton Class and if you want to add the events (in the method events()) you must extend the super class AriesGame. Or are there other ways to do that? That is, are there other ways to extend a Singleton Class?
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #12 - Posted 2006-10-05 00:57:44 »

Well you can put random calls that you need in a single initialize() method, then  have the user call that. This way they don't need to do something inexplicable – initializing something makes sense.

See my work:
OTC Software
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

Riven (7 views)
2014-07-29 18:09:19

Riven (5 views)
2014-07-29 18:08:52

Dwinin (8 views)
2014-07-29 10:59:34

E.R. Fleming (25 views)
2014-07-29 03:07:13

E.R. Fleming (10 views)
2014-07-29 03:06:25

pw (39 views)
2014-07-24 01:59:36

Riven (39 views)
2014-07-23 21:16:32

Riven (26 views)
2014-07-23 21:07:15

Riven (28 views)
2014-07-23 20:56:16

ctomni231 (59 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!