Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (567)
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]
1  Game Development / Newbie & Debugging Questions / Re: Weird tilemap rendering not working on: 2014-09-05 16:05:03
Oh im so stupid, I just needed to change a variable name and now it works fine. Thanks alot.

Toby
2  Game Development / Newbie & Debugging Questions / Re: Weird tilemap rendering not working on: 2014-09-04 15:06:17
Okay, sorry. Look at the first image, can you see there are black walls. The middle ones are slightly to the right, when I want them to just be straight. I dont understand why it is happening. They should be drawn probably in the spritesheet (image below)

Hope that helps
3  Game Development / Newbie & Debugging Questions / Weird tilemap rendering not working on: 2014-09-04 10:55:22
The game I am currently working on has a very weird rendering error. It loads text from a file and sets a specific tile to a certain text (If you get what I mean). It has this very weird rendering error though. 



The textures move a couple of pixels to the right. This is what my spritesheet looks like.



And the some snippets of the code.

Loading the map:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
   public void LoadWallsMap(String filename, int tileSize) {
      this.tileSize = tileSize;

      try {
         @SuppressWarnings("resource")
         BufferedReader br = new BufferedReader(new FileReader("res/maps/" + filename));

         mapWidth = Integer.parseInt(br.readLine());
         mapHeight = Integer.parseInt(br.readLine());

         mapWalls = new int[mapHeight][mapWidth];

         for (int row = 0; row < mapHeight; row++) {
            String line = br.readLine();
            String[] tokens = line.split(" ");
            for (int column = 0; column < mapWidth; column++) {
               mapWalls[row][column] = Integer.parseInt(tokens[column]);
            }
         }
      } catch (Exception e) {
         e.printStackTrace();
      }
   }


And rendering the map:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
   public void renderWallsMap(Graphics g) {
      for (int row = 0; row < mapHeight; row++) {
         for (int column = 0; column < mapWidth; column++) {
            int x = mapWalls[row][column];
            if(x == 1) renderTile(Tile.wallTop, x, y, column, row, g);
            if(x == 2) renderTile(Tile.wallTopMiddle, x, y, column, row, g);
            if(x == 3) renderTile(Tile.wallSide, x, y, column, row, g);
            if(x == 4) renderTile(Tile.wallBottom, x, y, column, row, g);
            if(x == 5) renderTile(Tile.wallBottomMiddle, x, y, column, row, g);
         }
      }
   }


1  
2  
3  
   public void renderTile(Tile tile, int x, int y, int column, int row, Graphics g) {
      tile.render(x + column * tileSize, y + row * tileSize, g);
   }


Any help would be much appreciated.

Thanks Toby
4  Games Center / WIP games, tools & toy projects / Re: Arcade Game [Duck drop game] on: 2014-08-16 14:01:51
Oh yeahh, Thanks I forgot
5  Games Center / WIP games, tools & toy projects / Arcade Game [Duck drop game] on: 2014-08-15 16:20:05
Over the summer my Dad saw me doing a bit of java coding. He set me challenge to design a simple duck drop game. I set about the challenge to design the game and so I finished it.

You can play the final game here https://www.dropbox.com/s/ambgsyvlh98mcrd/Duck%20Drop%20Game%20%5BAlpha%20V1.0%5D.zip

If you have any good suggestions on what to add to the game, please put them in the comments below. Any art and sound would be much appreciated as I would put a reference to the creators of it.







Thanks Toby
6  Game Development / Newbie & Debugging Questions / Re: Voxel Destroy Item on: 2014-07-29 10:08:53
Okay Okay
7  Game Development / Newbie & Debugging Questions / Re: Voxel Destroy Item on: 2014-07-29 09:46:06
Yeah you are right this is a 3d Game. I have blocks being destroyed correctly and working but I want to get the pickaxe to be removed from the game and my inventory when it's life runs out.
8  Game Development / Newbie & Debugging Questions / Voxel Destroy Item on: 2014-07-28 18:11:20
I have a voxel game, and I want to destroy items like a pickaxe. How would I do that, I am using LWJGL and Slick in case that helps a bit. Sorry for the broad question but if you point me on the right path I could find the answer.

