Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (497)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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  Java Game APIs & Engines / Java 2D / Best 2D map collisions? on: 2012-11-03 21:48:18
I want to make a game like Limbo. I started make a not tiled map and i decided to draw Map and Mask of Map. And now i don't know how to detect "corners" in Mask. case i don't want detect collisions by pixels...I have an idea to make an array of Triangles and detect collisions between player and Triangles array...Also a have an idea to make a Map Maker which will save all information about corners and other in text file.
If you know better way to realise my idea just say ^_^ thanks.
2  Game Development / Game Mechanics / Re: Fast and slow KeyAdapter(KeyInputHandler) on: 2012-11-03 19:40:07
Thanks a lot! It works! )
3  Game Development / Game Mechanics / [SOLVED] Fast and slow KeyAdapter(KeyInputHandler) on: 2012-11-03 17:14:21
Hello everybody! I wanna make little 2D quest-game, i added a Hero and KeyAdapter... But!
On my Linux-notebook Hero walking not slow and not fast(like in all games).
On my Windows-PC Hero walking very fast. 1 keyPress on PC = 10 keyPress on notebook. How can i fix it? Thanks for help.

Code of KeyInputHandler:
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  
package code;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class KeyInputHandler extends KeyAdapter {

    private byte direction = 0;
    private boolean jumped = false;
    /*
     * 0 - no
     * 1 - right
     * 2 - left
     */


    @Override
    public void keyPressed(KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_LEFT) {
            direction = 2;
        }
        if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
            direction = 1;
        }
        if (e.getKeyCode() == KeyEvent.VK_UP) {
            jumped = true;
        }
    }

    @Override
    public void keyReleased(KeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_LEFT) {
            direction = 0;
        }
        if (e.getKeyCode() == KeyEvent.VK_RIGHT) {
            direction = 0;
        }
        if (e.getKeyCode() == KeyEvent.VK_UP) {
            jumped = false;
        }
    }
   
    public byte getDirection(){
        return direction;
    }
   
    public boolean getJumped(){
        return jumped;
    }
}


Part of code in Main class:
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  
@Override
    public void run() {
        long lastTime = System.currentTimeMillis();
        long delta;
        try {
            init();
        } catch (IOException ex) {
            Logger.getLogger(Game.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        while (running) {
            delta = System.currentTimeMillis() - lastTime;
            lastTime = System.currentTimeMillis();
            update(delta);
            render();
        }
    }
   
    private void update(long delta) {
        if (KIH.getDirection() == 2) {
            level.walkBackward();
        }
        if (KIH.getDirection() == 1) {
            level.walkForward();
        }
        if (KIH.getJumped()){
            level.heroAction();
        }
    }
4  Java Game APIs & Engines / Engines, Libraries and Tools / Re: What engine? on: 2012-07-26 12:40:44
yes, i saw it... it's not interesting to me) i wanna write!)
5  Java Game APIs & Engines / Engines, Libraries and Tools / Re: What engine? on: 2012-07-21 12:59:59
I recently started working with 3D graphics on Java. When I tried to export OBJ, i've got vertices's but not a model and material ...

Thanks to everybody ^_^ i'll try them both
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: What engine? on: 2012-07-21 12:45:03
wow... thanks a lot!
So, if i want to create a game - it's easier to use LWJGL... but if i want to create any other Application(not game) it's better - JogAmp...
Am i right?

Edit: I found such tutors -
http://java.sun.com/developer/onlineTraining/java3d/
http://www.java3d.org/tutorial.html
http://www.vrupl.evl.uic.edu/LabAccidents/java3d/

And i couldn't import models from blender(3ds max, maya) with textures T_T
So i decided find better engine with more tutorials ^_^
7  Java Game APIs & Engines / Engines, Libraries and Tools / Re: What engine? on: 2012-07-21 12:17:22
WOW! Thanks a lot ^_^  And now i have one more question, what the difference between LWJGL and JogAmp (JOGL, JOCL, JOAL, Java binding for the OpenMAX API).

As i understand JogAmp = clear OpenGL on java...
And LWJGL = assembly of libs for Game Dev on java...

Thank you very much!
8  Java Game APIs & Engines / Engines, Libraries and Tools / Re: What engine? on: 2012-07-21 08:47:29
Thanks, i'll try it ^_^
9  Java Game APIs & Engines / Engines, Libraries and Tools / What engine? on: 2012-07-20 19:16:26
Hello, i install java, it's interesting but i want to write 3D applications... So i downloaded Java3D, jMonkeyEngine... And i can't work with them! Case there is no good tutors about Java3D and others... It's easier to me to write on Clear OpenGL. But i can't find it Sad i'm using NetBeans. Where i can find JOGL libs?  Huh
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.

BurntPizza (21 views)
2014-09-19 03:14:18

Dwinin (35 views)
2014-09-12 09:08:26

Norakomi (62 views)
2014-09-10 13:57:51

TehJavaDev (87 views)
2014-09-10 06:39:09

Tekkerue (42 views)
2014-09-09 02:24:56

mitcheeb (65 views)
2014-09-08 06:06:29

BurntPizza (47 views)
2014-09-07 01:13:42

Longarmx (35 views)
2014-09-07 01:12:14

Longarmx (40 views)
2014-09-07 01:11:22

Longarmx (36 views)
2014-09-07 01:10:19
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!