Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (581)
Games in Android Showcase (162)
games submitted by our members
Games in WIP (632)
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 / J2ME / Handling different display sizes on: 2005-08-05 05:07:52
I wonder how my game can handle different display sizes.

In desktop game, we can set fullscreen to a standard resolution (800x600).

Mobiles have an standard resolution?
Which is the best way to handle this?
2  Java Game APIs & Engines / J2ME / Re: Constant Frame Rate on: 2005-08-05 05:01:17
I tried it, but I expect 16fps and I get up to 30fps  Undecided.

Well, I suspect its because this resturns milis, not nanos...  Sad
3  Java Game APIs & Engines / J2ME / Re: Constant Frame Rate on: 2005-08-04 05:17:09
I don't know how  Undecided.

With J2ME I use System.nanoSeconds(), but J2ME doesn't have it.
Any example J2ME game loop  Huh

4  Java Game APIs & Engines / Tools Discussion / Re: compiling resources? on: 2005-07-27 06:14:29
yes, I know there's no practical way.

I just like to prevent the "casual thief"  Smiley.
5  Java Game APIs & Engines / Tools Discussion / Re: compiling resources? on: 2005-07-27 01:09:06
I never heard about 64Kb limit, thanks!

BTW, Im trying to find a way to encrypt my resources.
6  Java Game APIs & Engines / Tools Discussion / compiling resources? on: 2005-07-26 23:01:08
Hello again, I used to compile my resources when I was programming in c++.
I mean, convert resources files (images, etc...) to .cpp files (.java this time).

Is there something to do it in the standard api?
7  Java Game APIs & Engines / Tools Discussion / obsfucators on: 2005-07-26 22:45:18
Hi, I like to use an obsfucator (free), which do you recommend?
8  Java Game APIs & Engines / Java 2D / Re: Image stretch on: 2005-07-25 01:23:37
It creates a new image object  Undecided?.

Is there a way to draw an scaled image directly on the graphics?
9  Java Game APIs & Engines / Java 2D / Image stretch on: 2005-07-25 00:44:44
I googled a lot, but I couldn't it  Undecided.

I need to draw my image into a Graphics2D using linear interpolation:
I need something like:

There's a drawImage() method, but it doesn't stretch the image using linear interpolation.
10  Game Development / Game Play & Game Design / Re: Main Loop on: 2005-07-22 18:48:38
cool, I'll take a look   Cheesy.
11  Java Game APIs & Engines / J2ME / Re: Constant Frame Rate on: 2005-07-22 18:45:44
...thanks again
12  Java Game APIs & Engines / J2ME / Re: Future of J2ME on: 2005-07-22 18:45:23
Thanks for your reply.
13  Java Game APIs & Engines / J2ME / Constant Frame Rate on: 2005-07-22 02:07:34
Hello again, I have another question.

Some small devices are faster than others, this will affect my game fps or it is handled (somehow) by J2ME?.
14  Java Game APIs & Engines / J2ME / Future of J2ME on: 2005-07-22 02:04:36
Hello, Im new with small devices programming.

While I was reading some info about J2ME, I thought something;
in the future small devices will be able to run the standar java virtual machine, right?.

This "future" it's far or near?

15  Game Development / Game Play & Game Design / Re: Main Loop on: 2005-07-22 01:54:20
oh, then I can't use these libs  Sad.

Well, anyway, that space invaders tutorial explains what I was looking for,
Thanks again!
16  Game Development / Game Play & Game Design / Re: Main Loop on: 2005-07-21 19:56:27

you help me a lot.
I like something simple, I write 2d games.
These libs JInput, JOGL, LWJGL are 100% portable, right?.
17  Game Development / Game Play & Game Design / Re: Main Loop on: 2005-07-21 18:58:09
Thanks for your reply  Smiley.

Now I need:
1) Catch inputs events and store them.
2) Double Buffer
3) Run the game at constant rate

1) For the key events, I store each key state in a variable, set it true when its pressed and false when its released?. How is the best mechanism?
The only way to "listen" those events is implementing the Component interface? (The only way I know to read inpur is with Component addKeyListener. Is there another way?)

2) this is ok?:
class Screen extends JPanel {
   Image buffer = createImage(300,200);
   public getGraphics getGrapchis() { return buffer.getGraphics(); }
   public void flush() { buffer.dispose(); }

3) What should I use for run the game a constant rate?, should I use Threads?
I don't like to use extensions, there isn't another way?  Undecided

18  Game Development / Game Play & Game Design / Main Loop on: 2005-07-21 18:07:48
Hello people!,
I was programming games in c++, and now Im moving to Java world  Grin.

In my game design, I use a GameContext interface:
public interface GameContext {
  public void start();                         // called by GamePlayer
  public void logic(InputEvents i); // InputEvents are all my game inputs
  public void render(Screen s);    // Screen is another class from my package
  public void end();                          // called by GamePlayer

And a GamePlayer, that plays the GameContext:
class GamePlayer {
  public void play(GameContext g) {
     // game loop
     // end loop
  public void stop() { /* code */ }

My question is how the main game loop is coded in java, which classes should I use, and how?.
(I already now the FPS and that stuff, but I don't know how to code it, the API is huge!!!  Smiley)
I read some books and tutorials, but they are old or very confusing  Undecided.

Thanks in advance!
Pages: [1]
Waterwolf (23 views)
2015-05-20 15:01:45

chrislo27 (27 views)
2015-05-20 03:42:21

BurntPizza (64 views)
2015-05-10 15:53:18

FrozenShade (48 views)
2015-05-07 09:11:21

TheLopais (210 views)
2015-05-06 13:36:48

TheLopais (194 views)
2015-05-06 13:35:14

TheLopais (201 views)
2015-05-06 13:33:39

TheLopais (220 views)
2015-05-06 13:32:48

TheLopais (216 views)
2015-05-06 13:31:28

ClaasJG (238 views)
2015-04-30 20:33:25
List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

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