Giter VIP home page Giter VIP logo

pac-plus's Introduction

Pac plus

codecov

Development

Initial

git submodule update --init --recursive

./vcpkg/bootstrap-vcpkg.sh

./vcpkg/vcpkg install

Git Hooks

It is suggested to install git hook for style linting before code committing. This project is configured with pre-commit.

Installation steps:

pre-commit install --install-hooks -t commit-msg -t pre-commit

clang-format

This project utilizes the tool clang-format to automatically format the code in a consistent and readable manner. clang-format is a powerful tool that uses predefined styles or can be customized via a configuration file ( .clang-format) in the project root directory.

Install on macOS

brew install clang-format

Format the specified file

clang-format -i <your_file>

# or you can format the whole project with the command below
find src test include -name "*.cpp" -o -name "*.h" | xargs clang-format -i

clang-tidy

clang-tidy is a clang-based C++ "linter" tool that provides an extensible framework for diagnosing and fixing typical programming errors. It's an essential tool in this project that helps maintain the code quality.

Install on macOS:

brew install llvm

Recommend Use the command to heck the specified file with compile_commands.json, which is generated after running cmake:

clang-tidy -p <build_folder_include_compile_commands.json> <your_file.cpp>

Also, you can use the command below to check the whole project:

python3 run-clang-tidy.py -p <build_folder_include_compile_commands.json>

To see more details about run-clang-tidy.py, https://clang.llvm.org/extra/doxygen/run-clang-tidy_8py.html

You can apply -f as the command below to auto fix:

python3 run-clang-tidy.py -fix -p <build_folder_include_compile_commands.json>

Alternative Method: If compile_commands.json is not available or cannot be generated, you can still use clang-tidy to check a specific file. Note that in this case, we are assuming that your include directory is in your current working directory.

clang-tidy <your_file.cpp> -- -Iinclude

Debug

cmake --preset=debug .

cmake --build debug

./debug/main

Release

cmake --preset=release .

cmake --build release

./release/main

pac-plus's People

Contributors

chienaeae avatar

Watchers

 avatar

pac-plus's Issues

Font Wrapper

  • New Font class wrapping TTF_Font

Font should have a TTF_Font member and LoadFromFile(std::string) (inherit Resource abstract class - not yet implemented).
There could be a Text class (Object) to have Font Component (which consisting of Font) in future.

Object Collection

Add a ObjectCollection for organizing objects in each scene. This could be enhanced by having a ObjectPool class.

New `Game` module

  • Add a Game module
  • Add delta time to game loop update
  • Add LateUpdate
  • Refactor Game class method naming convention

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.