Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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  Discussions / General Discussions / Re: Where is Brynn? on: 2018-05-29 22:19:11
i made a post before drenius and deleted it accidentally, it was:

Summon and you shall receive.

or something like that
2  Games Center / Featured Games / Tetradecagon - ** FOR SALE ON STEAM ** on: 2015-10-15 20:46:46

Tetradecagon is the ultimate game of pong. Bounce a ball off of the highlighted sides of a user-controlled polygon for as long as humanly possible. As time progresses, the ball will quicken in speed and the polygon will grow in number of sides. It seems extremely simple at first, but it quickly turns into a brutally difficult game. Tetradecagon will easily provide hours of intense, rage-inducing fun and will quench anybody's thirst for extremely challenging and exciting amusement.

For those with photosensitive epilepsy, an epileptic friendly option has been added. Those who are not satisfied with this option are entitled to a refund.

  • Hours of intense, rage-inducing fun
  • 3 breathtaking chiptune soundtracks by Valiant
  • The best game of pong you will ever play in your life
  • Competitive leaderboards
  • Full controller support (you can play on your couch!)
  • Support for Windows, Mac, and Linux + SteamOS
  • 16 achievements to unlock!
  • And much more!

3  Game Development / Newbie & Debugging Questions / FBO troubles. on: 2014-09-12 20:53:34
I need some help with FBOs, I am trying them for the first time, and I get the swing of it but I am not succeeding in programming a class for it.

Currently this is with my FBO class:



As you can see it removes everything rendered before it, and does not render the things bound to it.

I am applying what I made this way:

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  
public LightManager(World world) {
      try {
         fboLight = new FBO();
         logo = TextureManager.loadTexture("/revereor/logo/logo");
      } catch (Exception e) {
         // TODO Auto-generated catch block
         e.printStackTrace();
      }
   }

   @Override
   public void render() {
      Point pt = GDisplay.getCamera().getFOV();
      fboLight.bind();
      glPushMatrix();
      {
         glTranslated(Game.getGame().player.x, Game.getGame().player.y, 0);
         logo.bind();
         glBegin(GL_QUADS);
         {
            glTexCoord2f(0, 0);
            glVertex2d(-(50 / 2), 50 / 2);
            glTexCoord2f(1, 0);
            glVertex2d((50 / 2), 50 / 2);
            glTexCoord2f(1, 1);
            glVertex2d((50 / 2), -50 / 2);
            glTexCoord2f(0, 1);
            glVertex2d(-(50 / 2), -50 / 2);

         }
         glEnd();
      }
      glPopMatrix();
      fboLight.release();
      fboLight.render();
   }


and I have this:

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  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
package com.revereor.game.render;

import static org.lwjgl.opengl.EXTFramebufferObject.GL_COLOR_ATTACHMENT0_EXT;
import static org.lwjgl.opengl.EXTFramebufferObject.GL_DEPTH_ATTACHMENT_EXT;
import static org.lwjgl.opengl.EXTFramebufferObject.GL_FRAMEBUFFER_EXT;
import static org.lwjgl.opengl.EXTFramebufferObject.GL_RENDERBUFFER_EXT;
import static org.lwjgl.opengl.EXTFramebufferObject.glBindFramebufferEXT;
import static org.lwjgl.opengl.EXTFramebufferObject.glBindRenderbufferEXT;
import static org.lwjgl.opengl.EXTFramebufferObject.glFramebufferRenderbufferEXT;
import static org.lwjgl.opengl.EXTFramebufferObject.glFramebufferTexture2DEXT;
import static org.lwjgl.opengl.EXTFramebufferObject.glGenFramebuffersEXT;
import static org.lwjgl.opengl.EXTFramebufferObject.glGenRenderbuffersEXT;
import static org.lwjgl.opengl.EXTFramebufferObject.glRenderbufferStorageEXT;
import static org.lwjgl.opengl.GL11.*;

import java.awt.Point;

import org.lwjgl.opengl.EXTFramebufferObject;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL14;
import org.lwjgl.opengl.GLContext;

import com.revereor.game.display.GDisplay;
import com.revereor.game.main.log.Logger;

public class FBO {
   
   private int framebufferID, colorTextureID, depthRenderBufferID;

