Giter Club home page Giter Club logo

pseudo-3d-racer's Introduction

Pseudo-3d-Racer

This repository contains the source code of my racing game prototype.

Divided into several parts, this project shows how to create a complete retro-style arcade game like Outrun from scratch, step by step.
It's an old school pseudo 3d racer, where your goal is to drive a car, as fast as possible through heavy traffic.

The game is programmed in Javascript using Phaser 2 framework.

Visit official website:
https://www.askforgametask.com

Visit my Youtube channel:
https://www.youtube.com/channel/UCj51CLgyTsILVHbGL6wvQeg

Part 1 - Straight Road

This part covers the following topics:

  • initializing a new Phaser game
  • creating the main game loop
  • implementing 3d projection
  • building a straight road
  • rendering the road

Watch the video (episode 1):
https://youtu.be/6td_zpQC1U4

Part 2 - Adding Player

This part covers the following topics:

  • creating the Player class
  • updating the camera to follow the player
  • adding a clipping line to render only segments above it
  • making the road to correctly loops back

Watch the video (episode 2):
https://youtu.be/ZV23PaCSyS8

How to run the game

Since the game is written in Javascript, it runs directly in a web browser.
To run it locally on your computer, you need a local web server.

Here are the instructions how to use the XAMPP web server to run this game (if you already have some server installed on your computer then skip to the step 3):

  1. install XAMPP on your computer (for instance in C:\Xampp folder)
  2. configure and run the server (read the server's manual or help if you don't know how to do that)
  3. navigate to the server document root: C:\Xampp\htdocs
  4. create a new folder called 'pseudo3d_racer': C:\Xampp\htdocs\pseudo3d_racer
  5. download the project from this repository
  6. copy all files directly in C:\Xampp\htdocs\pseudo3d_racer
  7. now you should have the following folder structure:
    C:\Xampp\htdocs\pseudo3d_racer
    • \source
      • \assets
      • \libs
      • \part1
  8. to run the part 1, open a web browser and navigate to
    http://localhost:<port>/pseudo3d_racer/source/

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.