v0.2.0 "Liberty"
Release v0.2.0 "Liberty" is here! This is a BIG update that I'm very excited about, as it has pretty much all you need to publish a small game. Why "Liberty"? Because now you can have some freedom from the grid layers with traditional free layers, while getting useful utilities for the former. You now also have more control over sprite drawing. Oh and levels, no need to be confined to a single view/scene.
Check out CHANGELOG.md and https://pkg.go.dev/github.com/greenthepear/egriden.
Changes:
- Added free layers which allow you to place and draw objects anywhere on the screen according to their XY coordinates.
- Added levels, an interface for them and methods for
BaseLevel
.(*EgridenAssets).InitEgridenAssets()
now creates a default level.(*EgridenAssets).InitEgridenAssets()
was renamed from(*EgridenAssets).InitEgridenComponents()
.
- Added methods for deleting and moving Gobjects within a grid layer:
(*GridLayer).DeleteAt()
,(*GridLayer).MoveGobjectTo()
. - Added
(SpritePack).DrawOptions
field and(Gobject).SetDrawOptions
method, allowing you to customize rendering of sprites usingebiten.DrawImageOptions
. You can now also apply offsets for sprites with the new(Gobject).SetDrawOffsets()
method. - Added
(GridLayer).IsXYwithinBounds()
,(GridLayer).IsScreenXYwithinBounds()
,ScreenXYtoGrid()
andSnapScreenXYtoCellAnchor()
to make interactions between the screen (cursor) and grid layers easier. - Removed
baseGobjectWithoutScripts
, you can use the new(BaseGobject).OnDrawFunc
and(BaseGobject).OnUpdateFunc
fields to assign scripts, which are nil by default. - Made layer selection methods return nil instead of panicing if z is out of bounds.
- Renamed
(*GridLayer).AddObject
to(*GridLayer).AddGobject
. - More tests and bug fixes.
- "Updated" to go v1.22.3 and Ebitengine v2.7.3.
- Updated localization files.