Git Product home page Git Product logo

toycaster's People

Contributors

samulus avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

toycaster's Issues

Compiling errors when using the command

HI dear author,
It's truly a honor to write a letter to you, I'm building your project nowadays and found the error when building as following, I wonder if there is a chance that you know the reason? :)

image

thank you
best regards to you
William

Tracking player position

Whenever the user presses 'W', 'A', 'D', 'S' we should allow them to move around.

Steps

  1. Spawn player at designated spawn point in map data
  2. Allow the player to walk around the scene without going out of bounds

Rendering Minimap

I need the ability to render a minimap on screen so that we can track the player location and ensure that rotations / movement is working. We can split this into the following discrete steps:

  • Storing each map in an external text file
  • Reading the file into a 2D structure
  • Generate a bitmap using the 2D array
  • Display bitmap onscreen
  • Display player position on minimap

Generating The Bitmap

Each block in the map is a wall. We consider each wall unit to be at least 1 meter long. Let's ignore
resolution independence and implement the simple solution.

  1. Create a (numRows * blockSize) x (numCols * blockSize) RGBA 2D matrix
  2. For each tile in the map, draw a blockSize * blockSize color coded block in the image.

Add 2D representation of map

The player should be able to walk around a 2D world and have the game track the player position. Things we need:

  • Some way of rendering the minimap
  • Detecting player movements

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.