Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (714)
Games in Android Showcase (214)
games submitted by our members
Games in WIP (787)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3 4 ... 10
 11 
 on: 2017-03-22 20:38:12 
Started by BurntPizza - Last post by 65K
(2) no pay for several months (pay contingent on our demo being accepted by Sony, at which point there will be back pay--I am mentally adding the word "maybe"),
Shocked  Huh

Posting rules require some text but I am speechless.

 12 
 on: 2017-03-22 19:40:43 
Started by lifesuxtr - Last post by tariqbroadnax
1. Get rid of the entire concept of states. Design and code all your GUI screens. And change your frame's content pane appropriately.
2. Setting your frame's size and packing it are two different things. The latter sizes your frame based on its children's size. Ditch the packing and use layout managers to size your components. Generally speaking, a component should only defines its preferred size and handle cases where its smaller or bigger than that its preferred size.
3. Don't use Canvas. It cannot be used with JLayeredPane, which is necessary for a HUD.

 13 
 on: 2017-03-22 19:02:13 
Started by BurntPizza - Last post by philfrei
What I'm about to do today: heading to downtown SF where I will meet the project lead of a recently formed game-making team and get set up with a workstation.

Plusses:
(1) will be set up with C++ and Unreal, a chance to learn these without having to layout funds myself for compiler/IDE/etc.,
(2) focus will be audio, my main interest,
(3) excellent position from which to achieve some sort of audio director or music director post as the company grows,
(4) the company is pretty solid in its main line of work (related to supporting VR) and has credible resources to risk branching into creating product as opposed to just supporting it.

Minuses:
(1) have to work with C++, not Java (welcome to the "real world"?),
(2) no pay for several months (pay contingent on our demo being accepted by Sony, at which point there will be back pay--I am mentally adding the word "maybe"),
(3) the audio I have to do initially will be primarily related to analyzing sounds (I have done very little of this), with only a bit of sound design and production added on (more my interest). Sound analysis requires things like getting a better grip on DFT and FFT, and it is going to take some serious cramming to "get" this.
(4) No guarantees the company will succeed.

Once again, am putting off work on Hexara.
 Smiley Huh Sad

 14 
 on: 2017-03-22 18:03:46 
Started by BurntPizza - Last post by 65K
Seems like a new contestant is needed soon...



The Lethal Running Show

 15 
 on: 2017-03-22 16:44:19 
Started by lifesuxtr - Last post by lifesuxtr
Hi guys working on a login system on a 2d rpg game.

Basically we have a state manager,menu state,login state etc...


im trying to add JButton and JTextbox to one of this states but i couldnt do that.

First this is display 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  
import java.awt.Canvas;


import java.awt.Dimension;

import javax.swing.JFrame;

public class Display {

   private JFrame frame;
   private Canvas canvas;
   
   private String title;
   private int width,height;
   
   public Display(String title,int width,int height){
      this.title = title;
      this.width=width;
      this.height=height;
      createDisplay();
     
   }
   private void createDisplay(){
      frame = new JFrame(title);
      frame.setSize(width, height);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setResizable(false);
      frame.setLocationRelativeTo(null);
      frame.setVisible(true);
      canvas = new Canvas();//initilize.
      canvas.setPreferredSize(new Dimension(width,height));
      canvas.setMaximumSize(new Dimension(width,height));
      canvas.setMinimumSize(new Dimension(width,height));
      canvas.setFocusable(false);///!!! key calissin diyee.focusla ilgili.
      frame.add(canvas);
      frame.pack();

   }
   public Canvas getCanvas(){ //getter
      return canvas;
   }
   public JFrame getFrame(){
      return frame;
   }
   
   
}


This is the login state.I want to add Jbutton and textbox to this state.
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  
import java.awt.Graphics;

public class LoginState extends State {
   private UIManager uiManager;

   public LoginState(final Handler handler) {
      super(handler);
      uiManager = new UIManager(handler);

      uiManager.addObject(new UIImageButton(200, 200, 400, 64, Assets.btn_start, new ClickListener() {
         @Override
         public void onClick() {
            handler.getMouseManager().setUIManager(uiManager);
            State.setState(handler.getGame().gameState);
         }
      }));

   }

   
   public void tick() {
      uiManager.tick();
      handler.getMouseManager().setUIManager(uiManager);
      State.setState(handler.getGame().LoginState);
     
   }

   @Override
   public void render(Graphics g) {
      uiManager.render(g);
   }
   
}


i tryed
display.getcanvas.add(button)
like that but its not working and actually i wonder how people add JButton or Jtextfields to their game states ? i can only add image buttons to canvas

 16 
 on: 2017-03-22 12:16:04 
