Moondust Engine

The PGE Engine is part of the PGE project, and allows users to play episodes and levels.

Development

 * 0.0.1-pre-alpha....0.0.6-pre-alpha, The first executable test application has a basic physics system and is able to read and play levels alongside being able to display blocks, BGOs, and backgrounds, but without NPCs and effects. Utilizing the Box2D physics engine, work on developing an engine has begun. It is possible to use warps, though with lack of a visual entering/exiting effect. The player's character is only represented by a blue rectangle. It is also possible to travel between levels by using level-to-level warps. Also implemented, is a message box system, which is able to display special characters in different languages.
 * The 0.0.7-pre-alpha adds partial support for a type of world map, though without any texture rendering.
 * Starting from 0.0.8-pre-alpha the engine is finally able to render animated playable characters. It also contains an early implementation of a sound and music system, allowing the engine to play sounds and music in the world map.
 * In the levels, some sounds are played but actual music is only first implemented in 0.0.9-pre-alpha.
 * 0.0.10 now has the engine supporting complete world map rendering, along with improvements and fixes in the physics department.
 * 0.0.11 The engine can now render NPC graphics and do an iteration of their movements.
 * 0.1-Alpha This version brings with it the introduction of a brand-new, programmed from scratch physics engine that replaces Box2d.
 * 0.2-alpha has a basic NPC-AI system where NPCs are can be coded in lua. It also has support for placing items from the editor inside the engine.
 * 0.2.2.2-alpha gets a forked SDL Mixer library named "SDL2_Mixer_ext". This adds support for OGG files with looped fragment.
 * 0.2.2.4-alpha has a working events system that includes better auto-scrolling, except "Game end", "Player controls" and "Layer movement" event actions.
 * 0.2.4-alpha has features such as a world map path opener (which opens paths at a level's completion), has a more advanced NPC-AI system and adds new things like the ContactDetector, ability to spawn any other NPC, full-featured NPCs transformation and more!
 * 0.2.5-alpha is a bugfix update that includes internal optimizations and a performance boost
 * 0.2.5.1-alpha brings with it a big update of the Lua-API. The Player API is introduced which allows making a lua controller for playable characters, allowing it to be more interactive, adds new functions and events for NPCs, onHarm and onKill events are exchanged alongside multiple bug fixes. Since this version, the roles of the 7, 8, 9, 0 keys are changed: 7 decreases the number of playable character, 8 increases, 9 decreases number of playable character state, 0 increases. The cannon-exiting pipe is also introduced.
 * 0.2.6-alpha introduces a new physical engine which improves slopes physics. The Lua API is implemented which allows loading external images and support is added for HUD drawing. This is alongside an added API to spawn better effects and allows NPCs to get information about the spawning path.

Planned Features

 * Start menu screen improvement.
 * Save/Load game saves with an episode intro screen for selecting the player's character and recent game save file.
 * Improved camera and an ability to switch playable characters and states in real time.

Improvements when compared with the original SMBX Game engine

 * The PGE Engine has a configurable TPS which can be used with V-Sync.
 * Less CPU load which allows playing games within the PGE Engine together with background programs or on slow PCs.
 * Cross-platform support: Linux, Windows, Mac OS X. The original SMBX is Windows only.
 * World maps can have music boxes with custom music.
 * After a game save in a hub-based episode, the player resumes the game from the most recent warp instead of the start point of the hub.
 * Autoscroll can work in multiple sections and can be launched from any event and from any section independent to the start of the level. Autoscroll can be launched inside another section while a player starts from a non-scrollable section. A player repeats the whole path inside auto-scrollable sections when they enter inside again.
 * Screen fade effects between sections and between different screens of a game: level<->world map<->main menu
 * Unicode-supported message boxes which can print text in any available language (but still requires additional font maps to have a fine render of raster text).
 * Message boxes, menu boxes have fade effects when they appear/disappear.
 * True semi-transparency support with alpha-channel
 * Built-in usage of OpenGL to render stuff
 * Built-in support for Lua scripts to have customized levels, NPC-AI, custom gameplay features, etc.
 * Less memory usage because the PGE Engine loads stuff dynamically based on the first request of a specific object (NPC, block, BGO, Effect, background, playable character sprite).
 * Faster loading time in comparison to SMBX.
 * Command-line support: You can run and play any level or episode by opening it with the pge_engine application.
 * With SDL Mixer X, the PGE Engine supports various music formats which can be used as built-in or custom in-game music.
 * Support for music with looped fragments (OGG only, but MIDI with loopStart/loopEnd or 111'th controller, Tracker Music and Game Music Emulators like NSF, SPC, VGM, HES, GBS, etc.).

Command line arguments
The PGE Engine supports command line arguments which allow launching in debug mode or run-playing levels or episodes. (Dragging and dropping a level or episode file into the PGE Engine application icon in a file manager that supports it will do this as well)

Command syntax:
 * --config "{path}" - allows you to define a specific configuration pack bypassing a config selection screen
 * --render-auto - automatically detect possible renderer in sequence: OpenGL 3, OpenGL 2, and then software render if both OpenGL tests are failed [works by default]
 * --render-gl3 - Use OpenGL 3.1 renderer (May not work on OS X)
 * --render-gl2 - Use OpenGL 2.1 renderer (Supports video cards which don't support non-pow-of-two textures)
 * --render-sw - Use software renderer (may overload CPU)
 * --render-vsync - Toggles on VSync if supported on your hardware
 * --lang=xx - Forces the PGE Engine to use a specific language instead of the default locale (where xx is the code of language you're trying to run the engine with. For example, en, ru, es, nl, pl, etc.)
 * --num-players=X - Starts the game with X number of players (Currently 1 or 2, support for a maximum of 4 players is planned. 4-players limitation is going for standalone Split screen game mode)
 * --pXc=Y - Set character Y for player X (for example --p1c=2 will set character with ID 2 to first player)
 * --pXs=Y - Set character state Y for player X (for example --p2s=4 will set character state with ID 4 to second player)
 * --debug - Enables debug mode (Game result will not be saved, and special debug features are will be allowed). This argument requires for any --debug-* argument.
 * --debug-physics - Enables debug of the physics hitboxes of all objects are will be shown:
 * Blocks [green]
 * BGO [blue]
 * NPC [magenta]
 * NPC's in-area detector trap [red]
 * Playable characters [pink]
 * Warp entrances [light-red filled]
 * Physical environment zones [yellow filled]
 * --debug-print=[yes|no] - Enables/Disables printing of the debug information (Debug information is possible to toggle on/off with F3 key)
 * --debug-pagan-god - Enables god mode
 * --debug-superman - Enables unlimited flying up
 * --debug-chucknorris - Enables ability to playable character destroy any object
 * --debug-worldfreedom - Enables ability to walk everywhere on the world map
 * filename - actual file path

Examples:

Start testing of a level file ( UNIX-Like: Linux, Mac OS X, etc. )

Start testing of a level file ( Microsoft Windows )

Start testing of a level file with specified configuration package ( UNIX-Like: Linux, Mac OS X, etc. )

Start testing of a level file with specified configuration package ( Microsoft Windows )

Start the PGE Engine with the interprocess mode

Print current version of PGE Engine

Videos

 * First demonstration
 * Warps and level wrap Functions Demo
 * Test walkthrough of hub-based episode on 0.0.2-pre-alpha
 * Long test of 0.0.7-pre-alpha
 * Gameplay Footage of 0.0.8-pre-alpha made by Bossedit8
 * Playthrough of v0.0.10 pre-alpha made by Bossedit8