Giter Site home page Giter Site logo

codenmore / new-beginner-java-game-programming-src Goto Github PK

View Code? Open in Web Editor NEW
133.0 133.0 157.0 215 KB

The "New Beginner Java Game Programming Tutorial Series" - contains every episode's individual source code!

License: Creative Commons Zero v1.0 Universal

Java 100.00%

new-beginner-java-game-programming-src's People

Contributors

codenmore avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

new-beginner-java-game-programming-src's Issues

Game not starting properly

Description of the bug :
When the game starts, the window opens but nothing happens afterwards.

To Reproduce :
Step to reproduce the behavior:

  • Create a Runnable JAR file or the Tile game
  • Double clic the Runnable JAR file to launch it

Expected behavior :
I expected the game to launch to play it.

Screenshots :
Here is the screenshot of the game... An amazing one...
paper world v_indev-1 0 2019-01-04 15_29_08

Environment :

  • OS: Windows 10

implement jump player logic

hi, in the meantime I would like to thank you for the work you have done, and one question, would it be possible to implement the player jump? I tried, but the jump key I associated acts like the left and right key and my player still flying when the jump key is hold, so how can this be done? thanks in advance for your reply, very kind

Why are you never using spawnX and spawnY from your World class?

You would have to change the World Loader and the Player creation in your Gamestate class

  • Gamestate Constructor change:
public GameState(Handler handler) {
		super(handler);
		world = new World(handler, "res/worlds/world1.sjw");
		handler.setWorld(world);
		player = new Player(handler, handler.getWorld().getSpawnX(), handler.getWorld().getSpawnY());
	}
  • World loader change:
private void loadWorld(String path) {
		String file = Utils.loadFileAsString(path);
		String[] tokens = file.split("\\s+");
		width = Utils.parseInt(tokens[0]);
		heigth = Utils.parseInt(tokens[1]);
		spawnX = Utils.parseInt(tokens[2]) * Tile.TILEWIDTH + (Tile.TILEWIDTH / 4);
		spawnY = Utils.parseInt(tokens[3]) * Tile.TILEHEIGHT + (Tile.TILEHEIGHT / 4);
		tiles = new int[width][heigth];
		for(int y = 0; y < heigth; y++) {
			for(int x = 0; x < width; x++) {
				tiles[x][y] = Utils.parseInt(tokens[(x+y*width) + 4]);
			}
		}
	}

With this code, you can have for example the numbers 3 and 3 in your world file and the player will spawn at your 3 tile.

Where's Episode 34?

I like all you're tutorials and stuff but I need the inventory screen and source code!

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.