Thanks Toby
9  Games Center / WIP games, tools & toy projects / Re: Athanas Quest on: 2014-06-16 16:56:33
Yeahh thanks for that, I will use tiled because it is quite simple to implement in slick2d. The only problem I have is collision detection with tiled but I'm sure I will figure it all out. I am going to spend the next few weeks completly re-writing the game engine because it is an complete mess.
10  Games Center / WIP games, tools & toy projects / Re: Athanas Quest on: 2014-06-12 17:05:49
Input:

I am at the stage where I can start to re-design some aspects of my game. Im going to spend a bit of time on level design. I need your input on what to use for a map. Tiled or a RGB based map.

Any help would be really really useful

Thanks Toby
11  Games Center / WIP games, tools & toy projects / Re: Athanas Quest on: 2014-06-06 21:13:04
Yes thanks for this, I have decided to work alone frm know on. Luckly I can do a lot of work on the game over this week and I will post a update of the game with the new level editor implemented.
12  Games Center / WIP games, tools & toy projects / Re: Athanas Quest on: 2014-06-05 06:47:37
Update:

I don't have any gameplay updates to show you because I haven't done any development of the game for a couple of days. I had this huge physics project which has taken up most of my time but is nearly finished. I have created a twitter profile where I will keep you up to date with the game. You can follow me @Toby_Dev_Drane
13  Games Center / WIP games, tools & toy projects / Re: Athanas Quest on: 2014-06-02 16:39:21
I really appreciate the help. As this is a proper project I would need you two to send me some work and show me why you want to be a part of it.

Toby
14  Games Center / WIP games, tools & toy projects / Re: Athanas Quest on: 2014-06-01 10:40:32
Yeahh so what I have added so far:

- Main menu system / different game states
- Walking player with jumping
- Animation
- Basic collision detection
- Loading levels from images using color picking
- Easy way to adding new tiles from a spritesheet
- Music and sounds

This is what is in the game after about a month of coding. I have wrote the main game engine which can be easily used to implement new features. What am I doing now?

- Creating a proper level
- Trying to have a scrolling background but that is not working any help would be appreciated
- Start writing the enemy class and add health and basic attack
- Re-do collision because that makes a few bugs (Do this after you can have a basic playable game)
- Trying to export the game (Again any help, Im using slick and lwjgl)

I will post screen shots of the development and try and upload a playable alpha in the near future. Any ideas for what to be added I would love that.

Toby
15  Games Center / WIP games, tools & toy projects / Re: Athanas Quest on: 2014-05-31 12:01:04
 Grin I will change my name just for you aha!
16  Games Center / WIP games, tools & toy projects / Athanas Quest on: 2014-05-31 10:09:22
Hello JGO, my name is Toby. I am a 14 year old game programmer and I am currently working on my first big project. This game is a sidescroller/RPG/sandbox game. Yes alot of stuff to be added. The game only has a basic map editor which uses colors from a picture and a walking player. I want to get the game into alpha by the end of july. Here is what is implemented so far.



#

As you can see very very basic. I would love ideas for the game and once I figure out how to export a slick and lwjgl project I will upload a download link. Please stay tuned for more updates.

Thanks

Toby
17  Games Center / Cube World Projects / Re: Why doesnt it render anything! on: 2014-01-16 16:40:52
Well the whole program goes together fine here the main class

package com.voxel.engine.core;

import com.voxel.engine.core.Block.Block;
import com.voxel.engine.core.Camera.FPCameraController;
import com.voxel.engine.core.Chunk.ChunkManager;
import org.lwjgl.LWJGLException;
import org.lwjgl.input.Keyboard;
import org.lwjgl.opengl.*;
import org.lwjgl.util.glu.GLU;

import java.util.Random;

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

/**
 * Created with IntelliJ IDEA.
 * User: Toby's PC
 * Date: 06/01/14
 * Time: 15:47
 */
public class Core {

    public static final int WORLD_WIDTH = 8;
    public static final int WORLD_HEIGHT = 1;
    public static final int BLOCK_WIDTH = 16;
    public static final int BLOCK_HEIGHT = 16;

    private Cube cube = new Cube();
    private Block.BlockType blockType = Block.BlockType.BLOCK_TYPE_STONE;

