Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
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 ... 13
1  Discussions / General Discussions / Java file randomly wiped? on: 2014-07-01 08:12:37
so I had been working on a single java file for a while , saved it each time. today I look on (no prior issues at all) the entire file is wiped with no data in source along with all compiled files deleted.
2  Game Development / Newbie & Debugging Questions / Re: Sin and asine confusion on: 2014-06-27 18:09:46
yer dont wory , my calculator is being a bit dodgy at the moment it gives me very odd numbers.
3  Game Development / Newbie & Debugging Questions / Sin and asine confusion on: 2014-06-27 17:52:56
So I was always taught that in maths asin(sin(5)) = 5 in degrees however in java its done in radians , this is causing me major issues because I am attempt to sin the asin something dont worry for what reason I just want to know how I would do it so that I can use it.
4  Discussions / Miscellaneous Topics / ss13 on: 2014-05-29 02:48:58
SS13 , it is not your average game , it may have a shit interface, graphics and just about everything else. but maybe thats what makes it fun . Such a diverse community of clowns, mimes , roleplayers, erps and everything else.
There are many ss13 server , facepunch , yogstation , liberty station and the new nox station. Come give it a go , you will have to download possibly the shittest games client ever! BYOND , go into the SS13 section and join one of the server , it will take a while to get used to but you will find it enjoyable. Its an unrecognised wander.
http://www.byond.com/games/Exadv1/SpaceStation13
5  Discussions / Miscellaneous Topics / Re: To the Minecraft Modders on: 2014-05-27 20:11:17
The old modding was a lot easier , modloader was just so much easier to use because everything was labelled. I gave it a go aswell but I was just put off because everyone uses forge, forge doesnt like normal functions.
6  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 22:14:16
Well the issue is , the object is created , it has a buffer with the vertid and texid so there should be no error.
7  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 22:04:58
1  
2  
3  
GL15.glDeleteBuffers(vertid);
      GL15.glDeleteBuffers(texid);
      shader.dispose();

is causing the error. is there anyway to check if there is opengl data in the thread?
8  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 21:59:32
Ok I have found out whats causing the error, I am somehow calling a core.kill() its causing an error because it was deleting something that wasnt there. It was an array indexing problem somehow , disguised as an odd thing.
9  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 21:51:16
the question is how do I solve it
10  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 21:03:00
everything I us is created after create the display
11  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 20:51:00
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
12  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 20:15:53
well gamecore the display clear. when I disabled the Game class the errors stopped meaning it is coming from there.
13  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 19:59:47
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  
public class Game {//handles the entire game loading of major events , Gamecore will be a render function and tick updater does not include objects
  private Gamecore core;
   private World world;
   private GUI screen;
   private GUI loading;
   private int[] buttons = new int[200];
   private GUI options;//unused
 
   public Game(Gamecore core){
      this.core = core;
      this.world = core.world;
      core.logger.log("Game event handler loaded");
   //   init();
  //   setuploading();
  }
   private void init(){
      for(int i = 0; i < buttons.length;i++){
         buttons[i] = -2;
      }
      //loading = new GUI((int)core.width,(int)core.height,core);
     //screen = new GUI((int)core.width,(int)core.height,core);
  }
   private void setuploading(){
      buttons[0] = loading.addButton(-20, -20, "Play");
      buttons[1] = loading.addButton(-20,10,"Options");
      buttons[2] = loading.addButton(-20, 40, "Exit");
   }
   private void setupscreen(){
     
   }
   public void play(){
     
   }
   public void options(){
     
   }
   public void exit(){
      core.kill();
   }
   public void render(){
   //   loading.render();
  }
   public void tick(){
      if(loading.getbutton(buttons[0]).checkpress()){
         play();
      }
      if(loading.getbutton(buttons[1]).checkpress()){
         options();
      }
      if(loading.getbutton(buttons[2]).checkpress()){
         exit();
      }
   }
   public void destroy(){//used for cancelling events only. Object deletion occurs in map.
     
   }
   

}

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  
package com.Core.graphics.GUI;

import com.Core.Gamecore;
import com.Core.graphics.GB;
import com.Core.graphics.vertex2d;

