Skip to content

yardenmezi/LuaGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Giraffe Game

Screen Shot 2024-11-01 at 11 35 14 AM

Welcome to Giraffe Game! This game is built with Lua and LÖVE 2D. Jump, avoid obstacles, and gather collectibles to reach the highest score!

This game is a work in progress. It started a few years ago and is now actively maintained and improved. Expect regular updates as new features are added, bugs are fixed, and gameplay is refined!


Features

  • Characters and Enemies: Control a customizable avatar, and encounter butterflies, birds, and worms.
  • Sound and Animation: Engaging music and sound effects, with sprite-based animations.

Getting Started

To play this game, you’ll need:

  • Lua: The scripting language used to build the game logic.
  • LÖVE 2D: A framework for 2D game development in Lua.
  1. Download and Install LÖVE 2D
    Get LÖVE from the official LÖVE website, and follow installation instructions for your operating system.

  2. Clone the Repository

  3. Run the Game with LÖVE
    Use the following command to launch the game:

    love .
    

Enjoy!

Description of image

Development

Class Structure in Lua

Since Lua does not have a built-in "class" construct, object-oriented programming concepts such as inheritance are achieved through metatables. For example, the Butterfly class is defined as follows:

Butterfly = {}
Butterfly.__index = Butterfly
setmetatable(Butterfly, {
  __index = Still,
  __call = function(cls, ...)
    local self = setmetatable({}, cls)
    self:init(...)
    return self
  end,
})

Bug Reporting

Everyone is free to report bugs, suggest fixes, and share ideas for improvements. Your feedback is invaluable in making this game better. Please open an issue on GitHub for any bugs or suggestions.

Credits:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages