Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (482)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (548)
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
1  Game Development / Newbie & Debugging Questions / Re: Having a Problem with ArrayLists and Objects on: 2014-07-20 23:47:29
Ohhhh! man.... I finally got it working right just to realize just how many factors go into making realistic water sim. I'm off a ways but getting closer.
2  Game Development / Newbie & Debugging Questions / Re: Having a Problem with ArrayLists and Objects on: 2014-07-20 18:43:57
Where are you clearing the fluidObjects before adding 8 new ones?

I changed the code since I don't really need to worry about the concurrency problems. This is the FluidHandler class and the method is called from a different class that has the whole worlds object and when its done doing this it adds them hen clears em. I'm not at home but I pretty sure I had it like this

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
public void update()
{
for(Objects obj: objects) // Had all the world objects
{
obj.update(); // Updates them
if(obj.isFluid) // If its a fluid its going into the flow method
{
fluidHandler.flow(obj, objects); // The method that I have shown
}

objects.add(fluidHandler.objects); // Adds the objects that were created from the flow method
fluidHandler.clear(); // And then they are cleared
}
3  Game Development / Newbie & Debugging Questions / Re: Having a Problem with ArrayLists and Objects on: 2014-07-20 16:38:14
I was really hoping that was gonna work but it still creates a ton of objects. I'm guessing it has something to do with how I have the objects set up cause I realized that none of the sprites for any of the water tiles, except for the starting one, are being drawn. I have the water class,, extend the fluids class, that extends the objects class. One thing I noticed is that j equals zero alot after the if statement making me thing its deleting all the objects as they decrease in the list. Stopped it by putting a if j != 0 but then it just creates a ton of objects again. Without the j != 0 no objects are created... what a headache.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
      objects.add(new Fluids(fluid.x - 1, fluid.y - 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      objects.add(new Fluids(fluid.x, fluid.y - 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      objects.add(new Fluids(fluid.x + 1, fluid.y - 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      objects.add(new Fluids(fluid.x - 1, fluid.y, fluid.z, fluid.id, (fluid.density / 2) / 8));
      objects.add(new Fluids(fluid.x + 1, fluid.y, fluid.z, fluid.id, (fluid.density / 2) / 8));
      objects.add(new Fluids(fluid.x - 1, fluid.y + 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      objects.add(new Fluids(fluid.x, fluid.y + 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      objects.add(new Fluids(fluid.x + 1, fluid.y + 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
     
      fluid.density = fluid.density - (fluid.density / 2);
     
      for(int i = 0; i < worldObjects.size(); i++)
         for(int j = objects.size() - 1; j >= 0; j--)
            if((objects.get(j).x == worldObjects.get(i).x && objects.get(j).y == worldObjects.get(i).y && objects.get(j).z == worldObjects.get(i).z) &&
                  (worldObjects.get(i).stopsFluid == true ||objects.get(j).id == worldObjects.get(i).id || objects.get(j).density < 5))
            {
                  objects.remove(j);
            }
4  Game Development / Newbie & Debugging Questions / Having a Problem with ArrayLists and Objects on: 2014-07-20 03:34:50
I have been trying to come up with a way to have a fluid spread out in a 2d top down game. I came up with several different ways but kept on running into concurrency issues and the biggest issue of it wanting to make a bazzillion water tiles over a 6 x 6 area. I have a room where the wall tiles are surrounding a 4 x 4 block of floor tiles which are represented in another z level. There is one water tile with a density of 100 that should spread out and diminish which is located on the same z level as the walls. The latest one I feel should work but still it ends up creating thousands of objects. What I'm doing here is just going ahead and adding the new water objects into the fluid objects array. Then getting the index of the ones that won't be moved to the bigger list, then removing them. I hate coming for help but I spent maybe 6 -10 hours setting up for fluids and probably 5 of it on the problem coming up with all kinds of ways of doing it. For some reason the integer array i's size is getting into the thousands for reason, I have no idea since i should be at max 8.

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  
   public void flow(Objects fluid, ArrayList<Objects> worldObjects)
   {
      fluidObjects.add(new Fluids(fluid.x - 1, fluid.y - 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      fluidObjects.add(new Fluids(fluid.x, fluid.y - 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      fluidObjects.add(new Fluids(fluid.x + 1, fluid.y - 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      fluidObjects.add(new Fluids(fluid.x - 1, fluid.y, fluid.z, fluid.id, (fluid.density / 2) / 8));
      fluidObjects.add(new Fluids(fluid.x + 1, fluid.y, fluid.z, fluid.id, (fluid.density / 2) / 8));
      fluidObjects.add(new Fluids(fluid.x - 1, fluid.y + 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      fluidObjects.add(new Fluids(fluid.x, fluid.y + 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
      fluidObjects.add(new Fluids(fluid.x + 1, fluid.y + 1, fluid.z, fluid.id, (fluid.density / 2) / 8));
     
      fluid.density = fluid.density - (fluid.density / 2);
     
      ArrayList<Integer> i = new ArrayList<Integer>();
     
      int count = 0;
     
      for(Objects obj: worldObjects) // Goes through all objects in  10 x 10 world
     {
         for(Objects fObj: fluidObjects) // 8 new water objects
        {
            if((fObj.x == obj.x && fObj.y == obj.y && fObj.z == obj.z) &&
               (obj.stopsFluid == true || fObj.id == obj.id || fObj.density < 5)) // Tests to see if any should be deleted do to, walls other water
           {
               i.add(count); // Adds the objects index into a integer array list for later
           }
            count++;
         }
     
      } count = 0;
     
      for(Integer j: i) // Goes through the integer index array list
     {  
         fluidObjects.remove(j); // Removes the fluid from the 8 that shouldn't be
     }
     
      i.clear(); // Clears the other int array list.
     
      objects.addAll(fluidObjects); // Adds the working fluids from the 8 to a list that gets stuck into the master list
     fluidObjects.clear(); // in the other class.
  }
5  Game Development / Newbie & Debugging Questions / Re: Slow FPS Problems on: 2014-07-18 15:00:35
I have the objects like floor tiles extend a objects class and the object class calls for a method that returns the string name of the tile. It is null in the constructor. I'm gonna do it a better way pretty soon once I can get to it. When it creates the tiles I'll just put a string in the constructor for it.

1  
add(new Floor(x,y, "floor")
6  Game Development / Newbie & Debugging Questions / Re: Slow FPS Problems on: 2014-07-18 14:21:47
I'm happy I checked task manager. I noticed that it was reloading the texture at every render for every sprite and changed it to load up once inside the render method with a boolean and it fixed it. Weird thing though it uses more memory and cpu on my better computer than my laptop. Desktop 4 cores at 4.5ghz, 8 gigs ram and a GeForce 670 and my laptop has 2 cores at 2ghz, 3 gigs ram, and a mobile ati 4100. From the task manager Desktop - CPU:25, Mem:80k and the Laptop CPU:6-10, Mem:41k. My desktop is 64bit and uses 64bit java so maybe that's it?
7  Game Development / Newbie & Debugging Questions / Re: Slow FPS Problems on: 2014-07-18 13:40:28
You use a SpriteBatch. Each "object" is handled as a Sprite. I've found nothing obvious that could hurt the performance but I'm not an expert of LibGDX and I use another backend (it shouldn't affect the framerate anyway).

I guess I'm gonna check how much time is each part is taking and maybe that could show me whats doing it. Also I opened task manager to and saw it gobbling up a massive amount of memory so I'm guessing that's probably going to be the problem.

rar file? Is this a 90s warz site?

Cut it down to the smallest example you can. We are not going to read your whole project.

Its the very start of the game. I wouldn't know where to begin to break it down into a example since it spans a game, world object handler and objects class, and the objects themselves. So I took down the file and I'll just keep on it myself.

8  Game Development / Newbie & Debugging Questions / Slow FPS Problems on: 2014-07-18 11:48:04
I started making a new game for the thousandth time and the biggest problem I have been having in each one is how slow they are running. I'm using libgdx so I can bring it to other platforms when I want to. I think it must be how I'm doing the levels. I'm just going to have a class for each level with 3 z levels represented by 3 2d arrays (you'll see). Later I'm going to change it to load from a file. If someone can just look over it and tell me if I'm doing something wrong that would help.
9  Game Development / Newbie & Debugging Questions / Re: Problems with Player Centering in Isometric Style Game on: 2014-04-01 00:44:04
Yeah you know what, I might have been making it more difficult than it needed to be. I do get how to translate it from map to screen, it was just trying to get it to stay centered in the middle of the screen and have the map move around him. It's actually an array of strings just for the background tiles such as grass and dirt rotated 45 degrees. Then, everything else such as trees will be loaded as objects from an array list. I'm gonna play around with it a some more since you got my head straightened out a little but could you give me an example of some more efficient data structures? I guess I could look it up as well.
10  Game Development / Newbie & Debugging Questions / Problems with Player Centering in Isometric Style Game on: 2014-03-30 16:18:38
OK, so I have the game working, and I'm drawing the isometric tiles to the screen alright, but now I can't figure out how to keep my character in the center tile of the screen.  

This kind of shows how the map would be rendered if not for the if statement limiting it to the red window.


So I guess like I said I can't figure out how to render the tiles around the player from the map array and have the player centered. Doing that in a regular tile game was easy.

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 void render(Graphics g)
   {
      g.setColor(Color.DARK_GRAY);
      g.fillRect(0, 0, windowWidth, windowHeight);
     
      for(int y = -(windowHeight / tile.height); y <  (windowHeight / tile.height) + 2; y++) // I have no idea of how I got the math for the x and y for loops but it works so far
     {
         for(int x = -tile.width; x < (windowWidth / tile.width) * 4; x++)
         {


            if(((x - y) * (tile.width / 2)) > (0 - tile.width) //This makes it only render the tiles that fit in the window
                 && ((x + y) * (tile.height/2)) > (0 - tile.height)
                  && ((x - y) * (tile.width / 2)) < windowWidth
                  && ((x + y) * (tile.height/2)) < windowHeight)

            {
               temp = new ImageIcon("sprites/Tiles/" + map[(keyCursorX + mapX) + 10][(keyCursorY + mapY) + 10] + ".PNG").getImage(); //The map is actually a array of strings for now but I might change it soon.

               g.drawImage(temp, ((x - y) * (tile.width / 2)), ((x + y) * (tile.height/2)), null); // Draws the sprite onto the canvas
                 
                  if(keyCursorX == x && keyCursorY == y)
                  {
                     g.drawImage(tileHighlight, ((x - y) * (tile.width / 2)), ((x + y) * (tile.height/2)), null); // This is actually want to be centered around
                 }
                 
                  for(GameObjects go : objects) // Extra objects...
                 {
                     if(x == go.x && y == go.y)
                     {
                        g.drawImage(go.sprite, ((x - y) * (tile.width / 2)), ((x + y) * (tile.height / 2)) - (go.sprite.getHeight(null) - (tile.height / 2)), null);
                     }
                     
                  }
            }
            mapX++;
         }
         mapX = 0;
         mapY++;
      }
      mapX = 0;
      mapY = 0;
   }


How I have it right now is just the character is represented as a green highlight around the tile. This has actually bothered me for over a week and I'm about to give up and go back to regular tiles. Any help would be appreciated.
11  Game Development / Game Play & Game Design / Re: Just something to think about while you go about your lives. on: 2013-12-21 20:22:30
I loved all the breaks you could do in Halo 2 (never tried the first). I found my own way out of several levels and it was so fun doing it. Games could be a little more fun if they didn't make them completely bullet proof but they have to be unintentional.... damn invisawalls and death berriers
12  Discussions / Miscellaneous Topics / Re: Starbound on: 2013-12-19 22:59:22
Great game that's for sure, especially after getting friends involved.
13  Game Development / Newbie & Debugging Questions / Trying to Simplify the Addition of New Objects to a Game on: 2013-12-19 02:50:41
I am thinking of restarting a game I was working on and I wanted it to be very easy to add new objects into the game without having to get into my code every time. In games with alot of tiles for the same kind of object how do people generally handle it? I was thinking if I had say a wall class, it would read from a txt file containing its name, location and other important attributes/rules.

For instance something like this for a water class.

water.txt

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
Name = "pond_tile"

Location = "forest" + "town"

Animate = "false"

Sprite = "pond_tile.png"
///////////////////////////////////////////////

Name = "river_tile"

Location = "forest" + "jungle" + "town" + "desert"

Animate = "true"

Sprite = "river_tile.png"


I think I want to get the core game out of the way and have just one type of tile for each class at the beginning. After the games how I want it I could pump out loads of tile types and biomes this way. Another benefit would be the ease of modding a game with a set up like this which I'd love to support. I was just thinking of ideas and kind of remember a game might have used something similar.... minecraft? A couple questions I have are "Is there better ways to do this?", "Any downsides?", "Have any of you used something similar", and "How did it work out for you?". Pretty broad topic, maybe could have been in Game Play and Design but am looking forward to any input.
14  Game Development / Game Play & Game Design / Re: Just something to think about while you go about your lives. on: 2013-12-19 01:52:28
Having something or someone that a player can grow attached to is probably one of the best ways.

Fallout 3
That option to go into the chamber instead of the girl in Fallout 3. I instantly sacrificed myself without a second thought and the game ended on me haha.

Dark Souls
The conclusion to Solaire's quest to find his sun if you didn't take the shortcut. That was probably one of the most painful especially since it was my first play through.

Also AC: Black Flag.
When you meet the merchant dude in the very beginning I was like this dude is gonna be my new best friend and was pissed when I didn't get a option to get his sugar.

I kind of play games by doing what I'd feel like I'd do in that situation, and do grow attached to alot of characters in games both intentional and unintentional characters. But at the same time I watched my siblings play games and they just kill everyone and what not so I can't say for sure if it can cause most people to turn away from an end to the game.
15  Discussions / General Discussions / Re: Running Jar with Unknown Publisher Blocked in Future Java Release on: 2013-10-18 03:03:52
I loved java but I think I'm done with it unfortunately. If java ever gets they're stuff together maybe I will possibly come back to it.
16  Game Development / Newbie & Debugging Questions / Re: Having Problems With The Key Listener on: 2013-09-20 01:36:20
Sweet thanks a lot seems like something I should have noticed...
17  Game Development / Newbie & Debugging Questions / Re: Having Problems With The Key Listener on: 2013-09-20 01:15:34
I was letting it bake in a little Wink. I'm just trying to move the the character and I have done it several different ways. Even had the keylistener in the player class with the code in the keypressed method and it still wasn't working. I'm just lost I don't really see much difference between the other games I was doing.
18  Game Development / Newbie & Debugging Questions / Having Problems With The Key Listener on: 2013-09-19 23:29:46
Man I spent hours scratching my head on this one. I have never had a problem with input before but I am kinda changing things up a little. Man I can't wait to stop letting myself get these irritating errors.

This is where I added it to the canvas.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
public Main()
   {
      initGame();
     
      JFrame frame = new JFrame(gameMain.getName());
      frame.setIconImage(gameMain.setLogo());
      Canvas canvas = new Canvas();
      canvas.setPreferredSize(gameMain.getScreenSize());
     
      InputListener input = new InputListener();
      canvas.addKeyListener(input);
      canvas.addMouseListener(input);
     
      frame.add(canvas);
      frame.pack();
      frame.setVisible(true);
      canvas.setVisible(true);
      canvas.requestFocus();
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     
      canvas.createBufferStrategy(2);
      buffer = canvas.getBufferStrategy();
   }


This is the simple code to move in my player class and I did import the inputlistener.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
   
public void input()
   {
      InputListener input = new InputListener();

      if(input.getKey() == "w")
         dir(0,-1);  
      if(input.getKey() == "a")
         dir(0,1);
      if(input.getKey() == "s")
         dir(-1,0);
      if(input.getKey() == "d")
         dir(1,0);
   }


Here is the InputListener 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  
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  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
114  
115  
116  
117  
118  
119  
120  
121  
122  
123  
124  
125  
126  
127  
128  
129  
130  
131  
132  
package com.base.engine;

import java.awt.Dimension;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.MouseMotionListener;

public class InputListener implements KeyListener, MouseListener, MouseMotionListener
{
   Dimension mousePos;
   boolean clicked = false;
   boolean keyDown;
   boolean keyUp;
   String key;
   String tempKey;
   

   public Dimension mouseLoc()
   {
      return mousePos;
   }

   public void mouseMoved(MouseEvent e)
   {
      mousePos = new Dimension(e.getX(), e.getY());
   }

   public void mousePressed(MouseEvent e)
   {
      clicked = true;
   }

   public void mouseReleased(MouseEvent e)
   {
      clicked = false;
   }

   public void keyPressed(KeyEvent e)
   {
      keys(e.getKeyCode());
      keyDown = true;
   }

   public void keyReleased(KeyEvent e)
   {
      keyDown = false;
   }

   public void keyTyped(KeyEvent e)
   {

   }
   
   public void keys(int i)
   {
      if(i == KeyEvent.VK_A)
         key = "a";
      if(i == KeyEvent.VK_B)
         key = "b";
      if(i == KeyEvent.VK_C)
         key = "c";
      if(i == KeyEvent.VK_D)
         key = "d";
      if(i == KeyEvent.VK_E)
         key = "e";
      if(i == KeyEvent.VK_F)
         key = "f";
      if(i == KeyEvent.VK_G)
         key = "g";
      if(i == KeyEvent.VK_H)
         key = "h";
      if(i == KeyEvent.VK_I)
         key = "i";
      if(i == KeyEvent.VK_J)
         key = "j";
      if(i == KeyEvent.VK_K)
         key = "k";
      if(i == KeyEvent.VK_L)
         key = "l";
      if(i == KeyEvent.VK_M)
         key = "m";
      if(i == KeyEvent.VK_N)
         key = "n";
      if(i == KeyEvent.VK_O)
         key = "o";
      if(i == KeyEvent.VK_P)
         key = "p";
      if(i == KeyEvent.VK_Q)
         key = "q";
      if(i == KeyEvent.VK_R)
         key = "r";
      if(i == KeyEvent.VK_S)
         key = "s";
      if(i == KeyEvent.VK_T)
         key = "t";
      if(i == KeyEvent.VK_U)
         key = "u";
      if(i == KeyEvent.VK_V)
         key = "v";
      if(i == KeyEvent.VK_W)
         key = "w";
      if(i == KeyEvent.VK_X)
         key = "x";
      if(i == KeyEvent.VK_Y)
         key = "y";
      if(i == KeyEvent.VK_Z)
         key = "z";
   }
   
   
   public String getKey()
   {
     
      return key;
   }
   
   public boolean getKeyPress()
   {
      return keyDown;
   }

   @Override
   public void mouseDragged(MouseEvent e) {}
   @Override
   public void mouseClicked(MouseEvent e) {}
   @Override
   public void mouseEntered(MouseEvent e) {}
   @Override
   public void mouseExited(MouseEvent e) {}
}
19  Games Center / WIP games, tools & toy projects / Re: LodeScape RPG on: 2013-09-19 22:53:39
....you were drunk when you wrote that? ahaha

Yeah it happens sometimes.
20  Games Center / WIP games, tools & toy projects / Re: LodeScape RPG on: 2013-09-19 01:02:09
Oh man I have a bad habit of drinkin and goin on the forums persecutioncomplex it would be pretty cool if it helps out some. Haha I did get a medal out of it and it does seem like I was making sense enough. Also like I said if I actually get some time to myself I could start brainstorming ideas for your game.
21  Java Game APIs & Engines / OpenGL Development / Re: Problem Setting Up on: 2013-09-18 21:25:42
Alright well thanks guys for replying I finally found out what is going on with the drivers. There is something wrong with the latest catalyst drivers for some of these older cards. I got a 2012 version of catalyst control center and it cleared things up. Also for now I'm just gonna leave everything how he shows it. I don't really care much I just want to learn ideas on how to do rpgs along with using lwjgl other than me just bashing away at it on my own.
22  Java Game APIs & Engines / OpenGL Development / Re: Problem Setting Up on: 2013-09-18 21:11:05
Its from a tutorial so I don't really know. I have never even used java the way he does. He mad like 3 packages and several classes. He did kinda make the game engine separate though so I don't know.

http://www.youtube.com/watch?v=1eeWo9AVP_4
23  Java Game APIs & Engines / OpenGL Development / Re: Problem Setting Up on: 2013-09-18 20:48:17
Yes, actually I just tried to play another game that uses lwjgl and got the same error in the console.

My laptop has an ati radeon 4100m and I am having a hard time finding a driver for it. Toshiba only has a 2010 driver for my L505d - S5985.
24  Java Game APIs & Engines / OpenGL Development / Problem Setting Up on: 2013-09-18 20:32:09
Hi, I just started using LWJGL with eclipse recently and had no problem setting it up on my main computer but for some reason it is not working on my laptop. It's the same project and everything the only difference I could think of is my main computer is 64bit and my laptop is 32bit, not that I think it would make a difference. I installed LWJGL into my java folder in program files and added the library for the project including the natives so I am at a complete loss. Then I was like hey I'll just get all the stuff to make android games on my laptop and make java games on my other pc and that crap isn't working right either.... just my luck.

This is the compilation error.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
Sep 18, 2013 4:22:27 PM com.base.engine.Main initDisplay
SEVERE: null
org.lwjgl.LWJGLException: Pixel format not accelerated
   at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method)
   at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52)
   at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:252)
   at org.lwjgl.opengl.Display.createWindow(Display.java:306)
   at org.lwjgl.opengl.Display.create(Display.java:848)
   at org.lwjgl.opengl.Display.create(Display.java:757)
   at org.lwjgl.opengl.Display.create(Display.java:739)
   at com.webs.burningtreegames.engine.Main.initDisplay(Main.java:83)
   at com.webs.burningtreegames.engine.Main.main(Main.java:22)

Exception in thread "main" java.lang.RuntimeException: No OpenGL context found in the current thread.
   at org.lwjgl.opengl.GLContext.getCapabilities(GLContext.java:124)
   at org.lwjgl.opengl.GL11.glMatrixMode(GL11.java:2073)
   at com.webs.burningtreegames.engine.Main.initGL(Main.java:68)
   at com.webs.burningtreegames.engine.Main.main(Main.java:23)


Throw in the main class from the tutorial I'm doing and like I said its the same as on my gaming pc.

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  
package com.base.engine;

import java.util.logging.Level;
import java.util.logging.Logger;

import org.lwjgl.LWJGLException;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;

import com.base.game.GameMain;

import static org.lwjgl.opengl.GL11.*;

public class Main
{

   private static GameMain gameMain;
   
   public static void main(String[] Args)
   {
      initDisplay();
      initGL();
      initGame();
     
      gameLoop();
      cleanUp();
   }
   
   private static void initGame()
   {
      gameMain = new GameMain();
   }
   
   private static void gameLoop()
   {
      while(!Display.isCloseRequested())
      {
         getInput();
         update();
         render();
      }
   }
   
   private static void getInput()
   {
      gameMain.getInput();
   }

   private static void update()
   {
      gameMain.update();
   }
   
   private static void render()
   {
      glClear(GL_COLOR_BUFFER_BIT);
      glLoadIdentity();
     
      gameMain.render();
     
      Display.update();
      Display.sync(60);
   }
   
   private static void initGL()
   {
      glMatrixMode(GL_PROJECTION);
      glLoadIdentity();
      glOrtho(0,Display.getWidth(),0,Display.getHeight(),-1,1);
      glMatrixMode(GL_MODELVIEW);
     
      glDisable(GL_DEPTH_TEST);
     
      glClearColor(0,0,0,0);
   }
   
   public static void initDisplay()
   {
     
      try {
         Display.setDisplayMode(new DisplayMode(800,600));
         Display.create();
         Keyboard.create();
         Display.setVSyncEnabled(true);
      } catch (LWJGLException e)
      {
         Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, e);
      }
   }
   
   private static void cleanUp()
   {
      Display.destroy();
      Keyboard.destroy();
   }
}
25  Games Center / WIP games, tools & toy projects / Re: LodeScape RPG on: 2013-09-10 03:55:05
I was checking up to see how your game was going and saw that you may need a little help. I feel you on how you are having problems finishing your game (I don't think I completed a single full featured game). You may have heard some of this stuff before but maybe something might help.

Your problem seems to be coming up with ideas and less on implementation. I have it the other way around which results to frustration on not being able to implement my ideas. I will think about coming up with a story but I'd like at least some idea of what you'd like. Something I would recommend is to keep a notebook or a small journal with you to write down ideas. Simple, stupid, and it every one stresses this even for all types of hobbies n stuff, but it does work and will hopefully help. You said you are not a big gamer but if you watch tv shows, movies or do play that occasional game think of what you like about it. Is it the story, atmosphere, weapons, customization, gameplay, tactics and what not. What genre do you enjoy? Do you like action for more intense play, comedy bringing a lighter side to the game, horror with demons and zombies and stuff, or even romance. Try breaking down the plot into a simple form of whats going on. Keep that notebook near your bed and make sure you have a pen so your not trudging through your house looking for one when you got that aha moment before you fell asleep.

Just think of how many shows and games use these same ingredients over and over again. \/\/\/

Mario = Fight your way to save the princess

Die Hard = Fight your way to defeat the main antagonist

Clue = Find out who committed the crime with the evidence you gather

One of my all time moments was going into vaults for the first time in fallout 3. Figuring out what has happened to a environment where its inhabitants are missing or changed in some ways is what really got me. Particularly that one that was an experiment to test the inhabitants reactions being givin psychedelics without them knowing and finding out what happens to when the vaults order of power starts breaking down and everyone starts going insane. Man, seeing the hallucinations and realizing its effecting you too was one of my all time favorites in a game. Another one at the top would be vault 11 in New Vegas (wont spoil since its the latest one and is really good) particularly the super vague conclusion of the whole vault which may have gone under the radar and you'd never have a second thought. If you never plan on playing I suggest looking that one up. I spent hours looking all over when I found out  Smiley.

Writing a story about something you like is important because you are going to be the one spending your time building the game around it and spending a whole lot of time play testing. Even if someone hands you a story for your game and you use it just because its all you got. Do you want to spend all that time and frustration going into something you don't care much about. Another thing is to build up excitement (even if it is faked) whenever you can to help you push forward to finish. Try and make writing dialog for all those npcs a big triumph or better yet make even creating one have that same feeling. Showing family, friends, and even people on random forums  Roll Eyes will help you keep from dropping everything. Also while your at it ask them what they think and ask if there is anything they think should be in the game or what kinda of stuff they like in general. Also I am one of those guys that will say not try to do something new until you get several games under your belt especially when it comes to games with alot of substance like rpgs, it'll break you like me and so many others. Another thing is to try keeping away from the idea of minecraft cause a game like that is hard to get right since it is almost solely based on crafting and it is up to the player to get the fun out of it. Also I feel that unless it continually gets updates or has multiplayer it gets old pretty quick.

Like I said if I come up with an idea I'll let you know if you are still working on it. I have/ had the hardest time finishing games and coming up with ideas which lead me to reading up alot on it. So hopefully you got something useful out of all this also don't give up the game looks great so don't let this one go man.
26  Game Development / Newbie & Debugging Questions / Re: Errors Using the Diamond Square Algorithm on: 2013-08-03 23:10:49
I probably will end up using it at some point its just a little beyond me at the moment.
27  Game Development / Newbie & Debugging Questions / Errors Using the Diamond Square Algorithm on: 2013-08-03 22:35:30
Hello, I have been working on making random maps and am having a problem with my code. I decided to put the diamond step in a try and catch so if its doing a point next to the edge it will switch to doing 3 known points. Its not working for some reason and I'm not grasping why. Its when I use map[x - midX][y] thats the problem. If I take out the try catch and just use all the alternative ones it works but has some artifacts. I got some code and pictures. Also I wonder why the stupid thing only has water coming from the left in every one I open. Any help will be much appreciated.

http://pastebin.java-gaming.org/d3d42676f69

This what it looks like using 3 points


What happens when I add a fourth
28  Discussions / General Discussions / Re: XBox One on: 2013-05-25 22:39:24
Man I hope we don't need to be logged into the net to use it that would be terrible. Screw it I'm just sticking with my computer... running windows 7 uhhh.

we need more run and gun FPSes like Doom. Also I wish they hadn't canceled Star Wars BattleFront III. it promised to be good.
OMG was that gonna happen at some point, man I loved those games. I Just checked out the gameplay for that and oh man I would of bought that right away.
29  Games Center / WIP games, tools & toy projects / Re: LodeScape RPG on: 2013-05-25 21:13:20
Cool sounds like you got quite a thing, can't wait to see more. Are those your own sprites or did you barrow them? If they're not, don't worry about it until later I was just curious. Haha, I swear I spent a week making a tileset that I'm not even gonna use yet because I'm having mixed feeling about it being a ASCII game or not. I can't wait to get mine where its presentable, right now I'm kinda struggling getting the core of the game where I want it to be. Redid the engine like 3 or 4 times and now I might redo it again (uhh) its because I kinda want to use the same engine for multiple different game types.
30  Games Center / WIP games, tools & toy projects / Re: LodeScape RPG on: 2013-05-25 13:06:41
Looks really good. Are you gonna be keeping the farming, mining and all that?
Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38

BurntPizza (67 views)
2014-08-03 02:57:17
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

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!