Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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
1  Game Development / Newbie & Debugging Questions / Re: Make the camera follow multiple characters on: 2014-03-09 19:46:46
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  
         // Camera Setup
        // X
        float minx = e1.x, maxx = e1.x;
         if (e2.x < minx) {
            minx = e2.x;
         }
         if (e3.x < minx) {
            minx = e3.x;
         }
         if (e4.x < minx) {
            minx = e4.x;
         }
         if (e2.x > maxx) {
            maxx = e2.x;
         }
         if (e3.x > maxx) {
            maxx = e3.x;
         }
         if (e4.x > maxx) {
            maxx = e4.x;
         }
         float difx = (maxx - minx) + 100;

         GL11.glScalef(800 / difx, 800 / difx, 1);
         GL11.glTranslatef(-minx + 50, 0, 0);


Does the Job for 4 Entities (Screen 800x600) but this is only based on x coordinates, so none of the entities can go out of the screen left or right, they still can go out top or bot. Called before rendering the entities
2  Game Development / Newbie & Debugging Questions / Re: Make the camera follow multiple characters on: 2014-03-09 19:22:46
I would take the distances between all Objects and see which of them is the biggest, then scale the whole scene for that distance (or a bit higher so that both characters would still fit on the screen without getting cut in half) and position it so that the character with the lowest x value is at the left side (for example allways 50 px away from the end of the visible display) and the character with the heighest x value is at the right side of the screen (again with 50 px distance to the end of the display) and do the same with the y coordinates (but maybe try to keep the relations of the Screen scaling the same cause it'll look weird otherwise)
3  Games Center / Cube World Projects / Re: Block Game with LWJGL on: 2014-03-03 17:25:09
He said he wants to learn them so maybe he currently uses immediate mode and now tries to improve and change it to display lists and VBOs? Smiley
4  Games Center / Cube World Projects / Re: Block Game with LWJGL on: 2014-03-03 12:40:19
Looks nice, using VBOs or still in immediate mode? Cheesy
5  Games Center / WIP games, tools & toy projects / Re: Treasure Hunt on: 2014-03-01 15:29:28
Fixed a Bug where the game just skipped a level because the treasure tile was on the same place than on the map before Smiley
6  Games Center / WIP games, tools & toy projects / Re: Treasure Hunt on: 2014-02-28 13:04:54
Changed Textures, Size of the Maze and the Amount of Time given per level Smiley
7  Games Center / WIP games, tools & toy projects / Re: Treasure Hunt on: 2014-02-25 18:41:16
Okay, now that Image fits the size of a Smartphone Display Cheesy

Can anyone tell me how to scale LibGDX font so it looks the same on every Display?
8  Games Center / WIP games, tools & toy projects / Re: Treasure Hunt on: 2014-02-25 13:42:40
is there any way to make it smaller here? or do i have to scale it with gimp? Cheesy yeah, i was kinda surprised my smartphone got 1920x1080 o.O
9  Games Center / WIP games, tools & toy projects / Re: Treasure Hunt on: 2014-02-23 19:51:15
Okay, new Download Link, got something wrong with the coordinates of the Controller for Touch input Smiley

Yeah sorry it's my first android project, maybe i'll pay the 25$ in the future to put it on Play Store
10  Games Center / WIP games, tools & toy projects / Treasure Hunt on: 2014-02-23 19:16:50
So I made some little game for Android devices (Just started with libGDX and Android development 2 Days ago so don't expect too much here Cheesy)

The Goal is to get through a Mazeto get the Treasure (Some Red Texture I use for now Cheesy) once reached the game sets the next level and adding 20 seconds to the Timer (Which starts at 40 seconds) There's some kind of Controller in the lower left for movement of the player. The Maze generation is made by me and the size of the Maze is about 21x21 Tiles. And well that's it i think Cheesy I just got to Level 5



I didn't upload it to Google Play Store (cause that would cost me 25$? if i got that right) so i just uploaded the .apk to Mediafire: Download

TODO:
-Add Coins (Giving 10 seconds on the time i think)
-Maybe some simple fighting system with a sword like there's also monsters in the maze


Tested on Galaxy S4

Feedback welcome Smiley
11  Java Game APIs & Engines / OpenGL Development / Re: How to handle single vertex with multiple uv co-ordinates? on: 2014-02-05 14:18:06
when drawing a cube (In Immediate Mode?) you should have 6 parts, the 6 faces you draw. The Cube has 8 different Vertices but you have to use each Vertice 3 times (Because there's 6 faces touching it). So you use the Texture coordinate corresponding to the Face you're drawing
12  Discussions / Business and Project Discussions / Re: Creating A Java Programming Team! Girls and Boys Welcome! on: 2014-02-03 22:55:49
Tryed to add you in Skype but got no response?
13  Game Development / Newbie & Debugging Questions / Re: Pause the game until key pressed on: 2014-01-22 13:48:08
Key Pressed should just be the Moment when they Key actually pressed while Key Down repeatly is true when the Key is still Down
14  Games Center / Showcase / Re: Escaping Cube on: 2014-01-05 17:55:20
I don't think i will add a start screen or something cause it'll stay just some simple minigame and i did it to look at what options i have to make an AI for enemies in games Smiley
15  Game Development / Newbie & Debugging Questions / Re: Unable to rotate a 2D triangular polygon via glRotatef(). on: 2014-01-05 17:52:43
Couldn't know your angle was in radians haha Cheesy
I used inverted x and y coordinates cause you did it too in your example code Cheesy
Glad i could help you
16  Game Development / Newbie & Debugging Questions / Re: Unable to rotate a 2D triangular polygon via glRotatef(). on: 2014-01-04 13:53:58
Try this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
public void draw() {
      GL11.glPushMatrix();
      GL11.glTranslatef(-x, -y, 0f);
      GL11.glRotatef(angle, 0, 0, 1f);
      GL11.glColor3f(0f, 1f, 1f);
      GL11.glBegin(GL11.GL_LINE_LOOP);
      {
         GL11.glVertex2f(0,  - 10);
         GL11.glVertex2f( 8, 10);
         GL11.glVertex2f(0, 5);
         GL11.glVertex2f( - 8, 10);
         GL11.glVertex2f(0, - 10);
      }
      GL11.glEnd();
      GL11.glPopMatrix();
   }


That's how i would do it
17  Game Development / Newbie & Debugging Questions / Re: Unable to rotate a 2D triangular polygon via glRotatef(). on: 2014-01-04 13:49:37
1. Why is there another glTranslate right before glPopMatrix? this won't do anything cause glPopMatrix undos it.

2. If you set The Position of the Ship with a glTranslate why is there x and y coordinates in the glVertex2f methods? doesn't make sense to me
18  Games Center / Showcase / Escaping Cube on: 2014-01-02 20:07:09
Okay, so I made some small game inspired by this http://www.java-gaming.org/topics/iconified/30655/view.html and changed some stuff Cheesy

Overview of the Game:


You control the green cube (It moves towards your mouse) and your goal is to reach the yellow cube without touching the other cubes.
cubes with the same colour try to catch you in the same way, like red for example just moves towards you.
The white lines at the top show which level you currently are at and well, in each level there are more other cubes and up to four different types of them, making it difficult enough for a simple game I guess.
Have fun Cheesy

F12 for screenshots (If anyone wishes that option) Cheesy

Download: http://www.java-gaming.org/user-generated-content/members/196509/mg.jar
19  Games Center / Showcase / Re: F.T.W on: 2014-01-01 15:30:04
Nice game, simple but funny Cheesy

just how the hell did you get to 37?? my Record is 24 haha Cheesy

Edit: just got 46 Cheesy
20  Game Development / Game Mechanics / Re: Perlin Noise (Infinite) Biomes? on: 2013-12-23 19:23:10
Okay, But how will this work with infinit biomes?
21  Game Development / Game Mechanics / Perlin Noise (Infinite) Biomes? on: 2013-12-23 16:19:27
So I tryed to do something with 2D Perlin Noise (The generation is Infinite) and made some 1024x1024 Images to see how the Biomes and the height fits together.

Seed 1


Seed 2


Seed 3


The third one is quite ok inside the 1024x1024, but the other ones are a little messed up, i mean those small Biomes within a big one isn't what i want. The Biomes are generated by Using 2 Noise Maps (For Example Tempreture and Climate) and like when the values of both are above 0.5f it's red, etc. How do i get those Biomes to be "Smooth"?
22  Game Development / Performance Tuning / Re: Loading a large map in server on: 2013-11-26 17:14:08
On Server start: load nothing, Just when there's some clients connecting load the area arround them. Basically working like a Chunk system i guess
23  Games Center / WIP games, tools & toy projects / Re: Renoria - Java MMORPG on: 2013-11-21 16:51:12
I'm working with KryoNet and i guess i'm okay using the library the problem is more about Sets/List/HashMaps in Multithreading Cheesy ConcurrentModificationExceptions everywheeere Cheesy

will there be like pvp areas in your game? or is it just pve? Cheesy
24  Games Center / WIP games, tools & toy projects / Re: Renoria - Java MMORPG on: 2013-11-21 15:33:46
I wish i could do something working that good but i'm stuck in the Network code which keeps my program throwing Exceptions  Cry Art looks really nice, can't wait to test it Cheesy
25  Games Center / WIP games, tools & toy projects / Re: Renoria - Java MMORPG on: 2013-11-20 20:05:30
Haha okay Cheesy The game looks really nice, your networking stuff seems to work very good! impressive Cheesy
26  Game Development / Newbie & Debugging Questions / Re: Not sure how to approach handling player poisition w/ unit scale on: 2013-11-19 18:16:52
So the Player should exactly fits exactly below that Platform but doesn't go there because it's like floating for some 0.0...5? i usually use a Player Collision Box+ Image which is a bit smaller than the one of platforms cause that goes arround the issue Smiley
27  Games Center / WIP games, tools & toy projects / Re: Renoria - Java MMORPG on: 2013-11-19 18:05:10
Is it my Eyes or is the Character called "Jacky" floating above those crates? Cheesy
28  Game Development / Networking & Multiplayer / Re: Best practices for a multiplayer top-down shooter? on: 2013-11-18 19:04:51
When sending it 20 times per second it just depends on the ping how much ms it is delayed Smiley
29  Game Development / Networking & Multiplayer / Re: Best practices for a multiplayer top-down shooter? on: 2013-11-17 21:48:30
Well: Client interpolates but that's just for making it look nice, hitbox and stuff still stays on server so nobody can change things there Smiley interpolation is just for making it look better, not for making hitboxes precise or anything, that just happens on the server Cheesy Server -> Logic Stuff, everything that really is important; Client -> make everything look smooth etc., send inputs to server Cheesy
30  Game Development / Networking & Multiplayer / Re: Best practices for a multiplayer top-down shooter? on: 2013-11-17 15:10:31
  • 20 times per second would be ok i guess
  • interpolate the data you receive from the server
  • Complete logic needs to be performed on the server cause someone could easily build a mod for the client which allows some kind of cheating
Smiley
Pages: [1] 2 3
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (54 views)
2014-04-15 18:08:23

BurntPizza (53 views)
2014-04-15 03:46:01

UprightPath (66 views)
2014-04-14 17:39:50

UprightPath (49 views)
2014-04-14 17:35:47

Porlus (66 views)
2014-04-14 15:48:38

tom_mai78101 (90 views)
2014-04-10 04:04:31

BurntPizza (151 views)
2014-04-08 23:06:04

tom_mai78101 (246 views)
2014-04-05 13:34:39

trollwarrior1 (204 views)
2014-04-04 12:06:45

CJLetsGame (211 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!