Skip to content

paC Man written in hell hard C language, school project

License

Notifications You must be signed in to change notification settings

KAIYOHUGO/hell_paC_man

Repository files navigation

Hell pa🇨 men

wakatime

Hell is not bad but you know heaven exist.

C & Cmake is not bad but you know other language exist.

menu

What is this???

Note

Disclaimer : This is not relate to any religion. The code base name eva / evangel is just a inner joke. The copyright info of audio is in copyright info section

This is a school project, It is required to be written in C. The road map is the requirement of the project.

This repository contain 2 part, evangel (ecs) and main (game).

No, I'm not a C programmer, and this project cause some "C" pollution in my github. (Bad joke, i know)

Getting Start

You need bazel and just and any unix* environment

Make sure you terminal is at lease 67 lines and 240 columns, you can use following command to check.

$ tput lines cols

I recommand use Alacritty or Wezterm for better experience. Then run

$ just

The game should start automatically

All command

$ just -l
Available recipes:
    debug-build          # debug build all project
    gen-compile-commands # Generate compiles_commands.json for clangd extension, for more info https://github.com/hedronvision/bazel-compile-commands-extractor
    memtest file         # run memory test, output is `valgrind-out.txt`
    run                  # run main project (game)
    test-all             # test all project

Key Map

  • ⏎ Enter Confirm Input
  • ⎋ ESC Back to menu / Exit Game
  • Space W S Change Mode
  • W A S D Move player

Roadmap

  • Basic Parts (40%)
    • The map system (15%)
    • The booster system (10%)
    • Pointers (5%)
      • You can not use external/global variables
    • Pointers and Array (5%)
      • Use malloc for the map
    • Functions (5%)
      • A clean main function (you need to distribute most of the statements to different functions and only keep the function calls in the main function)
      • Don’t place the main function in strange places
  • Extra Parts (40%)
    • Others (20%)
    • Clean code architecture (5%)
    • Detailed comments (5%)
    • Clearly explain your codes during the demonstration (5%)
    • Working with GenAI Tools in a creative way and providing descriptions of the collaboration process in the code comments (5%)

Basic Part

  • Player can enter the number of width and length of the map
  • Generate Map by using rand()
  • Press w, a, s, d to move P around with 1 step
  • player can move P to get S and B
  • Player need get all S to win the game
  • Display win message in win stage
  • Win menu prompt player to start a new game or terminate the program.
  • Design your formula to calculate the appropriate number of S, B, and M base on size of map
  • When P encounter M reduce life by 1
  • If life == 0, player lose
  • After P move, M will move 1 step by using rand()
  • Determine booster type by rand()
  • Freeze booster : pause M movement for 3 turn
  • Less monster booster : despawn 1 M
  • Extra live booster : increase life by 1

Extra Part

There are many ways to enhance the overall gaming experience of Pac-Man. One way is to incorporate additional features that can make the game more challenging and exciting. For instance, you can create a level system that increases the game's difficulty as the player progresses and achieves higher scores. You can also incorporate background music and graphics to enhance the game's visual and auditory appeal. Furthermore, adding special sound effects for specific events can add a new dimension to the game's overall experience. The main objective is to create an enjoyable game that not only entertains the players but also encourages them to explore and learn new C-based libraries to implement advanced functions. Please refer to the grading guidelines provided in the grading section for more information.

ECS : evangel

ecs

Game

game

Code Design

  • V{Structure Name} is a Trait (VTable)
  • P{Structure Name} is a Pointer of VTable (self*, VTable*)
  • C{Structure Name} is a Collection of method of {Structure Name}
  • hook_{Function Name} is a Hook call by engine

Naming

  • StructureUpperCamelCase
  • EnumUpperCamelCase
  • EnumUpperCamelCase_VariantUpperCamelCase
  • ItemMacroUpperCamelCase
  • function_snake_case
  • Type(FakeGeneric)
  • fake_typed_function_macro_snake_case
  • OverLoadingMacroCamelCase

Copyright Info

  • Bandai Namco Entertainment
    • beginning.wav
    • booster.wav
    • death.wav
    • eat.wav
    • ghost_dead.wav
    • siren.wav
    • walk.wav
  • Generate
  • Made by myself
    • All pixel art

References

Resource

About

paC Man written in hell hard C language, school project

Topics

Resources

License

Stars

Watchers

Forks