Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (558)
Games in Android Showcase (150)
games submitted by our members
Games in WIP (602)
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: AI on: 2015-01-12 18:58:26
So I reading that I should use the angle of reach equation?
2  Game Development / Newbie & Debugging Questions / AI on: 2015-01-11 18:25:22
So here I have a simple game which has a player and some enemies. What I want to happen is the enemies to jump when they have a block in front of them just like a player would. I have rectangles for all the sides of the walls and the enemy. I have gravity but how would I add this jumping.

Thanks Toby

3  Game Development / Newbie & Debugging Questions / Re: Libgdx Rotate a sprite 90 degress on: 2014-12-27 14:58:26
Any help?
4  Game Development / Newbie & Debugging Questions / Re: Libgdx Rotate a sprite 90 degress on: 2014-12-25 16:48:05
Thanks for the help it's just I really struggle at the logic, could you put it into code or even pseudo code that would be really appreciated.

Thanks, Merry Christmas
5  Game Development / Newbie & Debugging Questions / Re: Libgdx Rotate a sprite 90 degress on: 2014-12-24 18:57:00
So thank you that was a little better, I am trying to have it rotate like this. I have got a shape with 4 sides and when I touch the screen I want it to rotate like like what they have.

http://gamejolt.com/games/arcade/shapedown/29861/
6  Game Development / Newbie & Debugging Questions / Re: Libgdx Rotate a sprite 90 degress on: 2014-12-24 18:46:42
Okay so mark 2, when I press once, the sprite just constantly rotates fast and doesn't stop, although looking cool its not what I wanted.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
    private float degrees = 0.0f;
    boolean rotating = false;
    private void rotateSprite(float delta) {
       if(Gdx.input.isTouched() & !rotating) {
          rotating = true;
       }

       if(rotating) {
          degrees += delta * 1;
          if(degrees != 90.0f) {
             AssetLoader.shapesGridSprite.rotate(degrees);
         }else {
            degrees = 0.0f;
            rotating = false;
         }
       }
7  Game Development / Newbie & Debugging Questions / Re: Libgdx Rotate a sprite 90 degress on: 2014-12-24 18:38:45
1  
2  
3  
4  
5  
6  
7  
8  
9  
    private float degrees = 0.0f;
    private void rotateSprite(float delta) {
       if(Gdx.input.isTouched()) {
          degrees += delta * 1;
          if(degrees != 90.0f) {
             AssetLoader.shapesGridSprite.rotate((float) Math.toRadians(degrees));
         }else degrees = 0.0f;
       }
    }


I have this and what happens is if I want it to rotate I have to hold the screen down.
8  Game Development / Newbie & Debugging Questions / Libgdx Rotate a sprite 90 degress on: 2014-12-24 18:27:52
I have my sprite which I want to rotate 90 degrees on ever touch. I dont want the rotation to be instant I would like it to be fade 90 degrees if you get what I mean. I get the coding its just the logic I struggle with, thanks Toby.
9  Discussions / Miscellaneous Topics / Android App survey on: 2014-12-10 18:27:28
Here is just a quick survey that I would really appreciate if you you would fill it out thanks

http://goo.gl/forms/oGZgZcjkfm
10  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
11  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
12  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
13  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
14  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
15  Game Development / Newbie & Debugging Questions / Re: Voxel Destroy Item on: 2014-07-29 10:08:53
Okay Okay
16  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.
17  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
18  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.
19  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
20  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.
21  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
22  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
23  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
24  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!
25  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
26  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();
    }
}
27  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
28  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!
29  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
30  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
Pages: [1] 2
 
Pippogeek (18 views)
2015-03-05 14:36:23

Pippogeek (14 views)
2015-03-05 13:56:12

Pippogeek (12 views)
2015-03-05 13:55:41

Pippogeek (14 views)
2015-03-05 13:23:02

Pippogeek (14 views)
2015-03-05 13:15:28

Pippogeek (10 views)
2015-03-05 13:15:04

Pippogeek (17 views)
2015-03-05 13:13:24

Pippogeek (21 views)
2015-03-05 13:11:33

BurntPizza (47 views)
2015-02-27 06:09:35

BurntPizza (36 views)
2015-02-27 05:56:17
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27
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!