How GameLib works
There are several base entities that constitute a game created with GameLib. They can be found as interfaces in the core GameLib module.
Gamerepresents a game application. It consists of one or more scenes, one of which is always active - it is shown in the game window.
Scenecan be described as a 2D game environment, consisting of a map (graphical representation of the environment), a collection of actors (entities within the environment), and a collection of actions (behaviour of either actors or environment).
Mapis a graphical representation of scene environment that consist of tiles (usually with dimensions of 16x16 pixels). May contain additional information, e.g., presence of walls or markers positioned on predefined areas.
Actorrepresents a game entity like a player, an enemy or an object. It has its position in the scene and is represented by a sprite created from the
Actionrepresents an encapsulated piece of actor's behaviour. All actions are executed by scene, one by one, each time the scene is going to be rendered on screen (usually, 60 times per second). After an action is executed, it may change its status to done, in which case it won't be executed again.
- [core] Provide
- [core] Fix for tiles outside map
- [framework] Fix Rotate action
- Fixed an issue with detecting intersects with walls.
- [core] Highlight actor at the top of container in
- [core] Add type parameters for actors to
- [core] Schedule new actions to be executed before older ones in
- [framework] Rename
- [framework] Add type parameters to
- [core] Fix processing of
- Expose overloaded constructor for
- Varargs method
setActorRenderOrder()changed to one accepting list of classes.
- Extracted interfaces for
- Changes in application construction.
- Varargs version of
setActorRenderOrder()is now deprecated as it causes unchecked operation warning. It is superseeded by method accepting list of classes.
Disposableobject that unschedules the action when its
dispose()method is called.
- Actor rendering order can be configured with method
- Animations expose index of currently shown frame and total number of frames.
- Updated documentation.
- Updated training map in Framework module.
- [core] Map tile objects.
- [core] Overlay drawings with configurable display time.
Loopaction that repeats wrapped action endlessly.
sceneis now nullable.
- [core] Scene setter on
AbstractActionmoved to correct package.
- [inspector] Inspector updated to 1.0.2 (fixes parameter order in operation invocation).
- Game now closes correctly and does not force call to
- Backend changed to LWJGL2 to prevent issues on Mac OS.
- Initial version of GameLib built on top of LibGDX.
How to update GameLib in your
project-ellen uses Gradle to manage its dependencies. The process of updating the GameLib library to a version
x.x.x is as follows:
- Open file
build.gradle.ktsfrom the root directory of your project.
- Change value of the
gamelibVersionvariable to the required version:
val gamelibVersion = "x.x.x"
- After the change the IDE will show a notification about required import of Gradle project changes. Click on Import Changes.