Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
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
1  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-31 23:34:25
I'll look into that ASAP! Have you tried the newest version (v 2.1 from https://airships.zarkonnen.com/download )?

If yes, there should be a log in %APPDATA%\AirshipsGame.
2  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-31 17:46:34
Have you thought about checking the collision of the text boxes, so that they don't overlap?

Very good point, thanks.
3  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-31 15:06:24
Today marks the release of the second early access version of Airships. I've been working flat out to improve the game over the last week, and there's some cool new stuff:

Smaller modules

There are now small versions of various ship modules, opening up more ship design space. Previously, the smallest viable ship was about 300 gold. Now it's 90.



Internet multiplayer

There is now a game server where you can create multiplayer games and join others'. Come and measure yourself against other players!



Active enemies in strategic mode

The AI empires now go conquering, which means it's very important to keep your cities defended.



Shouty crew!



The next release is likely to take longer, as I plan to add major new features such as boarding. I also have about a zillion blog posts I want to write about the game, such as some lore things on suspendium and a ship design guide.

As before, the game's available on itch.io, and existing players can (of course) download this upgrade for free.
4  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-25 13:03:04
The early access release is up!

<a href="http://www.youtube.com/v/3iki9rKIixE?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/3iki9rKIixE?version=3&amp;hl=en_US&amp;start=</a>

Some more details about the game:

At its core, the game is about designing airships and fighting with them. Ships are put together out of modules, and the layout of modules matters a great deal: everything on board is done by individual airsailors who need to run around, ferrying coal, ammunition, water and repair tools - and sometimes their fallen comrades.

You can command fleets of airships both against the computer and against other players across the Internet. (A match-making and ladder service is planned, but right now, you just enter your opponent's IP address.)

In addition, there is a single-player strategic mode, where you use your fleet to conquer city after city, unlocking new modules and bonuses with each of them.

The game has an authentic-ish system of heraldry where you can create your own coat of arms, and register it with the game forums as unique to you.

Interested? You can get it on itch.io for $5.

This is an "early access" release, which means the game is by no means done or perfectly polished. There's lots of features which I'm planning to add in the near future, such as boarding combat, more modules, varied terrain, etc...
5  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-18 21:15:53


I did a blog post on AI programming you might find interesting. Also, the early release version of the game will probably be out this week! (Details also in the post.)  Grin
6  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-10 10:11:44
So I was watching the video,  it seems like the thing is ai controlled maybe make it so that you have to control each ship so to keep it flying you need to get people to shovel fuel into he engine and that if you run out of fuel it splats to the floor(not sure if thats what brought the big one down) . That said there is huge potential in this and I would willingly play this and have a lot of fun. ps love the graphics Smiley

 Grin Pretty much, yeah. Everything on board of an airship is done by the little people, who are needed to do the following:

  • Operate engines
  • Move coal to the engines
  • Fire guns
  • Move ammo to the guns
  • Move water to fires and put them out
  • Move repair tools to damaged places and repair them
  • Heal injured people
  • Move badly injured people to the sickbay
  • etc.

Job allocation and movement is all done automatically, so you just give high-level commands to the ship as a whole.
7  Games Center / WIP games, tools & toy projects / Re: Procedural 2d Pixel Vessels / Space Ships on: 2014-03-10 10:05:19
OK, these look like my fever dreams. In a good way, I think.
8  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-03-08 11:43:17
If you've been following my Twitter, you may have seen a series of increasingly exasperated tweets about my computer. Basically, for work reasons, I had to upgrade my Mac to Mavericks, the newest OS X version. Unfortunately, Mavericks causes my machine to freeze irretrievably after a few days, and only a complete reinstall temporarily fixes the problem.

So now I'm, grumbling, back on Snow Leopard (IMHO the best version of Mac OS X), having lost a lot of time in the process. So yeah, that whole idea about releasing the early access version around now isn't happening, but I hope to get it out there before the end of the month.

I have not been entirely non-busy, though. A week ago, I was afforded the opportunity to do some playtesting. As I wrote before when I did this with Patent Blaster, there is just not substitute for putting down someone in front of your game and wordlessly watching them trying to figure it out.

The day after the playtesting I filed something like sixty new issues on Airships' tracker, ranging from trivial graphical adjustments to "feature X does not work". I selected the ones that I felt were important enough to get fixed before the first early access version, and have been plowing my way through them. (At least when I wasn't trying to fix my computer.)