public class Button {//Mostly complete
  private vertex2d position,aposition;
   private int type;
   private GB graphicsp,graphicsd,textinf;
   private boolean pressed;
   private String text;
   private int pos;
   private text t;
   private Gamecore core;
   public Button(Gamecore core,int x, int y,String text, int type,int pos){
      position = new vertex2d(x,y);
      aposition = new vertex2d((core.width/2) + x,(core.height/2)+y);
      this.text = text;
      this.type = type;
      pressed = false;
      this.core = core;
      this.pos = pos;
      graphicsp = new GB(core);
      graphicsd = new GB(core);
      graphicsd.createobject(core.world.shape.rect(core.button.getcoords(0, 0, 143, 28), 143, 28), core.button.gettexture(),1);
      graphicsp.createobject(core.world.shape.rect(core.button.getcoords(0, 30, 143, 58), 143, 28), core.button.gettexture(),1);
      graphicsd.translate(x, y);
      graphicsp.translate(x,y);
      t = new text(core);
      textinf = t.getfontbatch(text);
     
   }
   public vertex2d getposition(){
      return position;
   }
   public void setposition(vertex2d vert){
      position = vert;
   }
   public void press(){
      if(type == 0){
         pressed = true;
      }
      if(type == 1){
         if(pressed){
            pressed = false;
            return;
         }
         else{
            pressed = true;
            return;
         }
      }
   }
   public void unpress(){//only use on non toggle butons
     pressed = false;
   }
   public boolean checkpress(){
      if(core.mx>= aposition.getx() && core.mx <= aposition.getx() +128){
         if(core.my >= aposition.gety() && core.my <= aposition.gety() + 26){
           
               press();
               return true;
           
         }
      }
      unpress();
      return false;
   }
   public void render(){
      if(!pressed){
         graphicsd.render();
      }
      else{
         graphicsp.render();
         
      }
      textinf.render();
   }
   
   public int getpos(){//returns stored array position if defined
     return pos;
   }
   public void destroy(){
      graphicsp.destroy();
      graphicsd.destroy();
      textinf.destroy();
   }
}


Error is somewhere in there , I have no clue what is causing it . its all in one thread, I create the display before anything else.
14  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 19:36:03
Display is creatd within init, I call clear at the beggining of each render(after the last render)
15  Game Development / Newbie & Debugging Questions / Re: really confused with an error on: 2014-05-25 18:58:44
Its not run in a seperate thread, I create two VBOS for each image state(I know)  , here is the code I use for cycling . The error occurs when I call :GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
16  Game Development / Newbie & Debugging Questions / really confused with an error on: 2014-05-25 18:20:47
Hi , this error has only just started appearing in my code:
1  
2  
3  
4  
5  
6  
7  
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.glClear(GL11.java:585)
   at com.Core.Gamecore.render(Gamecore.java:171)
   at com.Core.Gamecore.start(Gamecore.java:118)
   at com.Core.Gamecore.<init>(Gamecore.java:42)
   at com.Core.Gamecore.main(Gamecore.java:46)


The class that is causing the issue is this one: please dont comment on how efficient it is.
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  
public class Button {//Mostly complete
  private vertex2d position,aposition;
   private int type;
   private GB graphicsp,graphicsd,textinf;
   private boolean pressed;
   private String text;
   private int pos;
   private text t;
   private Gamecore core;
   public Button(Gamecore core,int x, int y,String text, int type,int pos){
      position = new vertex2d(x,y);
      aposition = new vertex2d((core.width/2) + x,(core.height/2)+y);
      this.text = text;
      this.type = type;
      pressed = false;
      this.core = core;
      this.pos = pos;
      graphicsp = new GB(core);
      graphicsd = new GB(core);
      graphicsd.createobject(core.world.shape.rect(core.button.getcoords(0, 0, 143, 28), 143, 28), core.button.gettexture(),1);
      graphicsp.createobject(core.world.shape.rect(core.button.getcoords(0, 30, 143, 58), 143, 28), core.button.gettexture(),1);
      graphicsd.translate(x, y);
      graphicsp.translate(x,y);
      t = new text(core);
      textinf = t.getfontbatch(text);
     
   }
   public vertex2d getposition(){
      return position;
   }
   public void setposition(vertex2d vert){
      position = vert;
   }
   public void press(){
      if(type == 0){
         pressed = true;
      }
      if(type == 1){
         if(pressed){
            pressed = false;
            return;
         }
         else{
            pressed = true;
            return;
         }
      }
   }
   public void unpress(){//only use on non toggle butons
     pressed = false;
   }
   public boolean checkpress(){
      //if(core.mx>= aposition.getx() && core.mx <= aposition.getx() +128){
        //if(core.my >= aposition.gety() && core.my <= aposition.gety() + 26){
           
               //press();
              return true;
           
      //   }
     //}
     //unpress();
     //return false;
  }
   public void render(){
      if(!pressed){
         graphicsd.render();
      }
      else{
         graphicsp.render();
         
      }
      textinf.render();
   }
   