   public FBO(){
      init();
   }
   
   private void init(){
      boolean FBOEnabled = GLContext.getCapabilities().GL_EXT_framebuffer_object;
      if(!FBOEnabled)
         Logger.printerr("Frame Buffer Objects not supported, this WILL cause problems.");
     
      framebufferID = glGenFramebuffersEXT();                                
      colorTextureID = glGenTextures();                                    
      depthRenderBufferID = glGenRenderbuffersEXT();                          

      glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebufferID);                  

      // initialize color texture
      glBindTexture(GL_TEXTURE_2D, colorTextureID);                          
      glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);            
      glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 512, 512, 0,GL_RGBA, GL_INT, (java.nio.ByteBuffer) null);  
      glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_TEXTURE_2D, colorTextureID, 0);


      // initialize depth renderbuffer
      glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depthRenderBufferID);            
      glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL14.GL_DEPTH_COMPONENT24, 512, 512);  
      glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,GL_DEPTH_ATTACHMENT_EXT,GL_RENDERBUFFER_EXT, depthRenderBufferID);

      glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);  
   }
   
   public void bind(){
      glViewport (0, 0, GDisplay.getCamera().getFovX(), GDisplay.getCamera().getFovY());  
      glBindTexture(GL_TEXTURE_2D, 0);                            
      glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, framebufferID);
      glClearColor (0.0f, 0.0f, 0.0f, 1.0f);
      glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);  
      glTranslatef (0.0f, 0.0f, -6);
     
   }
   
   public void release(){
      glEnable(GL_TEXTURE_2D);
      glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);  
   }
   
   public void render(){
      glEnable(GL_TEXTURE_2D);
      glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);    

      glLoadIdentity ();                                            
      glTranslatef (0.0f, 0.0f, -6);    
      glColor3f(1, 1, 1);
                           
      GL11.glPushMatrix();

         glEnable(GL_TEXTURE_2D);
           
         glBindTexture(GL_TEXTURE_2D, colorTextureID);
         glBegin(GL_QUADS);
         glTexCoord2f(0.0f, 0.0f); glVertex2i(0,   0);  
         glTexCoord2f(1.0f, 0.0f); glVertex2i(GDisplay.camera.getFovX(),  0);
         glTexCoord2f(1.0f, 1.0f); glVertex2i(GDisplay.camera.getFovX(), GDisplay.camera.getFovY());
         glTexCoord2f(0.0f, 1.0f); glVertex2i(0, GDisplay.camera.getFovY());
         glEnd();
           
         glPopMatrix();

     
   }
   
   
   
}


Anyone have some experience, tips, or directions to go with this?
4  Game Development / Game Play & Game Design / Lighting on: 2014-09-10 22:20:56
Correct me if I am wrong, but I think I know how I want to do lighting for Project NAH.

I can have a blank FBO, I can get every light in view or that could be in view, draw it to the FBO, and draw the FBO to the screen?

Would that work or am I cray cray.
5  Java Game APIs & Engines / OpenGL Development / Bitmap Font on: 2014-05-30 14:19:53
I need help getting a certain 16x16 area on a bitmap of my choice, preferably I want to have a variable that can change (0,1,2,3), so I can just wip up something using ascii to map character to point, and then will get that 16x16 area.

Currently when I change the texture coords, the smaller it is, the more zoomed in it is on the bottom left, the bigger it is, the more zoomed out it is, but when I make them different from each other it start slanting and doing weird stuff? What am I doing wrong and how do I only show one slot?

My code so far:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
glPushMatrix();
      {
         glColor4f(0f, 0f, 0f, 1.0f);
         glTranslated(x,y,0);
         bitmap.bind();
         for(int i = 0; i < str.length(); i++){
           
            glBegin(GL_QUADS);
            {
               glTexCoord2f(0,0); glVertex2d(0, 0);
               glTexCoord2f(0.25f,0); glVertex2d(0, fontSize);
               glTexCoord2f(0.25f,0.25f); glVertex2d(fontSize, fontSize);
               glTexCoord2f(0,0.25f); glVertex2d(fontSize, 0);
            }
            glEnd();
         }
      }
      glPopMatrix();