Started by EnderNinja7 - Last post by h.pernpeintner
According to learnopengl.com instancing tutorial https://learnopengl.com/#!Advanced-OpenGL/Instancing(and many other websites), the gl_Position with uniform vecs is fine for a few instances, but if we hit  a lot more than 100 instances, it may make a performance issue. The new method is that an instance offsets VBO is created together with glVertexAttribDivisor(2, 1); . We now let opengl handle the shader iteration.

Sorry, I'm not quite sure if I understand you. Okay, maybe if you only deal with a vec3 and nothing more, it might be better performancewhise to use instanced attributes... but "in general", I would say that gl_InstanceId is not deprecated but even the "cleaner" way. Because first, you have more than a vec3 position for your entity. Modern way of handling this is to have large uniform buffer or ssbo. In most cases, it would be at least a 4x4 matrix with a transformation. In my case, I have 24 values per entity - Having this as instanced attribute would mess up the strucutre pretty much. And the more important thing: What does my vertex structure have to do with how my entity is instanced?? My rendering pipeline lets me adjust instance count on the fly..all I have to do is change a single value in my command buffer and I have another instance. Okay, plus a change in my entity uniform buffer, where I add another entry and maybe have to rebuffer. But since there are stored transformations, the data is probably dynamically updated so or else, while my vertex data is completely static. Another advantage: You can have the vertices stored once and simple push an isntanced render call with indexing into your uniform array.... I'm pushing 4 mio vertices with 340000 cubes (instances) with this pipeline on my GTX 1060 at 60 fps, so I doubt that there really is a performance penalty at all - maybe on older hardware...

 17 
 on: 2017-03-22 11:51:40 
Started by EnderNinja7 - Last post by EnderNinja7
Thanks. Now I use this method :-

1  
2  
3  
4  
5  
6  
7  
8  
9  
//BEFORE: init Vector3f[16] chunk_transforms etc. 

FloatBuffer fb = BufferUtils.createFloatBuffer(sizeOf(Vector3f) * CHUNK_SIZE);
for(int c = 0; c =< CHUNK_SIZE; c++){
       fb.put(chunk_transforms[c].x()).put(chunk_transforms[c].y()).put(chunk_transforms[c].z());
}
fb.flip();

//After : VBO/VAO code etc.


EDIT: Code typo

 18 
 on: 2017-03-22 09:16:23 
Started by EnderNinja7 - Last post by KaiHH
floatbuffer does not accept an array of vector3fs . How do I get past this?
1  
2  
3  
1. v.get(floatBuffer)
2. vs[i].get(3 * i, floatBuffer)
3. floatBuffer.put(v.x).put(v.y).put(v.z)

where 'v' has type Vector3f, 'vs' has type Vector3f[], and floatBuffer has type FloatBuffer

Make sure you carefully read the JavaDocs of all methods involved, especially that of case 1.

 19 
 on: 2017-03-22 06:39:28 
Started by EnderNinja7 - Last post by EnderNinja7
Hmmm, another problem. While setting up the VBO code of offsets, floatbuffer does not accept an array of vector3fs . How do I get past this? without passing the vec3s instancing arrays would not execute.

 20 
 on: 2017-03-22 03:39:35 
Started by Coding17 - Last post by EnderNinja7
There are a lot of tutorials for LWJGL and most would be very small and depreciated (LWJGL 2 ). Here are the best ones I can find :-

1. There is a very extensive, detailed and free ebook (pdf) named 3d game development with LWJGL 3 https://www.gitbook.com/book/lwjglgamedev/3d-game-development-with-lwjgl/details which is very good (if you are not confused with the complex pipeline of various java classes and packages. Also you would have to see its source to run the program at the end of every chapter.

2. SilverTiger's legendary tutorial https://github.com/SilverTiger/lwjgl3-tutorial/wiki

3. If you are able to make glfw windows pretty easily then there is an opengl 3.2 or newer section of the extensive lwjgl wiki http://wiki.lwjgl.org/. Otherwise you can copy code from the getting started page in lwjgl and make some voids for opengl code.

4. Once you learn lwjgl a little you will see that lwjgl opengl is almost the same as c opengl so I think at that point you will be able to implement c into lwjgl. So there would be a lot of c opengl tutorials (which are very good) which you can learn from. I would recommend:-

    openglbook (GL4.0) http://openglbook.com/ (free)
    learn opengl https://learnopengl.com/
    opengl tutorial http://www.opengl-tutorial.org/

Pages: 1 [2] 3 4 ... 10
 
Rule (65 views)
2017-03-19 12:43:22

Rule (56 views)
2017-03-19 12:42:17

Rule (67 views)
2017-03-19 12:36:21

theagentd (74 views)
2017-03-16 05:07:07

theagentd (77 views)
2017-03-15 22:37:06

theagentd (73 views)
2017-03-15 22:32:18

theagentd (71 views)
2017-03-15 22:31:11

ral0r2 (130 views)
2017-03-03 11:52:41

ral0r2 (128 views)
2017-03-03 11:42:24

Archive (313 views)
2017-02-27 19:41:49
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!