Skip to content
This repository was archived by the owner on Jun 28, 2023. It is now read-only.

Commit 03520dd

Browse files
example/spaceship: Add spaceship example game and refactor gml-go (#8)
* Update gml-go from current in-progress game * test: add "go get github.com/golang/protobuf" * various changes * Expose WindowWidth() / WindowHeight() / WindowScale() functions, Fix default instance layer creation for room Fixes #5 * example/spaceship: start spaceship example game * asset: Rename "assets" to "asset" and "sprites" to "sprite" for consistency with Go packages Fixes #4 * example/spaceship: minor structural tweaks * gmlgo: add WIP generator based on stringer Updates #9 * sprite: Start work on changing sprite functions to return SpriteIndex instead of *Sprite Updates #2 * sprite: change *Sprite to SpriteIndex (int) Fixes #2 * gmlgo: do more work on code generator, able to determine structs that embed gml.Object Updates #9 * example/spaceship: add bullet sprite and small ttf font * gmlgo: first working pass of the gmlgo code generator Updates #9 * gmlgo: get code generator working for sprite assets Updates #9 * collision: add CollisionRectList to check collisions against other instances and change objectIndex to be stored on the base object struct * room: Change room instance layer structs to be unexported and add some documentation to a few functions * room: remove Editor* functions, change opening room editor to be CTRL+R only if you're in debug mode and fix crash bugs with room editor * example/spaceship: add alarm system, use it to spawn enemy spaceships, add bullets destroying enemy ships, fix bug with collision checking not respecting destroyed objects, add player scoring system and replace font with easier to read font. * gmlgo: allow gmlgo to take in a parameter with the directory for travis ci and disable "go test" as there are no working tests currently Updates #30 * gmlgo: remove old broken benchmarking tests, update minimum Go version to 1.11 Updates #30 * gmlgo: add basic test for generating object meta data Updates #30 * gmlgo: remove "go vet" and focus tests on "cmd" folder only as no tests exist in "gml" yet Updates #30 * gmlgo: add missing dependencies to travis ci and maybe fix go install gml command Updates #30 * gmlgo: add testing debug and headless builds of game examples * gmlgo: fix .gitignore and commit missing asset * ci: add cache * doc: update README.md
1 parent da6f88a commit 03520dd

File tree

121 files changed

+8613
-1423
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+8613
-1423
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/cmd/**/*.exe
2+
/cmd/gmlgo/gmlgo

.travis.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
language: go
22

33
go:
4-
- "1.10"
4+
- "1.11"
5+
6+
# https://restic.net/blog/2018-09-02/travis-build-cache
7+
cache:
8+
directories:
9+
- $HOME/.cache/go-build
10+
- $HOME/gopath/pkg/mod
511

612
addons:
713
apt:
@@ -19,18 +25,30 @@ addons:
1925
- libxxf86vm-dev
2026

2127
install:
28+
# Underlying framework used
2229
- go get -t -v github.com/hajimehoshi/ebiten/...
30+
# Used by some structures
31+
- go get -t -v github.com/golang/protobuf/...
32+
# Debug Mode: Live file reloading (watch files for changes)
33+
- go get -t -v github.com/fsnotify/fsnotify/...
34+
# Debug Mode: Used for generating UUID's for room objects, etc.
35+
- go get -t -v github.com/rs/xid/...
2336

2437
before_script:
2538
- export DISPLAY=:99.0
2639
- sh -e /etc/init.d/xvfb start
2740
- sleep 3
2841

2942
script:
30-
- go build -v ./...
43+
- go install -tags debug -v ./gml/...
44+
- go install -tags headless -v ./gml/...
45+
- go install -v ./gml/...
46+
- go install -v ./cmd/gmlgo
47+
- gmlgo ./examples/spaceship
48+
- go build -tags debug -v ./examples/...
49+
- go build -tags headless -v ./examples/...
50+
- go build -v ./examples/...
51+
- go test -v ./cmd/...
3152
# NOTE(Jake): 2018-06-20
32-
#
3353
# No tests exist yet
34-
#
35-
#- go test -v ./...
36-
- go vet -v ./...
54+
#- go test -v ./gml/...

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) Jake Bentvelzen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Game Maker Language Go
22

33
[![Build Status](https://travis-ci.org/silbinarywolf/gml-go.svg?branch=master)](https://travis-ci.org/silbinarywolf/gml-go)
4+
[![Documentation](https://godoc.org/github.com/silbinarywolf/gml-go?status.svg)](https://github.com/silbinarywolf/gml-go)
5+
[![Report Card](https://goreportcard.com/badge/github.com/silbinarywolf/gml-go)](https://godoc.org/github.com/silbinarywolf/gml-go)
46

5-
**NOTE: This is currently a hobby project and not meant for any use other than my own. If you are interested in this or use this, please let me know so I can improve documentation, tagging, etc**
7+
**NOTE: This project is currently undergoing a large refactoring effort to help ease workflow and serialization. I'm also aiming to improve the documentation, add examples and improve test coverage. This is still just a hobby project for now!**
68

79
This is a library / framework that aims to create workflow like Game Maker, but utilizing the Go programming language.
810

@@ -14,11 +16,11 @@ go get github.com/silbinarywolf/gml-go
1416

1517
## Requirements
1618

17-
* Golang 1.10+
19+
* Golang 1.11+
1820

1921
## Documentation
2022

21-
* TODO when the library has progressed
23+
* TODO when this library has been refactored
2224
* [License](LICENSE.md)
2325

2426
# Rough Roadmap
@@ -33,10 +35,10 @@ This project is mostly for fun and I have no intentions to get anything done unl
3335
- This should cover installing "gofmt" / "goimports"
3436
- Transitioning from GML to Golang, major / minor differences
3537
* Add build tools to help with:
38+
- [x] Auto generating entity IDs and the like.
3639
- Packing assets into texture atlases
37-
- Converting Tiled maps into an internal engine format
38-
- (maybe) Auto generating entity IDs and the like.
3940

4041
## Credits
4142

42-
* [Hajime Hoshi](https://github.com/hajimehoshi/ebiten) for his fantastically simple 2D game library, [https://github.com/hajimehoshi/ebiten](Ebiten).
43+
* [Hajime Hoshi](https://github.com/hajimehoshi/ebiten) for their fantastically simple 2D game library, [https://github.com/hajimehoshi/ebiten](Ebiten).
44+
* [Yann Le Coroller ](www.yannlecoroller.com) for their free to use Helvetica style font.

0 commit comments

Comments
 (0)