One big change, visually, is that I adjusted the color of the sky to be less saturated, on the basis of this great article on game visuals and user feedback that the ships didn't visually "pop out" enough.



While doing graphical adjustments, I also took the opportunity to put in an early version of the main menu background, a digital painting of airships that I'm working on. It's by no means done, but I just, er, blurred it enough that you can't really tell. As time goes on, the picture will come into focus more.
9  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-02-28 15:06:37
No quarters?  Sad

So heraldic charges give you in-game bonuses, which means I'm restricted to relatively simple layouts. Still, more layouts is definitely something I want to add soon.
10  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-02-25 13:08:14
Looks interesting Grin I remember making such drawings in intricate detail during my childhood. This is like these drawings coming alive.

Goog luck with this, I'm curious it will turn out.

Yeah, that's pretty much it. I spent so much time laying out submarines and stuff. In fact, here is the original drawing I made for this:

11  Games Center / WIP games, tools & toy projects / Re: Airships, a ship design & fight game on: 2014-02-25 13:03:29
Nice i like these kind of games !

Just a suggestion can you make an open world for this game?

I am fundamentally very up for open-worldness. Can you describe a bit what you would like to see? No guarantees any of it will make it into the game of course, but so far the design is still pretty open.  Cheesy
12  Games Center / WIP games, tools & toy projects / Airships, a ship design & fight game on: 2014-02-24 16:23:58
Website | IndieDB

So I'm developing a strategy game about designing diesel-punk airships and having explodey territorial fights with them. I’m gearing up for an "early access" version in early March, so I thought I'd just come and make a thread about it here. Smiley



Right now, the game’s very much in development, but you can design ships and have them fight, both single-player and multiplayer. Later, I want to add cool stuff like ship-to-ship boarding, wheeled vehicles and, uh, dragons.



The game also features somewhat overly realistic heraldry, and will let you register your coat of arms.

13  Games Center / Showcase / House Update on: 2013-05-30 13:35:25
http://www.youtube.com/watch?v=LFV_pQUt0t4

The House Update adds a whole bunch of dubious interior design to the previously rather barren environment of the game. Beyond that, I've also rewritten the physics to be more stable, re-balanced the power and difficulty levels, and added a bunch more powers and weapon types. Most importantly, with so many things around just waiting to spill or explode, you can really use the environment to your advantage. I've also included a simple editor to make your own levels with.

Please give the demo a try, and let me know what you think.

14  Java Game APIs & Engines / OpenGL Development / Re: Suggestions for a really nice sun effect in OpenGL/Slick2D? on: 2013-04-09 22:27:37
As your planet looks static, you should render it only one time (to an texture or something), and use an VBO.
3D noise is just slow, so you will not be able to render many planets at the same time this way.
Generating an texture will be much much faster in the long run.

Agreed. Unfortunately, I'm having horrible problems with shader texture binding interfering with Slick. As it stands, this shader can basically render 400x400 pixels of planet at 60 FPS, and it doesn't really matter if that's one big 400x400 planet or 100 40x40 planets.
15  Java Game APIs & Engines / OpenGL Development / Re: Suggestions for a really nice sun effect in OpenGL/Slick2D? on: 2013-04-09 12:25:22
Don't use ShaderToy, use https://www.shadertoy.com/

Oh, wow! It even has a pretty neat sun effect: https://www.shadertoy.com/view/4dXGR4

Here's my planet in action. Smiley https://www.shadertoy.com/view/MdX3RM
16  Java Game APIs & Engines / OpenGL Development / Re: Suggestions for a really nice sun effect in OpenGL/Slick2D? on: 2013-03-28 17:51:27
Yeah, perlin noise seems to be the way to go. I've been playing with ShaderToy and following the advice from the slick forum and managed to create a fairly nice shader for making planets. (Haven't actually looked into suns yet, but that should be easier!)