   public int getpos(){//returns stored array position if defined
     return pos;
   }
   public void destroy(){
      graphicsp.destroy();
      graphicsd.destroy();
      textinf.destroy();
   }
}
17  Game Development / Performance Tuning / Re: Cache locality and LibStruct - fixing Java's horrible memory layout on: 2014-05-20 23:01:10
I get a little bit of it however he is "number dumping" a lot.
18  Games Center / WIP games, tools & toy projects / Re: SOLIS on: 2014-04-22 00:17:48
GUI code is almost complete and will finish work on it in the morning, this includes programming:
text former
text renderer;
flowbuffer (creates a vbo that is continually added to in increments)
Buttons
Gui itself

I will also be adding in the world code which was half finished , for this I need to finish setting up the camera and input .
19  Game Development / Newbie & Debugging Questions / Re: texture loading issue on: 2014-04-21 22:25:55
quick question , if I batch a group of objects and I pass in three attributes , verticies, texture, relative transformations. can I modify the transformations vbo using buffersubdata?
20  Discussions / Miscellaneous Topics / Re: Is our Universe Simulatable? on: 2014-04-21 22:18:27
if you mean chemical potential energy then its non existant , its the chance of something happening not any force that is currently exisiting and if it is string theory were talking about here the second a reaction occurs you have the chemical potential energy "released" when its not acctually doing anything as it already gained the energy state from performing work.

Well, if you want to be pedantic and fun at parties, you could say that most of what we say happens in regards to physics and similar subjects "doesn't exist" because it's all just theories. Example: fields (electric, magnetic, etc) don't exist, we have never and don't know how to prove their existence. But they are the current best model that seems to work for our universe.

And now this thread has gone full circle.
Well theorys in a dictionary definition are ideas with support evidence. They are proven to functions , fields yes we cannot prove the particles that go through them however we know they are there , what I am describing is a potential for something to happen which is basically "The energy it could release" it doesnt directly describe the reaction or energy state of the specific medium. Fields are ... complicated they incooperate multiple theorys and change depending on which model you describe them with , the most accepted version suggest they are made up of virtual particles that are only in existence for the purpose of generating the feild and therefore cannot be detected externally . You can think of them as existant but when you attempt to access them you dont get anything returned.
for example
1  
2  
3  
4  
5  
6  
7  
public class virtualphoton{

public void getparticle(){
    return null; //<------
}

}


There are other examples of this , famously the double slit experiment in which electrons were proven to be able to switch between the state of a particle and a wave ( which is suggested because they do not have a defined size). When observed however the result given was not as expected. heisenberg uncertainty principle yet another example.
21  Discussions / Miscellaneous Topics / Re: Is our Universe Simulatable? on: 2014-04-21 20:55:21
bouncing against eachother

Wrooooooooong! Grin
They don't actually get in contact with each other Tongue

* Philipp runs!

Maybe offtopic, but would you agree that any kind of energy is also a kind of movement, so energy is movement?

I don't think so. Is chemical energy movement? It's just tension between two particles, keeping them from getting apart from each other. I don't see any movment with a simple uranium atom. It's chemical energy is used in nuclear reactors.

if you mean chemical potential energy then its non existant , its the chance of something happening not any force that is currently exisiting and if it is string theory were talking about here the second a reaction occurs you have the chemical potential energy "released" when its not acctually doing anything as it already gained the energy state from performing work.
22  Discussions / Miscellaneous Topics / Re: Is our Universe Simulatable? on: 2014-04-21 20:04:32
I dont think you fully understand what quantum computing does , quantum computing does not give you more memory it just allows you to perform a specific function (similar to for functions) very quickly and output a single result. It does not make standard processing any faster and doesnt support more memory. Quantum entanglement technically reduces the amount of memory avaliable because you are binding one particle to another making them "the same" of course in a very stretched out term.
One problem about computing is that light is to slow and makes a cpu too hot. quantum entanglement would remedy that.
More memory is not needed imho.
If you build a death star sized object in space, with the technology we are going to have in 3000 years,considering 64gb micro SD so exist today, its a number so high I dont even wanna think about it
you still are not getting it quantum computing is using quantum entanglement , light is how all matter communicates and is the maximum speed (in non virtual particles). you physically cannot go faster than it without going really deep into horrifically complicated quantum physics. , just to point out aswell light is heat. you cannot perform any function other than data transfer with quantum entanglement, its useful for interstella transmission but is basically useless performing functions faster than standard electronics.
23  Games Center / WIP games, tools & toy projects / SOLIS on: 2014-04-21 19:56:46

