Skip to content

Commit

Permalink
feat: revision 0.0.17 (#3)
Browse files Browse the repository at this point in the history
* adjusts to run
* balance pong
* new love functions
* start docs workflow
* first run https://github.com/2bt/gorge (only menu)
* key config in love.json
* start npm package
* bump to 0.0.17
  • Loading branch information
RodrigoDornelles authored Dec 25, 2024
1 parent fb9fab0 commit 552cb1a
Show file tree
Hide file tree
Showing 7 changed files with 410 additions and 11 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: cd

on:
workflow_dispatch:
push:
tags:
- "*.*.*"

permissions:
id-token: write

jobs:
npm:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@master
-
uses: actions/setup-node@v2
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
-
run: |
npm run build
-
working-directory: ./dist
run: |
npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39 changes: 39 additions & 0 deletions .github/workflows/DOCS.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: docs

on:
workflow_dispatch:
push:
branches:
- main

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
doxygen:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@master
-
run: |
mkdir -p vendor
wget "https://raw.githubusercontent.com/gamelly/gly-engine/refs/heads/main/tools/doxygen_filter.lua" -O vendor/doxygen_filter.lua
-
run: |
docker run --rm -v $(pwd):/app -w /app rodrigodornelles/doxygen:lua doxygen
-
uses: actions/configure-pages@v3
-
uses: actions/upload-pages-artifact@v2
with:
path: 'html'
-
id: deployment
uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Custom Configs
DOXYFILE_ENCODING = UTF-8
PROJECT_NAME = "LoveEngine"
PROJECT_NUMBER = 0.0.16
PROJECT_NUMBER = 0.0.17
PROJECT_BRIEF = "Love2D Framework for homebrew games"
PROJECT_LOGO =
GENERATE_RTF = NO
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<h1 align="center">
<a href="#consoles-joystick"><img width="60%" src="https://raw.githubusercontent.com/gamelly/love-engine/refs/heads/main/assets/banner3.png"></a>
<a href="https://gamelly.github.io/love-engine"><img width="60%" src="https://raw.githubusercontent.com/gamelly/love-engine/refs/heads/main/assets/banner3.png"></a>
</h1>

> Reimplementation of the love2d framework to make homebrew games to gba, nds, wii, ps2 and many other platforms!
Expand All @@ -13,11 +13,32 @@

#### Desktop / Others :computer:

- [X] [HTML5](https://www.npmjs.com/package/@gamely/love-engine)
- [ ] [SDL2](https://github.com/gamelly/core-native-sdl)
- [ ] [Arduino](https://github.com/gamelly/core-native-arduino)
- [ ] [Terminal](https://github.com/gamelly/core-native-ascii)

## Documentation

- [Online IDE](https://playground.gamely.com.br)
- [Building using cmake](https://docs.gamely.com.br/group__native#cmake)
- [Supporting Love2D from scratch](https://docs.gamely.com.br/group__manual)


## Configuration

* create a `love.json` in in the same folder as the game.

```json
{
"key_a": "z",
"key_b": "x",
"key_c": "c",
"key_d": "v",
"key_menu": "p",
"key_up": "w",
"key_left": "a",
"key_down": "s",
"key_right": "d"
}
```
22 changes: 22 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"name": "@gamely/love-engine",
"version": "0.0.17",
"author": "RodrigoDornelles",
"license": "Apache-2.0",
"homepage": "https://docs.gamely.com.br",
"repository": "https://github.com/gamelly/love-engine",
"funding": "https://github.com/sponsors/RodrigoDornelles",
"bugs": "https://github.com/gamelly/love-engine/issues",
"description": "Game Engine written in 100% lua that runs in a vacuum.",
"main": "dist/main.lua",
"scripts": {
"build": "rm -Rf dist;mkdir -p dist/dist;cp src/main.lua dist/dist;cp package.json dist;cp README.md dist"
},
"keywords": [
"game engine",
"game",
"engine",
"love2d",
"love"
]
}
7 changes: 5 additions & 2 deletions samples/pong/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,23 @@ local game = {
player_pos = 0,
ball_pos_x = 0,
ball_pos_y = 0,
ball_spd_x = 500,
ball_spd_y = 300,
ball_spd_x = 0,
ball_spd_y = 0,
score = 0,
player_size = 0,
ball_size = 0
}

function love.load()
game.score = 0
game.highscore = math.max(game.highscore, game.score)
game.player_pos = love.graphics.getHeight() / 2
game.ball_pos_x = love.graphics.getWidth() / 2
game.ball_pos_y = love.graphics.getHeight() / 2
game.player_size = math.min(love.graphics.getWidth(), love.graphics.getHeight()) / 8
game.ball_size = math.max(love.graphics.getWidth(), love.graphics.getHeight()) / 160
game.ball_spd_x = game.ball_size * 100
game.ball_spd_y = game.ball_size * 75
end

function love.update(dt)
Expand Down
Loading

0 comments on commit 552cb1a

Please sign in to comment.