hi I am following a tutorial which shows how to create tileMap game in java. But i cant seem to understand some of the methods and variables. main code i post it on pastebin.com take a look.

problem is I cant seem to understand what is method calculateCorners is doing.

[ code deleted pending confirmation that OP has copyright/permission JC]

first question is:
i understand that topLeft, are booleans to check if player can move there or not. But why only 4 boolean? dont you need "top, topLeft, topRight, etc" what is player just jump up? than dont you get boolean "top".

2nd question is:
can you guys explain "int leftTile, rightTile .. etc" variables?

also why we are doing (x-width/2)?

also try to explain as much as you can bc i dont understand this.

Edited by JamesCherrill: YOu must own copyright in what you post

3 Years
Discussion Span
Last Post by JamesCherrill

You really should be asking these questions of the person who wrote the tutorial.

But more seriously: Do you have the copyright owner's approval to post that code here? if you cannot confirm that a.s.a.p. I'm afraid I will have to delete it.

Edited by JamesCherrill

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.