Giter Club home page Giter Club logo

pokemon-demo's Introduction

Pokemon-Demo

Note to Reader: This project was developed when I was in high school and therefore does not reflect my current expertise. I have made minor updates to the project since then, but the majority of the codebase remains unchanged from the original version.

Video game (Pokemon Clone) made completely from scratch and in C, just like @ Handmade Hero. Disclaimer: I do not own any of the assets used in this project (images and sound used); these are the intellectual property of Nintendo.

To play the game, you can head over to https://pokemondemo.ncabral.ca/.

image

Controls

  • W, A, S, D to control the player.
  • Z to interact with things (this button can be thought of as equivalent to the A button in most video games).
  • Press F to toggle fullscreen mode.
  • Only on Windows: Use L to start a "recording". L again to stop and enter playback of the recording. L again to exit playback and return normal control to the player.

Features

  • Game Modes: includes Overworld, Battle, and Start Menu.
  • Player movement and collision with world.
  • Interactable overworld entities:
    • NPCs: player two, Mom (who heals your Pokemon).
    • items: pokeballs, signs, and doors.
    • overworld Pokemon: Arceus.
  • Wild Pokemon encounters in the tall grass.
  • Smooth overworld camera.
  • Sprite animation: player and Pokemon during battle.
  • GUIs: dialogue box with animated text rendering, battle menus and overlays.
  • Controller support. The controller controls player two.
  • Two easter eggs.
  • Accurate battle mechanics w.r.t. original games.
  • Support for fullscreen animation effects (e.g., when entering a battle).
  • Tilemap rendering including multiple layers.
  • Sound effects and background music.
  • Gain experience points and level up your Pikachu.

Windows Only

Hot-reloading: The game is compiled into a DLL, which allows certain portions of the code to be modified and reloaded while the game is still running.

Live Loop Recording: This feature enables the player to capture a snapshot of the current state of the game and record their input actions from that moment. Once recorded, the game will replay the recording. This allows for easy repetition of actions or sequences in the game, which can be useful for debuggin and demonstrations.

Tools: I created tools to help manage the game assets. Documentation for these tools can be found here

Steps for Building

Web

The platform layer of the project has been rewritten via the popular https://www.raylib.com library to support building for the web. The following instructions assume that the host machine is Unix-like. They have been tested on macOS.

./build_web.sh

This will generate all needed files in build/raylib/surge. To run the web app, use

./run_web.sh

This will launch a server on your local machine via emrun to serve the static site. emrun should launch your browser as well.

macOS

The macOS version of the game also leverages raylib. Simply run

./build_macos.sh

This will generate all needed files in build/macOS. To run the game, use

./run_macos.sh

Windows

The windows build does not use raylib. The platform layer is written with native win32 code.

Thus, you will need to install Visual Studio, if you haven't already. At the time of writing, the latest version is 2022, so I cannot guarentee proper building for any subsequent versions. Also note that if your visual studio version is different than 2022, you will need to change shell.bat accordingly.

After installing visual studio, clone this project and run the following commands (in command prompt, not powershell). This will set up the visual studio compiler for use on the command line via the "cl" command. The build.bat script takes care of compiling the platform layer and the game.dll

$ shell.bat
$ build.bat

To run the project

$ cd build\windows
$ win32_PokemonDemo.exe

pokemon-demo's People

Contributors

blubloos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

pokemon-demo's Issues

Alpha v0.1.0

  • Add save game
  • Swap Poke in battle
  • Be able to run from battle
  • Remove jitter from player when stand still and camera catch up
  • figure out how the license works

add ImGui

try doing something like offline rendering with Vulkan.
because need some renderer backend for ImGui to do its magic.
and seems there is no CPU backend

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.