Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (857)
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] 2 3 ... 11
1  Game Development / Newbie & Debugging Questions / Re: Problem with sprite on: 2014-02-14 03:13:05
There are two problems in your code.

    First: you are not storing the new enemies created in your run method.
    Second: You are not iterating over your enemies to draw them in the screen.

    Also I recomend you to put some sleep inside the loop, to release the processor for the rest of the OS.

2  Game Development / Newbie & Debugging Questions / Re: Double Buffering Clarification on: 2014-02-14 03:06:56
For AWT and swing the "redraw" operation is triggered by repaint().

In AWT: repaint() asks for an screen update, the AWTThread calls update(Graphics), which calls paint(Graphics).
AWT doesn't support automatic double buffering, the defult implementation of update(Graphics) method will clear the screen in each call.
When using AWT all your rendering must be defined inside the paint(Graphics) method.

In Swing: repaint() asks for an screen update, the AWTThread calls paint(Graphics), which calls paintComponent(Graphics).
Swing supports double buffering setting the property doubleBuffered to true.
When using Swing all your rendering must be defined inside the paintComponent(Graphics) method.

There are cases when the screen will need to redraw, like resizing the frame or moving another window over the frame. In those cases, the repaint() is called automatically by the AWT system.

3  Games Center / WIP games, tools & toy projects / Monty Reloaded on: 2012-10-16 04:08:43
   Here I present one of my projects I've been developing the last year. It's a remake/update of the classic game "Montezuma's Revenge". When child, I played this game a lot, not knowing that the copy was a bootleg of the prototype version, called "Preliminary Monty".

Since I wanted to make this remake semi official I contacted the creator of Montezuma's Revenge to ask his permission to develop a version for the android platform. The answer was that he was already developing it, and my game could be a tribute/"inspired by" type of game.

So I want to continue my project, but I'm not allowed to use the name, the map layouts, nor the characters from montezuma's.

The demo I sent to Montezuma's Creator: Monty Reloaded V0.4
Control with cursors
S to Jump
A to "switch" Torch

I was adding features present in the original game:
  • Stairs
  • Moving belts
  • Doors and keys
  • Coins/Gold/jewels
And some things I wanted to add to the game
  • Lightning from lamps
  • Better animation for Pedro

There are many things left in this demo, namely all the monster in the game.

My TODO list includes:

  • Fire pits
  • Ropes
  • Enemies
  • Powerups

  Any comment, feedback, ideas and opinion are greatly appreciated.
4  Games Center / WIP games, tools & toy projects / Archers Game on: 2012-10-16 03:28:18
Hi everyone,

    I was programming a little multiplayer game with archers, then a friend asked me to add some physics simulation to the the simulation, this is the result of the verlet physics added to the game.

Archer Test

    This simulation doesn't include features developed in the first version of the game, so they need to be integrated in this new simulation/rendering code.

  • HUD
  • network code
  • command line parameters

Other things in my TODO list:

  • Skin over the ragdolls
  • upgrades/power ups
  • Game Screens, Intro, Options, Lobby, etc.

   Any comment, is greatly appreciated.

5  Discussions / General Discussions / re-re-returning on: 2012-10-06 04:28:16
Hi everyone!

   After my second time away from this great community, I've returned.

   Since the last time I visited the forum, there are many changes in the layout and the content presented here. I see that there is a big focus on games (finished and WIP), so I'll begin posting a couple of games I've been working the last year.

6  Java Game APIs & Engines / OpenGL Development / Re: Sprites & transparency on: 2011-09-22 04:30:48
Are you using a Z-buffer? If you are, then you can't use blending. The transparent parts of the sprite will still result in a depth write, making all underlying sprites not being drawn.
Either sort your sprites from back to front and use blending. If you don't want to do that, use alpha testing instead. That will discard all fragments of the sprite that have an alpha under the threshold you decide. These fragments will not write to the depth buffer either.

I'm using zbuffer, so i added a sort before drawing the sprites

Just a question but wouldn't help to just enable the Alpha_Test with LEQUAL function? If the sprites have alpha values of 1.0 this would work with the Z-Buffer. At least it works fpr my sprite sorting for the Slick2D Framework...

I'm also using transparency for some effects (smoke, fire), so I needed blending.

Thanks to all, with the "z-sort" now the sprites are working ok, here a screenshot

Click to Play

7  Java Game APIs & Engines / OpenGL Development / Sprites & transparency on: 2011-09-10 07:47:44
Hi everyone!!

   I'm programming a little game, faking isometric view with ortho + rotate (x & y) + billboarding sprites.

   To optimize the GL calls, my SpriteManager is using a Vertex Buffer to draw all the sprite on screen in a single call.
Creation Code
    spritePool = new Sprite[MAX_SPRITES];
    vertexData = new float[3*6*MAX_SPRITES]; //6 vertices por sprite
    ByteBuffer vbb = ByteBuffer.allocateDirect(vertexData.length * 4);
    vertexBuffer = vbb.asFloatBuffer();

Use Code
       *    p1              p2
       *      +-----------+
       *      |           |
       *      |           |
       *      |     +     |
       *      |   px,py   |
       *      |           |
       *      +-----------+
       *     p3            p4
       *     p1           p2                 p2
       *      +-----------+                 -+
       *      |         +                  + |
       *      |       +                  +   |
       *      |     +                  +     |
       *      |   +                  +       |
       *      | +                  +         |  
       *      +-                 +-----------+
       *     p3                  p3         p4

    GL11.glVertexPointer(3, 0, vertexBuffer);

   Everything was working OK until I added textures, I checked and the textures are being loaded with the correct alpha. The sprites only draw the alpha > 0 part of the texture, but some quads are drawn with the background over sprites.

   The image show a sprite drawn OK (green, transparent quad), and a sprite with the error (red, background over sprtes):

   The blending and texture calls are:

    GL11.glBindTexture(GL11.GL_TEXTURE_2D, textureId);  

  Do I need some sorting of the triangles? or the blending call is not correct??


8  Java Game APIs & Engines / J2ME / Changing from EclipseME to MTJ on: 2011-08-05 04:04:09
I've used EclipseME for years, backed by the Sony Ericsson JME SDK.

Recently, with my last eclipse update (from Ganymede to Helios), i downloaded the MTJ, knowing it's the evolution of EclipseME, also updated the Sony Ericsson SDK.

The projects are compiling, the libraries link well in editors, but the emulator is not working.

MTJ doesn't install the jar in the emulator, so I'm getting ClassNotFoundException each time I try to debug.

It's there a new way to deploy into the emulator to debug?? Can be the SE SDK?

9  Discussions / General Discussions / Re: HUGE CHANGES FOR JGO - PLEASE READ! on: 2010-12-17 15:56:33
Oh my! Oh my!

  I'm lost for a couple of months and the site gets a nice update. Congratulations to all who are working in ths revamp.

10  Game Development / Game Play & Game Design / Re: Massive multiplayer puzzle on: 2010-11-03 13:36:15
The idea you describe is used in a pair of PS3 games, Little Big Planet (plataformer) and Mod Nation Racers(racer), the slogan for LBP was "Play, Create, Share".

The solution for the ranking/review used in LBP is first chosing from 1 to 5 stars and then select 3 of a group of predefined tags like "BIG", "EASY", "WEIRD", etc.

As Riven said, the problem here is marketing, you need users willing to create content for your game.

11  Discussions / General Discussions / Re: Excited Time Traveller! on: 2010-08-27 14:56:07

   I saw it yeterday, but wasn't sure if he was Chris.  Cool

12  Discussions / General Discussions / Re: Hey everyone, what have you been up to? on: 2010-08-19 14:19:01
I've been very quiet in the forums lately... also not prgramming in home either, last thing I did was a litle tech for the Tiny competition.
I blame all this to my work Undecided.
Last week started a new design for a Tower Defense game.
I've wrote some pages on units, enemies, gameplay rules, attributes of entities, one or two state diagrams. Also, I'm designing (drawing) the units, to make the corresponding sprites.
A couple of friends are waiting to test it, so I'll try to complete it.

13  Games Center / Tiny Game 2010 / Re: [Journal]Defend the Castle on: 2010-05-24 04:47:23
I get horrible flickering; are you double-buffering your graphics?
Oops... Why in my PC this doesn't happen!
Added buffering.

Overall, seems nice, but while I know how to win each level, it doesn't tell me how I lose. The attacking pieces seem to shy away from my castle at the last moment, so I'm not sure if they're trying to move an attacker onto my castle, or what?
The current AI tries to get to the last row, it doesn't look for the castle.  Roll Eyes
Also, I didn't put the lose condition.  to my TODO list
14  Games Center / Tiny Game 2010 / [Journal]Defend the Castle on: 2010-05-24 03:44:33
Excelent idea of the tiny game contest, so here is my first entry still WIP

Defend The Castle, is an original game I played in half of a chess board; I called it "Save the King", for the pieces used to play (king & pawns)

Play the Game here

In the list of TODO are:
  • better AI for the enemy
  • check for losing conditions
  • add score/stage data in the right side HUD
  • maybe add upgrades for the defenders, because the game is winnable only until 4/5 enemies

[size=8pt]Edit: Updated TODO.[/size]
15  Discussions / Miscellaneous Topics / Re: My new Home Page on: 2010-03-18 13:24:39
Thanks ptj33 and steveyO, today i'll try to add the corrections given by you.

Also, I need to update the links to the jnlp/jars and sources of the J4K entries.

16  Discussions / General Discussions / Re: Unlimited Gfx Detail on: 2010-03-15 19:30:56
you can also merge different material like a house with a door made of wood :  the door will break like wood and the brick like brick, realisticly even for differents bomb explosion location

I remember that "The Force Unleashed" uses Digital Molecular Matter to simulate those effects.
17  Discussions / Miscellaneous Topics / My new Home Page on: 2010-03-14 05:39:18
Hi everyone!!

After 5 moths from obtaining the domain name, I have put online my new page:

[size=14pt]Deme Games[/size]

I invite you to visit it, and comment about the layout/colors.

Also, since my language is not english any grammar or spelling error can be commented here to fix them.

Thanks in advance,


18  Games Center / 4K Game Competition - 2010 / Re: Thank you - submission period ended on: 2010-03-01 03:54:41
I wanted to make an entry this weekend, but our country was struck by a heavy eartquake.
No power for more than 24 hours and a big mess in the house to clean.  Undecided
second  year since 2004 that I have no games in the competition.
19  Discussions / General Discussions / Re: Bye Sun on: 2010-01-31 01:14:05
Maybe we all need to grow beards to match the existing Oracle developer base...

I didn't know why every morning when I tried to shave I couldn't.

Well that and the Metallica Tour on South America.

20  Java Game APIs & Engines / Java 3D / Re: Positioning the camera in overhead view on: 2009-12-16 19:43:00

    You can use the helper method  void lookAt(Point3d eye, Point3d center, Vector3d up) in the Transform3D class.

Transform3D trns = new Transform3D();
Point3D center = "position of player"
Point3D eye = "position of player + x distance over his head"  

Vector3D up ="forward direction of the player"  //assuming Z axis as Up in the game world , this vector must be in X/Y plane

trns.lookAt(eye, center, up);

21  Discussions / Miscellaneous Topics / Re: Wasting my life programming ? on: 2009-12-15 19:34:53
Hey guys this is a question I've been thinking about for a little while .

Well okay, I have a job (not game related) and a girlfriend and sometimes go out to play football with friends, and stuff ... but I'd say 90% of my spare time I'm writing games ... and it's been like that for more than one year !

Even sometimes when I'm just taking a walk with my girlfriennd I'm actually far away thinking about some algorithm to enhace performance of something .

Do you guys ever felt like that ? Or is it just me ?

Well I won't stop writing games anyway, I just want to feel that I'm not the only one Smiley

Enjoy all your free time to program while you can. My personal production  has decreased after finishing my studies. Now is wife, home, work, and if there is time left, games playing and programming.

worse, and this is actually annoying:

whenever I play a videogame. I am constantly thinking about how to implement the things that the game uses. And it drives me crazy. cause I cannot just simply enjoy the game Sad.

You keep seeing "The Matrix" (polygons, textures, particles, sprites, etc) instead of the game. i have been in that situation, in the PS2 era, I was most excited for the programming solutions than the games themselves.
I think this new generation is so far ahead of what I can do, I don't try to see through the game to the program.