    FPCameraController camera = FPCameraController.getInstance();

    public static final int SCREEN_WIDTH = 640;
    public static final int SCREEN_HEIGHT = 480;
    public static final String TITLE = "Voxel Engine V0.01";

    private float playerX, playerY, playerZ;

    /**
     * Method that is run at the start
     */
    public void start(){
        try{
            createWindow(SCREEN_WIDTH, SCREEN_HEIGHT, TITLE);

            PixelFormat pixelFormat = new PixelFormat();
            ContextAttribs contextAttribs = new ContextAttribs(3, 0);

            Display.create(pixelFormat, contextAttribs);
            glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight());

            if(GLContext.getCapabilities().OpenGL21){
                System.out.println("OpenGL21 Supported");
            }

            Random random = new Random();
            for(int x = 0;x < 16;x++){
                for (int z = 0;z < 16;z++){
                    ChunkManager.getInstance().addChunk(ChunkManager.ChunkType.CHUNK_TYPE_RANDOM, x, 0, z);
                }
            }

            initGL();
            run();
        }catch(Exception e){
            e.printStackTrace();
        }
    }

    /**
     * Creates our window based on values given
     *
     * @param width, Width of our screen
     * @param height, Height of our screen
     * @param title, The title of the game
     */
    public void createWindow(int width, int height, String title){
        try {
            Display.setFullscreen(false);
            Display.setDisplayMode(new DisplayMode(width, height));
            Display.setTitle(title);
            Display.setVSyncEnabled(true);
        } catch (LWJGLException e) {
            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
        }
    }

    /**
     * Init all the graphics components
     */
    public void initGL(){
        GL11.glMatrixMode(GL_PROJECTION);
        GL11.glLoadIdentity();
        GLU.gluPerspective(45.0f, (float) Display.getDisplayMode().getWidth() / (float) Display.getDisplayMode().getHeight(), 0.1f, 300.0f);
        GL11.glEnable(GL11.GL_FOG);

        GL11.glTranslatef(0, -1f, 0f);
        GL11.glRotatef(180.0f, 0, 1.0f, 0);
        GL11.glMatrixMode(GL_MODELVIEW);
        GL11.glLoadIdentity();
        GL11.glShadeModel(GL_LINE_SMOOTH);
        GL11.glClearColor(0.1f, 0.5f, 0.7f, 0.0f);
        GL11.glClearDepth(1.0);
        GL11.glEnable(GL_DEPTH_TEST);
        GL11.glDepthFunc(GL11.GL_LEQUAL);
        GL11.glHint(GL11.GL_PERSPECTIVE_CORRECTION_HINT, GL11.GL_NICEST);
        GL11.glCullFace(GL11.GL_BACK);
        GL11.glEnable(GL11.GL_CULL_FACE);
    }



    public void run(){
        float rotateYaw = 1;
        while(!Display.isCloseRequested()){
            try{
                inputManager();
                GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
                GL11.glLoadIdentity();
                GL11.glTranslatef(-30f + playerX, -40f + playerY, -160f + playerZ);
                GL11.glRotatef(45f, 0.4f, 1.0f, 0.1f);
                GL11.glRotatef(45f, 0f, 1.0f, 0f);
                rotateYaw += 1;
                render();

                Display.update();
                Display.sync(60);
            }catch(Exception e){
                e.printStackTrace();
            }
        }
        Display.destroy();
    }

    public void inputManager() {
        if(Keyboard.isKeyDown(Keyboard.KEY_W)){
            playerY--;
        }
        if(Keyboard.isKeyDown(Keyboard.KEY_S)){
            playerY++;
        }
        if(Keyboard.isKeyDown(Keyboard.KEY_A)){
            playerX++;
        }
        if(Keyboard.isKeyDown(Keyboard.KEY_D)){
            playerX--;
        }
        if(Keyboard.isKeyDown(Keyboard.KEY_E)){
            playerZ--;
        }
        if(Keyboard.isKeyDown(Keyboard.KEY_Q)){
            playerZ++;
        }
    }

    public void render(){
        ChunkManager.getInstance().render();
    }

    public static void main(String[] args){
        Core core = new Core();
        core.start();
    }
}
18  Games Center / Cube World Projects / Re: Why doesnt it render anything! on: 2014-01-16 16:30:15
Core Class - http://pastebin.com/8WN7jSYi
Cube Class - http://pastebin.com/enjSxxi0
Frustum - http://pastebin.com/ehTdy3rZ
Simplex Noise - http://pastebin.com/4L4icJMG
Chunk - http://pastebin.com/6XCFG7Ch
Chunk Manager - http://pastebin.com/etXbZQNn
Chunk Protocol - http://pastebin.com/2BmfXKjv
Camera - http://pastebin.com/WbnhYcaD
FPCameraController - http://pastebin.com/L5cEVcLK
Block - http://pastebin.com/8rZwhL3q

