Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (542)
Games in Android Showcase (133)
games submitted by our members
Games in WIP (604)
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 / Game Play & Game Design / Re: How do Professional Game Companies Make Their Scenes/Worlds? on: 2013-09-24 11:05:35
[...] And if they do make it in blender or something else, how do they create things that you can interact with such as a moving elevator or a button that opens a door?
Thanks,
-cMp

This question bothers me too.
Let's say there are two ways of creating a 'level':
First one, you create all game objects, like characters, cars, buildings etc. within blender. Then you could load each 3d model seperately into your code and create the actual level! (Obviously you must create specific methods)

Second one: you create the whole level within blender, including all the game objects I mentioned before. This way would be rather easy, because you have one big .obj file, so blender is in this case your 'level editor'. you dont need to develope your own. But how do I interact now with certain 'parts' of the level?
2  Games Center / WIP games, tools & toy projects / Re: Clash Tune on: 2013-09-23 17:55:37
Okay, where can I get the source?

I would be interested too. Looks great
3  Game Development / Newbie & Debugging Questions / Re: KeyListener on an Array (2D Dungeon Crawler) on: 2013-05-17 10:27:30
What I like to do is, to encapsulate the whole input handlin thing in a seperate 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  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
public class InputHandler implements MouseMotionListener, MouseListener, KeyListener {
   //other variables ... maybe booleans for mouse etc.
   private Game game;
     
   public InputHandler(Game game) {
      game.addMouseListener(this);
      game.addMouseMotionListener(this);
      game.addKeyListener(this);
      this.game = game;
   }

   public void keyPressed(KeyEvent e) {
      game.player.press(e.getKeyCode(), this);
   }
     
   public void keyReleased(KeyEvent e) {
      game.player.release(e.getKeyCode(), this);
   }

   public void keyTyped(KeyEvent e) {  
   }

   public void mouseClicked(MouseEvent e) {  
   }
   
   public void mouseEntered(MouseEvent e) {      
   }

   public void mouseExited(MouseEvent e) {      
   }

   public void mousePressed(MouseEvent e) {
      game.menu.click(e.getButton());
   }

   public void mouseReleased(MouseEvent e) {  
   }

   public void mouseDragged(MouseEvent e) {
        }

   public void mouseMoved(MouseEvent e) {  
   }


I just pass into the InputHandler an object of the type 'Game'. That is my main class in which I created the JFrame. So, I can easily add all Key- and MouseListeners in my InputHandling class at instancing time in the main game class.

The specific functions of handling each key, is created in the respective class, like in this case I want to process the input of a player and when I'm in the menu screen.
It may be not the best way to make efficiently key handling, but it fits really well for my needs.

Hoffe das ist etwas verständlich erklärt.
4  Game Development / Newbie & Debugging Questions / Re: Game loop help on: 2013-05-15 23:10:03
That's the way I do it
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  
               long lastTime = System.nanoTime();
          double nsPerTick = 1000000000D / 60D; //~60fps
     
      int ups = 0;
      int fps = 0;
     
      long lastTimer = System.currentTimeMillis();
      double delta = 0;
     