This is a game im currently working on , it is using lwjgl mainly the opengl features . This game is designed to be a spacestation and space ship building and battling game.
some features that will be in the game when its finished.
Science and research
fully functional mining and resource system
battle system
drones
external ships and space exploration
multiplayer(dont expect this for a loooooooooooooooooooooooooooong time)
Crew management
Powernet
atmosphearics built in
fully functional render and input system

Possible features:
planetary exploration
food system
capacitor based weapons
other races (quite likely)

indecisive features:
clans and guilds?
possibly 3d parts?
Controlling through an ai or through a player.

Current features:
renderer
input system
basic framework

I will be posting constant updates and will gladly take suggestions from you guys.
24  Game Development / Newbie & Debugging Questions / Re: texture loading issue on: 2014-04-21 18:51:42
ok thanks , ill write that into my render method.
25  Discussions / Miscellaneous Topics / Re: Is our Universe Simulatable? on: 2014-04-21 18:34:54
I dont think you fully understand what quantum computing does , quantum computing does not give you more memory it just allows you to perform a specific function (similar to for functions) very quickly and output a single result. It does not make standard processing any faster and doesnt support more memory. Quantum entanglement technically reduces the amount of memory avaliable because you are binding one particle to another making them "the same" of course in a very stretched out term.
26  Game Development / Newbie & Debugging Questions / Re: texture loading issue on: 2014-04-21 18:29:45
but what im doing is binding it to a texture unit then rendering it within the shader.
27  Discussions / Miscellaneous Topics / Re: Is our Universe Simulatable? on: 2014-04-21 18:07:18
to store and simulate exactly you would require more than one particle of memory per particle infact to simulate one particle to the exact specification of the universe you would require a large processing power and at minimum a megabyte of memory
28  Game Development / Newbie & Debugging Questions / Re: texture loading issue on: 2014-04-21 17:47:41
Textures doesn't get bound to VBOs, they are completely different (unless you use a Texture Buffer Object), they bind to the global state.
so if I initizalise the bind externally then bind my other object it should work.
29  Game Development / Newbie & Debugging Questions / Re: texture loading issue on: 2014-04-21 17:39:01
well currently for testing im using single VBOS per object , so I bind per texture. here is the code that I use to bind my texture.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
//game init
GL11.glMatrixMode(GL11.GL_PROJECTION);
      GL11.glLoadIdentity();
      GL11.glOrtho(0, (int) width, 0, (int) height, 1, -1);
      GL11.glMatrixMode(GL11.GL_MODELVIEW);
      verticalaspect = (float) (height / width);
      world = new World(this,128,128);//first spritesheet (the one drawn) is initialized in here
     icon = new GB(this);
      spritesheet iconsheet = new spritesheet("com/Core/graphics/texture/sprites/icon.png");//second spritesheet loaded and not shown for some reason
     
      icon.createobject(world.shape.square(200, iconsheet.getcoords(0, 0, 199, 149)), iconsheet.gettexture(),1);
      logger = new Logger(5000);
      logger.log("LOGGING STARTED OF SOLIS");
      //WORLD AND TILE SETUP
     world.t.addtile(new space(this),0);
      logger.log("Tiles added successfully");
      //FINILIZATION
     //world.setmap();
     logger.log("Game initialized succesfully");


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  
//method within the graphics object
public void bindtexture(int texunit) {
      int loc = GL20.glGetUniformLocation(shader.programID, "tex");
      if (loc != -1) {
         GL20.glUniform1i(loc, texunit);
         
         if (texunit == 0) {
            GL13.glActiveTexture(GL13.GL_TEXTURE0);
         }
         else if (texunit == 1) {
            GL13.glActiveTexture(GL13.GL_TEXTURE1);
         }
         else if (texunit == 2) {
            GL13.glActiveTexture(GL13.GL_TEXTURE2);
         }
         else if (texunit == 3) {
            GL13.glActiveTexture(GL13.GL_TEXTURE3);
         }
         GL11.glBindTexture(GL11.GL_TEXTURE_2D, t.id);

      } else {
         System.err.println("WARNING: NO VARIABLE DETECTED WITHIN SHADER");
      }

   }
call once vbo is setup

I bind my icon texture to texunit 1 and everything else to texunit 0.
30  Game Development / Newbie & Debugging Questions / Re: texture loading issue on: 2014-04-21 17:24:49
I load two textures ( two spritesheets)
Pages: [1] 2 3 ... 13
 

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

The first screenshot will be displayed as a thumbnail.

Riven (20 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!