It didnt let me paste the code directly into the post so heres the paste bin instead
19  Games Center / Cube World Projects / Why doesnt it render anything! on: 2014-01-15 19:41:32
I have this code here https://www.dropbox.com/s/eo3ramkukk71ahu/src.rar and i was wandering why doesnt it render anything, can someone please help me thanks!
20  Games Center / Cube World Projects / Re: How to add noise on: 2014-01-09 19:33:15
Whats the game map array I havent got that
21  Games Center / Cube World Projects / Re: How to add noise on: 2014-01-09 19:18:17
Ok have no idea but what the hell
22  Games Center / Cube World Projects / Re: How to add noise on: 2014-01-09 17:55:07
These help a bit but i need some help on how to add these to my code
23  Games Center / Cube World Projects / How to add noise on: 2014-01-09 16:34:46
Hi this is my voxel engine so far...

This is my chunk class - http://pastebin.com/W64LSh07
This is my main game class - http://pastebin.com/axULjzRt

Could someone please tell me how to add random noise to this engine, so my voxels have different heights thus making random generation, I have looked a simplex noise i just dont know how to add it to my engine

Thanks Toby
24  Game Development / Newbie & Debugging Questions / Re: Problem in Game Engine on: 2013-08-23 14:03:00
Well it is a game engine for home use and I have looked at the javahub but I would then need to change all my code and add more classes but I dont have time. So I would rather do the small changes as a temporary solutions then come back to the problem.
25  Game Development / Newbie & Debugging Questions / Re: Problem in Game Engine on: 2013-08-23 11:22:55
Thats what I do i check the buferedImage 2 first time create it second time print the err message.
26  Game Development / Newbie & Debugging Questions / Re: Problem in Game Engine on: 2013-08-23 10:40:19
Ha anybody got a idea yet I have been working on this for hours and still cant find the bug. It needs to done by 1
27  Game Development / Newbie & Debugging Questions / Problem in Game Engine on: 2013-08-23 09:47:03
I Have this problem in my game engine where I am trying to create a double buffering image and it keeps saying null. I have tryed to debug but still cant get this to work. I only have today to get it to work so I would love it if you fix it thanks Toby.

Code here https://www.dropbox.com/s/25wm2wcaz77awkg/Eclispe%20Workspace.zip
28  Discussions / Community & Volunteer Projects / Re: Need A Artist on: 2013-07-01 06:14:03
I know but I am bored of making 2d mincraft. And anyway a remake of minecraft isn't going to go anywhere. People don't want to play the same but 2d. My idea is a sidescroller game with adventure and a bit of RPG in it.
29  Discussions / Community & Volunteer Projects / Need A Artist on: 2013-06-30 14:26:15
Hi guys this it Toby here. A little background into me. I have been programming for 1 and a bit years now. I am only 14 but have intermediate experience in Java. I have been testing and learning new things to expand my Java knowledge ready to build a nice looking game. This is now the chance to make this game. I am looking for a artist who can make good looking 2d and 2d sprites and also walk animations. If you have any experience in Java that would help a lot as well. If you would like the opportunity I would love it and can you please email me at tobydrane@btinternet.com

Thanks Toby. I will send you my ideas if you email me.
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (19 views)
2014-09-24 16:12:06

Grunnt (45 views)
2014-09-23 14:38:19

radar3301 (27 views)
2014-09-21 23:33:17

BurntPizza (63 views)
2014-09-21 02:42:18

BurntPizza (33 views)
2014-09-21 01:30:30

moogie (41 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
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!