Fontsize is the size its going to renderer, For my tests I passed it as 10.
6  Discussions / General Discussions / [FIXED] Get position of end of angle? on: 2014-04-18 21:45:12
Hey guys, I am once again here because I am stumped on something. In my game, I want to calculate the position of the end of the arm, if you can imagine this, I have the arm rotation angle (from the center of the body), and I have the distance of the arm. Can someone point me in the right direction or give me some pseudo code.
7  Game Development / Newbie & Debugging Questions / [FIXED] Mouse Coords in a tiled world. on: 2014-04-15 23:23:40
Hey guys. I need some help with my platformer game, you see- I cannot figure out at all how to find where the mouse is on the screen. You may be saying:
1  
Well, just add them mouse coords and camera coords, then it will work.

but no. It doesnt. I have no clue why! Let me keep in mind, it works if I use the player's x,y I just cant add the mouse factor into that.

Since I probally havent given enough info on the code itself, you can generalize, but this is what ive tried so far.

WORKS.
1  
actionPos =  new Point(x,y);


DOESNT WORK. WELL, SORT OF
1  
actionPos =  new Point(mouse.x+camera.x,mouse.y+camera.y); //camera is just the players x and y with half the screen subtracted


Any suggestions? Now here is the silly thing. It works, but the action position races ahead of the cursor. Basically at 0,0 on the screen, where camera.x, camera.y is, it is 100% accurate, but 2 pixels away, it may be 4-6 pixels away, at about half the screen its a quarter screen away from the cursor, etc.

I hope you guys can help. Ill give any more stuff on the issue if its needed! This is urgent!
8  Discussions / Business and Project Management Discussions / Sound/Music Artists. on: 2014-04-09 13:10:55
The game I am currently working on is coming along nicely, my "team" and I would love to know people who are good at creating music and sounds so when we have a game worthy of it we know who to call. Thanks!

If you need more info just ask.  Pointing

(this man swords cant be artist, dev, and music artist ok? im not notch or red or anything)
9  Game Development / Newbie & Debugging Questions / [UNSOLVED] Collision Trouble on: 2014-03-30 13:20:54
Hey guys. I need your help for my SAGL Platformer, I am using the same, working code from Super Doctor Who but in this run it seems to not be running for some reason.

First off, I check sideways collision using this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
protected boolean collidingWithWallRight(){
      if(!collidable)
         return false;
      return game.chunkManager.isBlockAtPixelCollidable(x+(width/2)-1,y+(height))  && game.chunkManager.isBlockAtPixelCollidable(x+(width/2)-1,y-(height/2)) ;
   }

   protected boolean collidingWithWallLeft(){
      if(!collidable)
         return false;
      return game.chunkManager.isBlockAtPixelCollidable(x-(width/2),y-(height))  && game.chunkManager.isBlockAtPixelCollidable(x-(width/2),y+(height/2)) ;
   }

   protected boolean collidingWithWall() {
      if(!collidable)
         return false;
      return game.chunkManager.isBlockAtPixelCollidable(x-(width/2)+4,y-(height))  && game.chunkManager.isBlockAtPixelCollidable(x-(width)+4,y+(height/2)) || game.chunkManager.isBlockAtPixelCollidable(x+(width/2)-4,y-(height/2))  && game.chunkManager.isBlockAtPixelCollidable(x+(width/2)-4,y+(height/2)) ;
   }


and I get the blocks and if there where they should or shouldnt be by:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
public Block getBlockAtPixel(int x, int y) {
      try{
         x = x/Block.blockSize.width;
         y = y/Block.blockSize.height;
         final Point cpos = new Point((int)(x/Chunk.xa), (int)(y/Chunk.ya));
         final Chunk chunk = chunks[cpos.x][cpos.y];
         Point lpos = new Point(x%Chunk.xa, y%Chunk.ya);
         return chunk.blocks[lpos.x][lpos.y];
      } catch(Exception e){
         return null;
      }
   }

   public Boolean blockAtPixelExists(int x, int y){
      return getBlockAtPixel(x,y) != null;
   }

   public Boolean isBlockAtPixelCollidable(int x, int y) {
      if(blockAtPixelExists(x,y))
         return getBlockAtPixel(x,y).isCollidable();
      return false;
   }