My own total:
Total Time Spent Online:     21 days, 1 hours and 47 minutes.
22  Discussions / Miscellaneous Topics / Re: Developer Questions on: 2009-11-02 19:21:47
Sadly, C++.
I like the syntax, I like pointers, I REALLY like operator overloading and proper working const variables.
But the split between header files and definition files, forcing you to write code TWICE and with horrible horrible syntax.. Well.. I hate it. A lot.
(Also, it takes ages to compile. It doesn't have to.)

The clean, clearly defined, contained, singly defined (usually) classes in java are wonderful.
I'm not very fond of the operator overloading in C++, the other features named are from C, that's the reason for liking C and not C++.
23  Games Center / 4K Game Competition - 2010 / Re: Preliminaries (tentative) on: 2009-11-02 04:00:37
 Last year I tried to make my games applets, but i didn't work. So I need to find and "borrow" some 4k applet base.

24  Discussions / Miscellaneous Topics / Re: Developer Questions on: 2009-11-02 03:56:29
I started programming at 18,
Turing, a programming language oriented to teach the basics, very similar to pascal in sintaxis.
my Top 3 favorites are Java, Perl, and C (not C++).
Why Java? Because of the big API included in the SDK (not counting J2EE/J2ME)
25  Java Game APIs & Engines / Java 3D / Re: Java3D Sphere set position? on: 2009-10-01 15:22:27
In the scene graph, you should use a TransformGroup to position the sphere, so setting a new Transform3D to the TransformGroup updates the position of the object.

26  Java Game APIs & Engines / Java 2D / Re: Realistic Lighting in a 2D game on: 2009-10-01 15:01:07

I exported the project directly to a jar, but I had the resources hard-coded (d:/eclipse/workspace...) in the map loading code. In my PC the jar worked, since the resources were in place.

Here goes a version fixed and  compliled for jdk1.4

Next version goes to the showcase.

27  Java Game APIs & Engines / Java 2D / Re: Realistic Lighting in a 2D game on: 2009-09-29 16:23:15
Ha... Press "S" to start Roll Eyes, thanks Hansdampf!!
28  Java Game APIs & Engines / Java 2D / Re: Realistic Lighting in a 2D game on: 2009-09-29 14:42:58
Strange... I tested in my home (WinXP SP2, JDK1.6_XX).

I'll recompile for 1.4 and upload again later, now I'm at work.

29  Java Game APIs & Engines / Java 2D / Re: Realistic Lighting in a 2D game on: 2009-09-29 06:04:19
Here goes the code:
//g2 is a Graphics2D object
//p is a Player object
//map is a Map(TileMap) object
Arc2D.Double arc = new Arc2D.Double();
arc.setArcByCenter(p.getLightX(), p.getLightY(), radius, p.getAngle()-spread, 2*spread, Arc2D.PIE);
GradientPaint gp = new GradientPaint(p.getLightX(),p.getLightY(),new Color(0,0,0,0),
    p.getLightX()+radius*(float)Math.cos(Math.toRadians(p.getAngle())),p.getLightY()-radius*(float)Math.sin(Math.toRadians(p.getAngle())),new Color(0,0,0));

And the Demo, could you post how it runs on your machines?
UP, DOWN: flashlight angle
Z, X: flashlight focus
A: Run
S: Jump
Space: Pause/MiniMap
30  Java Game APIs & Engines / Java 2D / Re: Realistic Lighting in a 2D game on: 2009-09-28 15:49:09
I did some flashlight effect in J2D for my unfinished entry at LD48.

In pseudo code:

define cone of light;
use cone for clipping;
draw scene;
define gradient (transparente to black) in the direction of light
paint the cone with the gradient;

The result is something like this image:

Then I added the same logic for a square around the player, and some options to control the ligh focus(distance v/s spread) getting this:

Don't know how is the performace in old machines or old JVM, but in my PC (athlon 64 3000Mhz, 1GB DDR2, nVidia7600GS 256 MB, jdk1.6_XX) it works fine.

Pages: [1] 2 3 ... 11
hadezbladez (761 views)
2018-11-16 13:46:03

hadezbladez (391 views)
2018-11-16 13:41:33

hadezbladez (758 views)
2018-11-16 13:35:35

hadezbladez (200 views)
2018-11-16 13:32:03

EgonOlsen (2401 views)
2018-06-10 19:43:48

EgonOlsen (2581 views)
2018-06-10 19:43:44

EgonOlsen (1486 views)
2018-06-10 19:43:20

DesertCoockie (2149 views)
2018-05-13 18:23:11

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

nelsongames (2648 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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!