      while(game loop not quit blub) {
         long now = System.nanoTime();
         delta += (now - lastTime) / nsPerTick;
         lastTime = now;
         boolean renderOK = false;
         while(delta >= 1) {
            ups++;
            update();
            delta -= 1;
            renderOK = true;
         }
         if(shouldRender) {
            fps++;
            render();
         }
         if(System.currentTimeMillis() - lastTimer >= 1000) {
            lastTimer += 1000;
            System.out.println("frames: " + fps + " | updates: " + ups);
            fps = 0;
            ups = 0;
         }
      }

constantly 60 fps.
5  Game Development / Newbie & Debugging Questions / Re: Sprite Animation to create effect using Atlas on: 2013-05-12 21:31:52
The most common way creating sprite animations is to load one big image, which contains all other animation frames.
Afterwards you can create your final animation sequence for example with the built-in java function 'getSubImage'.

http://docs.oracle.com/javase/1.4.2/docs/api/java/awt/image/BufferedImage.html#getSubimage%28int,%20int,%20int,%20int%29

In other words: You create an Image of 128x128. Now you want an animation that lets you character walk.
Therefore you draw a grid of the size of 16x16 on top of your image. Inside a cell of the grid you draw your animation frame.
If the current animation frame doesn't fill the entire cell with color you have two options:

Either you erase the background or you define programmatically the color which should be ignored while rendering the subImage.
6  Game Development / Newbie & Debugging Questions / Re: LWJGL - Draw section of texture on: 2013-05-10 23:07:36
glTexCoord2f is deprecated, isn't it?

Why you don't try learning 'modern' OpenGL? And why so many others just still continue using the static pipeline? I think OpenGL 3.x is worth learning it.

OpenGL 3.x isn't supported enough yet.

OpenGL 2.x is currently the best target.

Maybe the best target for compatibility reasons, but for high performance OpenGL 3.x or above is needed! In my mind OpenGL =< 2.x is only good for small scenes or so called demos, to show a part of something...
7  Game Development / Newbie & Debugging Questions / Re: LWJGL - Draw section of texture on: 2013-05-10 19:28:14
glTexCoord2f is deprecated, isn't it?

Why you don't try learning 'modern' OpenGL? And why so many others just still continue using the static pipeline? I think OpenGL 3.x is worth learning it.
8  Java Game APIs & Engines / OpenGL Development / Re: Am i good student :D ? Hows the code? background drawing on: 2013-05-08 17:52:45

[...] but im trying to learn java stuff nonetheless [...]


If you really want to learn how OpenGL works, don't use LibGDX. But it sounds that you want to get done quickly, so LibGDX may be a good choice in this case for you ...
9  Java Game APIs & Engines / OpenGL Development / Re: OpenGL Development - Resources on: 2013-05-07 22:58:47
modern opengl tutorials are hard to find

http://www.mbsoftworks.sk/index.php?page=tutorials&series=1
10  Game Development / Newbie & Debugging Questions / Re: Basic Java where to start? on: 2013-05-07 12:17:26
I also think you don't need to use the NewBoston's tutorials, because you can everything he is dealing with in his videos, read in books, too.
I personally prefer reading books, because there is often a greater level of detail.

By the way: NewBostons game programming tutorials are very similiar to this book's content: http://www.amazon.de/Beginning-Java-SE-Game-Programming/dp/1435458087/ref=sr_1_1?ie=UTF8&qid=1367928731&sr=8-1&keywords=beginning+java+se+6+game+programming

It's exactly the same, maybe he mentioned that.

11  Discussions / General Discussions / Re: another Hello thread on: 2013-05-06 10:21:04
Hello again!

Thanks for your answers and sorry for that, I forgot to mention that I'm using Java2D.
Generally I agree with you in all details about Java2D and about its weaknesses, but I will still use it for game programming although it isn't meant for that.

I think the reason why I like to use Java2D is, that it's a real challenge particularly a lot of people say it's too slow, you can't make real games with it, etc... And only because a high amount of people have a rejection against it, when it comes to game programming, it doesn't mean, it's impossible to do it anyway!
I also know, that it will be hard work and much more unpleasant, but I've also achieved good results in the past.
And at the end the most important reason why I'm using it:
It's incredible fun Smiley (just before the 'learning experience').

So everyone else can now make his own come out. I know you all love java2D!  Wink

12  Discussions / General Discussions / another Hello thread on: 2013-05-04 11:20:23
As you can see I'm new to this forum and therefor I just want to say hello to everyone.
To introduce myself a bit, I only can say, that I love programming in java and writing my
own little games.

I don't know why, but it seems, that I'm a kind of purist (Sorry, english isn't my mother
tongue, so I don't know if this is the right word), but I have the aim to do as much as
I can on my own. That means, I generally refuse certain external libraries like LWJGL etc.
for learning purpose.
So, for games I only make use of the build-in sun libraries.

I'm currently working on a small platformer:




Hope I can learn more here.
Bye

Edit:I screwed something up. now it should look like I wanted
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.

Elsealabs (11 views)
2014-12-28 10:39:27

CopyableCougar4 (17 views)
2014-12-28 02:10:29

BurntPizza (21 views)
2014-12-27 22:38:51

Mr.CodeIt (14 views)
2014-12-27 04:03:04

TheDudeFromCI (19 views)
2014-12-27 02:14:49

Mr.CodeIt (26 views)
2014-12-23 03:34:11

rwatson462 (57 views)
2014-12-15 09:26:44

Mr.CodeIt (47 views)
2014-12-14 19:50:38

BurntPizza (94 views)
2014-12-09 22:41:13

BurntPizza (115 views)
2014-12-08 04:46:31
How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!