and then in the entity's tick I call this to make sure they stay out of walls if they get into one:

1  
2  
3  
4  
5  
6  
if(collidingWithWallRight()){
         x-=1;
      }
      if(collidingWithWallLeft()){
         x+=1;
      }


and in the Players class I call this to move the player:

1  
2  
3  
4  
5  
if(KeyManager.keyPressed(Key.LEFT) && !collidingWithWall() && !collidingWithWallLeft()){
         walk(-walkSpeed);
      } else if(KeyManager.keyPressed(Key.RIGHT) && !collidingWithWall() && !collidingWithWallRight()){
         walk(walkSpeed);
      }


The walk method contains no collision detection.

Its so weird. I can sometimes walk through walls and sometimes I get stuck and sometimes I cant walk through walls. I can never walk through walls that are 2 blocks high, otherwise I can most of the time.

Anyone see something odd and can point me in the correct direction?
10  Games Center / WIP games, tools & toy projects / Project NAH - A sandbox survival platformer. on: 2014-02-28 17:07:53
*bum bububububub bububum*
Project NAH Rewrite
(thumbnail)

Project NAH is being rewritten with LibGDX. It will now be able to fulfill its dream at being a scary, tedious yet fun pixely sandbox exploring game. At the moment I am in the process of rewriting the features in the old version, then I will get back on track.

Some notable features in the rewrite so far:


CAVES


Cave systems using the power of simplex noise to make traversable, extended, multi cavern networks that typically span for tens of thousands of blocks in any direction.



BITWISE TILEMAPPING

I think it looks nice Smiley



INFINITE WORLDS

World starts breaking roughly at ~5 million *oh no*.
<a href="http://www.youtube.com/v/_ZqTIz0DOhw?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/_ZqTIz0DOhw?version=3&amp;hl=en_US&amp;start=</a>


LIGHTING

Uses box2dlights, looks lovely and adds an amazing atmosphere.


11  Games Center / WIP games, tools & toy projects / Re: Super Doctor Who! on: 2014-02-15 03:56:43
No notable updates for multiplayer development, but heres a sneak peak at level 4 and a new (bouncy) block.

Click to Play
12  Game Development / Game Mechanics / Re: Passing a variable vs. Storing that variable on: 2014-02-14 23:42:30
With the 1 FPS it *may* save *somehow* on a *horrible* an xp or something, and just because it seems nicer and I can call the object anytime- with my opinion injected into the thought I also think its a good idea to give on creation.
13  Games Center / WIP games, tools & toy projects / Re: 2D Racing game on: 2014-02-13 14:10:45
I personally suggest a dropbox download, easier to update in my opinion.
14  Games Center / WIP games, tools & toy projects / Re: WIP - Jeff on: 2014-02-12 14:15:17
You spelt "Alpha" wrong in the title of your window Tongue
15  Games Center / WIP games, tools & toy projects / Re: Super Doctor Who! on: 2014-02-12 00:23:43
Companions completely implemented, but only clara right now. The can punch enemies and ofc will have configurable stats using a CompanionTypes enum, like the DoctorTypes on the 3rd? page. I added more messages to the exception handler random messages, and also started implementing global entities and converted the doctor from its own entity to a global entity, pretty much so I have a cleaner game class. Also, the entire enemy AI was rewrote, the most notable additions are:

  • Enemies no longer track players through walls
  • Enemies can track any entity now (not just the doctor)
  • Angels can move if they are not in anybody's lightmap
  • Along with the above, they can only move when everybody is blinking.