17  Games Center / 4K Game Competition - 2013 / Re: Annotated Code on: 2013-03-23 10:48:23
Well, I'll give it a try to gauge interest. Annotated code tomorrow or so. Smiley
18  Java Game APIs & Engines / OpenGL Development / Suggestions for a really nice sun effect in OpenGL/Slick2D? on: 2013-03-22 20:14:52
So I'm working on the star map for a space-based game, and I'd like really beautiful animated sun graphics. This is what I have so far, which makes heavy use of particles:



<a href="http://www.youtube.com/v/Y4RuyKPPaEg?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/Y4RuyKPPaEg?version=3&amp;hl=en_US&amp;start=</a>

This is pretty, but as people have remarked, not that much like an actual sun, which looks more like

<a href="http://www.youtube.com/v/jx0MivZge_s?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/jx0MivZge_s?version=3&amp;hl=en_US&amp;start=</a>

Can you think of some method of generating a similar visual effect? (I'm using Slick2D, but can happily drop down into the raw OpenGL if needed.)
19  Games Center / 4K Game Competition - 2013 / Annotated Code on: 2013-03-22 20:09:19
So now that the competition has all but concluded, I have a suggestion: given the nature of Java4k code, it's often not too easy to read, and given they're small single-person projects, they tend to be light on comments. But it would be great to be able to learn from each other.

Would people be interested in reading/writing thoroughly annotated versions of their game code? If there's some interest, I'll start out and post an annotated version of the Parasite Escape code.
20  Games Center / Showcase / Re: Patent Blaster on: 2013-03-14 07:22:44
Interesting source of assets.  You should patent the concept Wink


You are quite right, I really should. And include an illustration of a deformed-looking person playing the game on a blocky computer screen.  Cool
21  Games Center / Showcase / Patent Blaster on: 2013-03-13 19:04:27
<a href="http://www.youtube.com/v/0dizSEHow9Y?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/0dizSEHow9Y?version=3&amp;hl=en_US&amp;start=</a>

I've just released a small indie game called Patent Blaster that's based on Slick. It's a sidescrolling shooter inspired by the awfulness of patent illustrations, with weird creatures you can burn/freeze/dissolve or just shoot.

If you want to give it a try, download the demo: Win Mac Linux. Let me know what you think. Smiley

22  Games Center / 4K Game Competition - 2013 / Re: Parasite Escape on: 2012-12-31 08:55:18
Thanks for the feedback. Smiley The pictorial instructions were a bit of an experiment, so I'll definitely add some text to them to make things less incomprehensible.

Can you describe in what way you find the controls/movement difficult?
23  Games Center / 4K Game Competition - 2013 / Parasite Escape on: 2012-12-30 15:00:39
My entry this year has you play as a horrific brain parasite trying to escape from a space base. Leap from brain to brain and outwit the humans to reach the next sector. Try it out: http://zarkonnen.com/parasite_escape/

Solicitations for feedback:
  • Any crashes?
  • Are the instructions understandable?
  • Is it fun?

24  Games Center / Showcase / Re: Bridge Crossing Minigame - Looking for Feedback on: 2012-06-08 15:33:57
I too got  stuck on level 3. I think you need to introduce the weight shifting mechanic in a much simpler level where *only* weight shifting is needed (no jumping), then a couple of levels like that before you start to combine the two.

Yeah, I think the difficulty curve is kind of wall-like. I will rework that shortly, and also introduce the concepts one by one instead of just in a massive info screen.
25  Games Center / Showcase / Re: Bridge Crossing Minigame - Looking for Feedback on: 2012-06-08 09:30:31
Level 3 is unbeatable AFAIK...

Try shifting your weight so that your footsteps become softer. The color of your "feet" changes to indicate how much weight you're putting on them. Smiley
26  Games Center / Showcase / Re: Bridge Crossing Minigame - Looking for Feedback on: 2012-06-07 17:49:56
Managed to cross every time by just going straight forward.  Had to shift-reload to reset the boards.   Maybe make it slippery so if you go too fast you could slip and slam through the boards.  Not sure how you'd represent that with footprints tho :/


That's just the first level. The second level has a board missing, which means you have to jump.

So feedback item #1: actually label the levels as LEVEL 1, LEVEL 2, etc. Smiley
27  Games Center / Showcase / Bridge Crossing Minigame - Looking for Feedback on: 2012-06-07 17:21:59


http://www.zarkonnen.com/ropebridge/

A Java applet minigame for crossing a bridge. I'm not totally convinced of it as it feels a bit awkward, so feedback on how to make it work better would be brilliant. Smiley

The aim is to cross the bridge and not fall down. You can move forward, jump, and crucially, shift your weight to avoid treading too heavily on damaged boards.

The idea behind this is that there's lots of games where you go on an adventure: delving into a dungeon, crossing wide wastelands, etc. In historical reality, there have been lots of these adventures. The main challenge was usually the terrain (cliffs, rivers, forests to get lost in, caves that branch again and again) and the chance of accident (breaking a leg, being bitten by a snake, losing your equipment).

But in games about adventures, the main challenge tends to be monsters that want to eat you. We all know RPGs have an unfortunate tendency to reduce some combination of a hack-and-slash, navigating dialogue trees, and jumping puzzles. But there's so much more to an adventure! So many other perils! LoTR is a classic story of an adventure, and there is very little fighting for the adventurers in it.

It's not all clear-cut, of course: in game history there were games that centered more on other perils, like Pitfall!

But anyway, I tried to make a list of all the activities that an adventure might actually involve. One of the classic ones is crossing a rickety bridge, so I thought I'd try making that into a game.
28  Game Development / Newbie & Debugging Questions / Re: LWJGL Lighting problem: All faces have same color on: 2012-03-23 21:25:46
Never mind, I finally figured it out: it was just that I was moving the light so little that for all intents and purposes it was always at the top. It works now!

Thank you so much for your help!
29  Game Development / Newbie & Debugging Questions / Re: LWJGL Lighting problem: All faces have same color on: 2012-03-23 21:19:50
You often don't want each vertex of a triangle to have to same normal.

Imagine rendering a sphere, or other curved shapes, it would look rather bad as the shade wouldn't be smooth across the surface.

Aaah, of course. OK, I'm afraid I have another question. (And BTW, thank you so much for your help so far.) So I'm now trying to render a cube, and I'm setting the normals to point straight out of the faces. However, I'm now seeing that the top face of the cube, with a normal call of

1  
glNormal3f(0.0f, 0.0f, 1.0f);


gets the most illumination, independent of what light position I supply using

1  
glLight(GL_LIGHT1, GL_POSITION,(FloatBuffer)temp.asFloatBuffer().put(lightPosition).flip());


Complete code:

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  
133  
134  
135  
136  
137  
138  
139  
140  
141  
142  
143  
144  
145  
146  
147  
148  
149  
150  
151  
152  
153  
154  
155  
156  
157  
158  
159  
160  
161  
162  
163  
164  
165  
166  
167  
168  
169  
170  
171  
172  
173  
174  
175  
176  
177  
178  
179  
180  
181  
182  
183  
184  
185  
186  
187  
188  
189  
190  
191  
192  
193  
194  
195  
196  
197  
198  
199  
200  
201  
202  
203  
204  
205  
package com.zarkonnen.lwjgltest;

import static org.lwjgl.opengl.GL11.*;
import static org.lwjgl.util.glu.GLU.*;

import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.FloatBuffer;
import java.util.ArrayList;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.lwjgl.LWJGLException;
import org.lwjgl.input.Keyboard;
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.newdawn.slick.opengl.Texture;
import org.newdawn.slick.opengl.TextureLoader;

public class Main {
   public static final int DISPLAY_HEIGHT = 480;
   public static final int DISPLAY_WIDTH = 640;
   public static final Logger LOGGER = Logger.getLogger(Main.class.getName());

   private float lightAmbient[] = { 0.5f, 0.5f, 0.5f, 1.0f };  // Ambient Light Values ( NEW )
  private float lightDiffuse[] = { 1.0f, 1.0f, 1.0f, 1.0f };      // Diffuse Light Values ( NEW )
  private float lightPosition[] = { 0.0f, 1.0f, 0.0f, 1.0f }; // Light Position ( NEW )
 
   static {
      try {
         LOGGER.addHandler(new FileHandler("errors.log", true));
      } catch (IOException ex) {
         LOGGER.log(Level.WARNING, ex.toString(), ex);
      }
   }

   public static void main(String[] args) {
      Main main = null;
      try {
         main = new Main();
         main.create();
         main.run();
      } catch (Exception ex) {
         LOGGER.log(Level.SEVERE, ex.toString(), ex);
      } finally {
         if (main != null) {
            main.destroy();
         }
      }
   }
   
   ArrayList<Box> boxes = new ArrayList<Box>();

   public void create() throws LWJGLException, IOException {
      //Display
     Display.setDisplayMode(new DisplayMode(DISPLAY_WIDTH, DISPLAY_HEIGHT));
      Display.setFullscreen(false);
      Display.setTitle("Hello LWJGL World!");
      Display.create();

      //Keyboard
     Keyboard.create();

      //Mouse
     Mouse.setGrabbed(false);
      Mouse.create();

      //OpenGL
     initGL();
     
      Texture tex = TextureLoader.getTexture("png", Main.class.getResourceAsStream("tex.png"));
      boxes.add(new Box(0, 0, 0, 1, 1, 1, tex));
   }

   public void destroy() {
      //Methods already check if created before destroying.
     Mouse.destroy();
      Keyboard.destroy();
      Display.destroy();
   }
   
   public void initGL() {
      glEnable(GL_LIGHTING);
      glEnable(GL_TEXTURE_2D); // Enable Texture Mapping
       glShadeModel(GL_SMOOTH); // Enable Smooth Shading
       glClearColor(0.0f, 0.0f, 0.0f, 0.0f); // Black Background
       glClearDepth(1.0f); // Depth Buffer Setup
       glEnable(GL_DEPTH_TEST); // Enables Depth Testing
       glDepthFunc(GL_LEQUAL); // The Type Of Depth Testing To Do

        glMatrixMode(GL_PROJECTION); // Select The Projection Matrix
       glLoadIdentity(); // Reset The Projection Matrix

        // Calculate The Aspect Ratio Of The Window
      gluPerspective(
            45.0f,
            DISPLAY_WIDTH * 1.0f / DISPLAY_HEIGHT,
            0.1f,
            100.0f);
        glMatrixMode(GL_MODELVIEW); // Select The Modelview Matrix

        // Really Nice Perspective Calculations
       glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
        ByteBuffer temp = ByteBuffer.allocateDirect(16);
        temp.order(ByteOrder.nativeOrder());
        glLight(GL_LIGHT1, GL_AMBIENT, (FloatBuffer)temp.asFloatBuffer().put(lightAmbient).flip());              // Setup The Ambient Light
       glLight(GL_LIGHT1, GL_DIFFUSE, (FloatBuffer)temp.asFloatBuffer().put(lightDiffuse).flip());              // Setup The Diffuse Light
       glLight(GL_LIGHT1, GL_POSITION,(FloatBuffer)temp.asFloatBuffer().put(lightPosition).flip());         // Position The Light
     glEnable(GL_LIGHT1);                          // Enable Light One
  }

   public void processKeyboard() {
      if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { cx += 0.03f; }
      if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { cx -= 0.03f; }
      if (Keyboard.isKeyDown(Keyboard.KEY_UP)) { cy -= 0.03f; }
      if (Keyboard.isKeyDown(Keyboard.KEY_DOWN)) { cy += 0.03f; }
   }

   public void processMouse() {
   }
   float cx, cy;
   
   public Main() throws IOException {
     
   }
   
   static class Box {
      float x, y, z, w, d, h;
      Texture tex;

      public Box(float x, float y, float z, float w, float d, float h, Texture tex) {
         this.x = x;
         this.y = y;
         this.z = z;
         this.w = w;
         this.d = d;
         this.h = h;
         this.tex = tex;
      }
   }
   
   public void render() {
      glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);          // Clear The Screen And The Depth Buffer
     for (Box b : boxes) {
         glLoadIdentity();
         // Camera
        glTranslatef(cx, cy, -8);
         glTranslatef(b.x, b.y, b.z);
         b.tex.bind();
         glBegin(GL_QUADS);
         // North face
        glNormal3f(0.0f, -1.0f, 0.0f);
         glTexCoord2f(0.0f, 0.0f); glVertex3f(b.x, b.y + b.h, b.z);         glTexCoord2f(b.tex.getWidth(), 0.0f); glVertex3f(b.x + b.w, b.y + b.h, b.z);
                                                            glTexCoord2f(b.tex.getWidth(), b.tex.getHeight()); glVertex3f(b.x + b.w, b.y + b.h, b.z + b.d);
         glTexCoord2f(0.0f, b.tex.getHeight()); glVertex3f(b.x, b.y + b.h, b.z + b.d);
         // East face
        glNormal3f(1.0f, 0.0f, 0.0f);
         glTexCoord2f(0.0f, 0.0f); glVertex3f(b.x + b.w, b.y, b.z);         glTexCoord2f(b.tex.getWidth(), 0.0f); glVertex3f(b.x + b.w, b.y, b.z + b.d);
                                                            glTexCoord2f(b.tex.getWidth(), b.tex.getHeight()); glVertex3f(b.x + b.w, b.y + b.h, b.z + b.d);
         glTexCoord2f(0.0f, b.tex.getHeight()); glVertex3f(b.x + b.w, b.y + b.h, b.z);
         // West face
        glNormal3f(-1.0f, 0.0f, 0.0f);
         glTexCoord2f(0.0f, 0.0f); glVertex3f(b.x, b.y, b.z);            glTexCoord2f(b.tex.getWidth(), 0.0f); glVertex3f(b.x, b.y + b.h, b.z);
                                                            glTexCoord2f(b.tex.getWidth(), b.tex.getHeight()); glVertex3f(b.x, b.y + b.h, b.z + b.d);
         glTexCoord2f(0.0f, b.tex.getHeight()); glVertex3f(b.x, b.y, b.z + b.d);
         // South face
        glNormal3f(0.0f, 1.0f, 0.0f);
         glTexCoord2f(0.0f, 0.0f); glVertex3f(b.x, b.y, b.z);            glTexCoord2f(b.tex.getWidth(), 0.0f); glVertex3f(b.x, b.y, b.z + b.d);
                                                            glTexCoord2f(b.tex.getWidth(), b.tex.getHeight()); glVertex3f(b.x + b.w, b.y, b.z + b.d);
         glTexCoord2f(0.0f, b.tex.getHeight()); glVertex3f(b.x + b.w, b.y, b.z);
         // Top face
        glNormal3f(0.0f, 0.0f, 1.0f);
         glTexCoord2f(0.0f, 0.0f); glVertex3f(b.x, b.y, b.z + b.d);         glTexCoord2f(b.tex.getWidth(), 0.0f); glVertex3f(b.x, b.y + b.h, b.z + b.d);
                                                            glTexCoord2f(b.tex.getWidth(), b.tex.getHeight()); glVertex3f(b.x + b.w, b.y + b.h, b.z + b.d);
         glTexCoord2f(0.0f, b.tex.getHeight()); glVertex3f(b.x + b.w, b.y, b.z + b.d);
         glEnd();
      }
   }

   public void run() {
      while (!Display.isCloseRequested() && !Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) {
         if (Display.isVisible()) {
            processKeyboard();
            processMouse();
            update();
            render();
         } else {
            if (Display.isDirty()) {
               render();
            }
            try {
               Thread.sleep(100);
            } catch (InterruptedException ex) {
            }
         }
         Display.update();
         Display.sync(60);
      }
   }

   public void update() {
   }
}
30  Game Development / Newbie & Debugging Questions / Re: LWJGL Lighting problem: All faces have same color on: 2012-03-23 21:00:08

Well, I assumed they'd be calculated from the vertices using the right-hand or left-hand rule. Learning! Trying it out now...
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.

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

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

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

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

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

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

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

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

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

CJLetsGame (200 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!