Also I implemented a sexy revereor logo at the start of the game and the "exterminate" sound effect is played half way through the sequence, which shows off how dynamic my component class and display are. (shows you I don't jump to the game class)

Images: (first shows clara punching a dalek, and her gui, which consists of blinking. Second shows dalek not tracking through wall, third is the logo)





And lastly, I am using two monitors for coding now AND I am using a dark coding scheme, which helps with NOT hurting my eyes. For the monitors, utils and coding on one, console, problems, package explorer and outline on the other. I love it!
 
16  Games Center / Archived Projects / Re: Fappy Bird on: 2014-02-11 21:56:48
As the one who just derailed the topic, I ask you stop the nonsense on copyright, he is using it for personal use and isn't doing harm to the creator by distributing it here, and by copyright law (of the US) no one can arrest him for that, now if he sells it, thats a different story. But still, respect the original creators rights.
17  Games Center / Archived Projects / Re: Fappy Bird on: 2014-02-11 14:27:11
Its not copyrighted, well, the tubes are (by nintendo)
18  Games Center / Archived Projects / Re: Fappy Bird a Flappy Bird clone on: 2014-02-10 21:59:02
Lol you are aware that to fap means to masturbate? :p

Kudos. +1.
19  Discussions / Miscellaneous Topics / Re: Exporting games directly from eclipse? on: 2014-02-10 04:03:29
Natives have to be loaded from outside the jar.

Correct me if im wrong but- Incorrect. Fat jars CONTAIN those natives like they are contained in the IDE. I acknowledge some code still needs to load it outside the jar though.
20  Games Center / Archived Projects / Re: Quest on: 2014-02-10 03:45:20
Entities (EntityMoveListener/Event)
Combat (Player/EntityCombatListener/Event)

Speak to us in words. Not class directories (if they are)
21  Discussions / Miscellaneous Topics / Re: Random brain fart: the rationale behind versioning on: 2014-02-10 02:22:13
Wait what.   Huh
22  Discussions / Miscellaneous Topics / Re: Exporting games directly from eclipse? on: 2014-02-10 02:18:50
Use a fat jar exporter plugin.
23  Discussions / Miscellaneous Topics / Re: Exporting games directly from eclipse? on: 2014-02-10 00:04:08
Make sure your "splicing" a RUNNABLE jar. SAGL only works when you do that and I am assuming its something to do with MERCury I would think it'd apply the same.
24  Games Center / WIP games, tools & toy projects / Re: BrickBroken - Break brick game by SLDT on: 2014-02-09 18:39:27
Make a 8/16 bit tiled background then Tongue

Minecraft textures != 8/16 bit
Just use an solid color, anything is better, you can focus on images later.

Ill have to throw you an Exception (lol). Minecraft's textures 16x16 but doesn't use an 8 bit pallete of colors. Never the less it has pixelated textures, but theres nothing GL_NEAREST cant fix.
25  Games Center / WIP games, tools & toy projects / Re: BrickBroken - Break brick game by SLDT on: 2014-02-09 17:30:07
Make a 8/16 bit tiled background then Tongue
26  Games Center / WIP games, tools & toy projects / Super Doctor Who! on: 2014-01-18 21:21:16
- ALPHA 1.0 -

*THIS POST IS OUTDATED. CHECK LATEST PAGES FOR UP TO DATE GAME CONTENTS AND VERSION*

Key Features:
  • Ability to roam around 2 levels.
  • Ability to play as Matt Smith.
  • Daleks!
  • Sonic Screwdrivers that can open doors (Daleks have sonic probes too, which adds an interesting mechanic)

      Doctor Who fans unite! I am creating a Doctor Who game sort of like Mario, only it will be a lot better! And it, including the music, is in 8 bit (Currently only "Im The Doctor" and the "Doctor Who Theme", Heres more about it. The idea is you have your character, at the moment it is only Matt Smith, and you can roam levels freely and without lag thanks to my own custom built version of lwjgl. Currently it features a Level Creator, The Doctor, 1 Enemy (Working and Talking Daleks with Full AI true to the show!), and a lot more I am probably forgetting. Screenshots are at bottom.


If you do not want to search the thread for updates and downloads, the download should be this link at all times: https://dl.dropboxusercontent.com/s/bj7r1fc3d7sud0o/doctor.zip?dl=1&token_hash=AAGX_pVVs7ks3d9aoTZMmhZujRw88MTQDTP-Eno8-v4xFA

Other stuff:



Older snaps:


Pages: [1]
 
EgonOlsen (79 views)
2018-06-10 19:43:48

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

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

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

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

nelsongames (158 views)
2018-04-24 18:14:32

ivj94 (902 views)
2018-03-24 14:47:39

ivj94 (162 views)
2018-03-24 14:46:31

ivj94 (813 views)
2018-03-24 14:43:53

Solater (177 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
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!