Git Product home page Git Product logo

game-pencil-engine-editor's Introduction

The Game Pencil Engine Version 1.4.1 and beyond!

GitHub GitHub last commit

Discord

New files added to github, but does not currently compile to C++, pending a few changes

Please look at our Website and take a look around!

If you have any questions or comments: feel free to email us at [email protected]

Additionally, please report all bugs in the issues portion of the github page or use our Trello page.

Donate to make Game Pencil Engine greater

Work on this engine is not possible without funding. The amount of time it takes to update the codebases, create examples, tutorials and more is quite expensive. Please consider either a one-time or monthly donation to keep this engine going and more frequently updated.

We have a Patreon Page that you can help fund future developments of Pencil Engine and to help us kickstart new projects!

There is also a PayPal one time donation method as well.

I appreciate your generousity and moving this project forward.

Building

Please checkout our guide for building from source here.

Currently, only the SDL2 module is completed, but more are underway, for those unfamiliar with linking dependencies this will help you get Game Pencil running on Windows, Mac, Linux and FreeBSD.

Documentation

If you would like to see our documentation to this project, go here

Discord Chat

Discord

Come and join our discord server! Here, you can engage in chats about game pencil, get help and even voice chat the developers and users!

Forums

Become a member on our forum! Here, you can find help and talk directly with the developers of this project!

Download Newest Version

If you would like to download the newest version of the engine, go here

Coding with Game Pencil Engine

This editor is coded completely in C/C++ and uses a modular design for display, input, output and audio.

Currently, the first modular block is SDL2, with plans to expand to SFML, OPENGL and Vulkan in later updates.

Please note that using the .MP3/.MP4 formats is strongly not recommended due to licensing fees.

Building Game Pencil From Source Code

We have made a helpful guide on how to compile Game Pencil from source here

Developers

theweirdn8 and clee231

game-pencil-engine-editor's People

Contributors

clee231 avatar creikey avatar nhurde avatar timchoh585 avatar time-killer-games avatar vaelatern avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

game-pencil-engine-editor's Issues

Add GPE-Required-Versions to gpe engine and pawgui

As engine and pawgui evolves as well as modules, it will be important to dictate the actual preferred versions, their minimums, etc for each iteration of game, editor, module and more.

Two functions will be made for both engine, editor and gui:
version-required - the minimum version required of the engine or gui.
version-required-enforced - the version required of the engine or gui to work. if the version differs exit with a message that versions are different. This is only suggested in the event a variable is entirely removed or renamed.

libfiledialogs Git Submodule (Optional Dear ImGui File Dialogs Dependency)

what my thought on this was, it won't actually go inside your repository
as a git submodule it will be optional
they will have to specify git clone --recurse-submodules
without --recurse-submodules it can use dlgmodule or tiny file dialogs or whatever you prefer as the fallback
the executable will look in its working directory for the dll and if it exists override the dialogs with the imgui ones
if the dll isn't found on the filesystem, don't attempt to call functions from nonexistent dll
and then use the fallback you already have in your repos
it won't require much code added to your codebase
what do you think?
having it as a submodule will allow you to maintain your ide how you like
and i can maintain my dialogs with my own write access without directly affecting you upon breakages for example
people can use yours if mine breaks or vise versa
the most compelling reason for this to be added is less maintenance needed for building on mac
mac is currently broken with dlgmod
and will likely break after i fix it, just a matter of yearly os updates
as for the imgui dialogs it relies on code that apple rarely changes
in my experience
even then i can reimport a newer version of imgui if stuff breaks and let the imgui devs fix things for me
ok so ill make a pull request
but before that ill write a pseudo code real quick to give you a better idea

string get_open_filename(filter, fname) {
  if (file_exists(libfiledialogs_dll_file)) {
    return call_dll(libfiledialogs_dll_file, "get_open_filename", filter, fname);
  }
  // existing code from dlgmodule here
}

basically that for each dialog function
2-3 lines each
of course, not counting the helper function for call_dll
that's just a helper function wrapping dlopen(), dlsym(), and dlclose() on unix-likes and LoadLibraryW() for win32

dlopen(), dlsym() dlclose() docs - https://man7.org/linux/man-pages/man3/dlopen.3.html
LoadLibraryW() docs - https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryw
the dialogs are fully customizeable
you can set the localization, button text, title bar text, set them to borderless, parent window, always on top (when there is no parent), fullscreen, fixed, sizeable, change theme
just to name a few of the features already in
the library doesn't just do file dialogs and also message boxes and i will also add input box, login box, color picker and other stuff in the future

libfiledialogs library repos: https://github.com/time-killer-games/libfiledialogs

Preview:

207476087-f0f98e0e-2d60-465d-aa78-47cbe9d1f343

Motivation:

primarily to have consistent looking dialogs for every platform while also ensuring macos support goes stale less often as imgui devs will handle most of the required maintenance for us, because in my experience of working with macOS's native dialogs they need to have code maintained nearly every year because os upgrades keep on breaking dlgmodule's code. This also opens the door to unofficially supporting DragonFly BSD, NetBSD, OpenBSD, and SunOS variants which are currently not supported by the version of dlgmodule used in the GPE IDE repos.

Additional Notes:

  • You don't need all of those fonts files in my repos. It depends how many languages you want to support, ultimately.
  • Ubuntu/Debian needs dependencies installed with: sudo apt-get install -y libsdl2-dev libgtk-3-dev libglib2.0-dev if the dll is to be used at all, we can use the fallback if calling the dll fails for whatever reason, as if the file doesn't exist
  • libgtk-3-dev and libglib2.0-dev are needed for loading system-defined icons from the default icon theme. libsdl2-dev is needed for the dialog window itself.
  • FreeBSD/DragonFlyBSD needs dependencies installed with: su -l root -c "pkg install sdl2 gtk3 glib" if the dll is to be used at all, we can use the fallback if calling the dll fails for whatever reason, as if the file doesn't exist
  • The dialogs support localization if you want to make translations of this app. All elements can be translated with the environment variables found in this header, using environment_set_variable(name, value) within C++:
  • https://github.com/time-killer-games/libfiledialogs/blob/main/filedialogs/ImFileDialogMacros.h

Not working on Unbuntu

I'm trying to get this working on Unbuntu and I've installed libsdl2, but when I try to run it I get the following error:

./Game_Pencil_Engine_IDE 
./Game_Pencil_Engine_IDE: error while loading shared libraries: libSDL2_image-2.0.so.0: cannot open shared object file: No such file or directory

Right click on touchpad doesn't work.

When right clicking on a touchpad using the two-finger tap gesture, any type of right-click action does not register.

The current workaround is to use a physical mouse(not a touchpad) or actually press down the right-mouse button if you have one.

The event we're listening for is "SDL_BUTTON_RIGHT". I think the issue is related to how we check for holding down buttons. Not entirely sure.

Investigate new GCC compilation errors

Problem Statement
When compiling with newer compilers on the x86_64 platform, the compiled executable will crash during the early stages of the startup process. This seems to happen even before the initialization of SDL. My initial suspicion is due to the incompatibility of some precompiled DLLs. The usual gcc version used to compile many of the current builds is the one packaged with CodeBlocks, which is pretty old. There may be some incompatibilities with the new versions of GCC.

Background Information
Platform: Windows 10 Build 18362.295 Version 1903
Toolchain: MingGW-w64_x86_64-8.1.0-win32-seh-rt_v6-rev0
Compiler: gcc version 8.1.0 (x86_64-win32-seh-rev0, Built by MinGW-W64 project)
Last Known working compiler: gcc version 5.1.0 (tdm-1)

Experienced Behavior
On launch, the app will crash and Windows will return the following error: During startup program exited with code 0xc000007b.
The output from GDB is as follows:

(gdb) run                                                                                                               
Starting program: Game_Pencil_Engine_IDE.exe               
[New Thread 31740.0x3a74]
[New Thread 31740.0x6f24]
[New Thread 31740.0x7f18]
[New Thread 31740.0x34e0]
[Thread 31740.0x6f24 exited with code 3221225595]
[Thread 31740.0x34e0 exited with code 3221225595]
During startup program exited with code 0xc000007b.

Acceptance Criteria

  • Understand why this is happening.
  • Create a followup issue to fix this for newer compilers

Oh My Glob!

You will need to look up how to use glob.
it will return all matches with asterisks and put it in a vector.

I recommend using the Noto Fonts Collection, since it supports just about every non-dead language on earth right now, and since you like mono it should look something like this:

Linux glob: /usr/share/fonts/ttf/noto/*Mono*Regular.ttf
FreeBSD glob: /usr/local/share/fonts/ttf/noto/*Mono*Regular.ttf

Debian package needed:
sudo apt-get install fonts-noto

Arch Linux package needed:
sudo pacman -Syu noto-fonts

FreeBSD package needed:
su -l root -c "pkg install noto"

Example code here:
https://stackoverflow.com/questions/8401777/simple-glob-in-c-on-unix-system

Investigate LUA support

Problem Statement
The C++ compiler, while cool, is take longer than expected. Investigate the viability of using LUA as an engine language to accelerate workflows and development of actual games.

Acceptance Criteria

  • Gain an understanding of how LUA works.
  • Gain an understanding of how LUA can be integrated into the current engine.
  • Compile a list of files and functions that would be changing for this feature to be implemented.
  • Discuss here on any obstacles we may face.

Scene and GameObject Collision system update

Integrate game objects to be loaded into collision system on creation via scene and/or function(via game object logic i.e create misse, missle->add_to_collision_system() ).

-Make collision system aware of object statuses (Scheduled for destruction).
-Update collision layer at start of frame.
-Update collision layer on object movement.
-Clear collision layers on scene movement.
-Update objects when it collides with another.
--If possible, tells objects when it enters, remains and leaves another object.

-Current collision system method is spatial partioning with cross layer support.
--Implement cross-layer collision (I. I.e., object 1 on layer0 and object2 on layer7) defined via collison layer checkboxes in project structure.

PawGui Update to default to not allow coding in it

Due to the huge amount of overhead and non-native feel while coding in the editor as well as syntax highlighting, code completion and more code for objects will simply be previewed as PLAINTEXT and when selected will open the file in the code/text editor of choice...

For now will just default to toggling the boolean to false for "isCodeEditor"

Support TypeScript and HAXE as Project Language Types

Files Affected: text_editor.cpp, gpe_editor.cpp and gpe_syntax_handler.cpp

The key to adding these 2 languages as selectable and usable project languages will help optimize runtimes and also allow for easier cross-platform porting.

Split up giant gpe_editor.h and gpe_editor.cpp

After further review and advice it is apparent that gpe_editor.cpp could be broken up into many files.

So in each update I will add new files with segments of gpe_editor.cpp and make sure to maintain proper includes in headers of files that require the classes and functions being segmented out of the giant 1.5MB file of code.

This may speed up compile time and allow sorting through code more easily manageable.

Can we plan to support Python too?

I came across this awesome game engine while I was looking for a simple game engine to start working on as a hobby. (For some time I have the craving to start with gaming :) )
Can we investigate and add support for Python language? This will help us leverage Machine learning capabilities also if needed.
Just a thought.

Renderer system fails after creating SDL child classes

gpe_not_working_02242020.zip

In a weird turn of events, after changing out SDL to be used in child classes the window is created, but nothing is being rendered in it. I have separate initializes for each system and they aren't giving an error. Can anyone help track down what's happening?

I'm only seeing a white screen and when window resizes it doesnt even redraw over it....

Update file paths to proper slashing - not windows slashes

high on tantor via discord:
I instantly got errors because you are using windows-isms like backsplashes in file paths which dont work in Mac, Linux, and other unix-likes such as FreeBSD.

Although most file paths are unix-based, some windows slashes were able to make it into the code repo.

Update so file paths work fine on all devices.

Add climits header

Due to problems on BSD, the climits include corrects a bug reported by time-killer-games

Make a Makefile

In order to make building the engine easier for users, a Makefile should be used to aid in the automated build process.

This will mostly affect Linux users, but other platforms could potentially utilize the Makefile as well to reduce the dependency on Code::Blocks. At this point, we're only looking for a Makefile for Linux. (I'm not sure if it's even possible to use a Makefile on Windows easily.)

Does NOT work on Linux

I run it and I get:

Error loading SDL_Mixer 
Mix_Init: Failed to init required ogg and mod support!
 
Mix_Init: OGG support not available 
Unable to properly initialize IDE!

errors

Support Multiple World Languages in editor

Starting languages would be Spanish, French, German and Arabic.

This is a huge amount of work, especially as it may require a new parsing mechanism for handling fonts as many fonts only support one language or so and some languages require wide-character strings which is currently not supported in the Editor's Engine at all.

Native Build Support for Windows

This issue will document the changes needed for Native Build Support in editor using C++.

Further documentation to be placed here... for now, this is the placeholder. ;-)

Unify File Input/Output and FileSystem Operations (using libfilesystem)

replace all file i/o and filesystem operations used in GPE with cross-platform solution found here:

https://github.com/time-killer-games/libfilesystem

At the very least this can be done with the IDE, but as for the games GPE creates:

Note this can also with minimal changes be compiled with web assembly via emscripten and the virtual filesystem it offers available to the web browser / web browser control; therefore can be reused in the HTML5 / electron exports of GPE.

https://emscripten.org/

[Linux] Missing libraries

In addition to #18

On a vanilla Linux Mint 18.3 Cinnamon 64Bit (Ubuntu 16.04) the following libs are missing:

$ ./Game_Pencil_Engine_IDE 
./Game_Pencil_Engine_IDE: error while loading shared libraries: libSDL2-2.0.so.0: cannot open shared object file: No such file or directory
$ ldd ./Game_Pencil_Engine_IDE 
	linux-vdso.so.1 =>  (0x00007ffd18b59000)
	libSDL2-2.0.so.0 => not found
	libSDL2_image-2.0.so.0 => not found
	libSDL2_mixer-2.0.so.0 => not found
	libSDL2_ttf-2.0.so.0 => not found
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9e6f816000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9e6f50d000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9e6f2f7000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9e6ef2d000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f9e6ffc1000)

Remediate failure if font is not loaded

Expand game_errors.txt calls to include details if a font fails to load.
Note, default font loading to be a FATAL ERROR
Update any necessary data within locale modules to account for a NULL or nullpr.
Check for any places that can cause application or games to crash if a font is not loaded.

Check for default system folders for Arial based fonts.

Scene Editor Layer Pane Glitch

File(s) affected: gamesceneresource.cpp

Switching to 3 Panes has bugged out the Scene Editor in latest version with unforeseen results. Working on a bug fix.

Capture output of an external command

void GPE_OpenProgram(std::string programLocation, std::string programInfo, bool openProgrmaInfoOnFail)
in src/gpe_editor.cpp

We need to capture the output of those external commands and pipe the outputs to their respective log locations. The main log locations are the BUILD and GENERAL logs (e.g.: GPE_Main_Logs->log_general_line)

Add Audio Wave preview.

Goal:

When loading an audio within engine or editor an audio preview would be available with the following data points:

  • Length of audio in milliseconds.
  • Volume at each moment within the track.
  • Data useful for visualization of each audio track for play and preview.

[Linux] Backslash in path prevents saving/building

A single "\" sneaked into the project path and prevents saving (no error shown) and building the project:

-------------- Building: [testproject] [HTML5 Export] (Compiler: Pawbitious Compiler)---------------
Exporting Project...
Error: Unable to create [/home/xxxxx/development/gamepencilengine\/testproject/gpe_project/builds/html5] folder. Unable to access...
Using strict mode...
Creating [index.html] file.
Error: Unable to create game [index.html] file...
Error: Unable to build game!

Website down?

Hi there,
found that project while browsing on itch.io, both domains pawbyte.com and gamepencil.net seem to be unreachable (the latter is the current one, I assume?)
I wondered, is the project on hold, or still active?

Separate Base from modules

This repository will only include GPE, not SDL2, Raylib, SFML, etc.

Separate modules to different repository.

Add LTS macro

Add LTS versioning to editor and engine.
LTS = Long Term Support
These are versions that are constantly updated for bugs and/or security. Seen as stable versions meant for users to use commercially or normally.

Create Alternative OSX Function Key replacements for editor

gpe_editor.cpp
Lines 27641 thru 27680
Due to the IDE being made on Windows and Linux we did not for see that Function Keys do not properly work on mac.

These following are the Function Keys we use currently.

These will need an alternative keyboard combination to do these tasks:

F1 Opens Help Page -> Example: CTRL + F
F2 Opens Editor User Settings -> Example: ??
F5 Builds & Run Game -> Example: ??
F6 Saves screenshots -> Example: ??
F11 Toggle Full Screen Mode -> Example: ??
F12 Saves screenshots -> Example: ??

Add branch parent hierarchal data setting and getting.

Goal:
-Create helper functions to help navigate an object's inheritance tree.

Example:

-In an action RPG the player class casts a fireball.
-The player then creates a child object and stores a reference to the new fireball.
-The fireball is told that the player class is his parent.

The following functions will be useful to determinizing the parents of the fireball as well as grandparents(not in example):

  • std::string get_parent_name() - Returns the name of the branch's parent. If an orphan should return an empty string.

    • EX: fireball.get_parent_name() should return. "Player"
  • branch * get_parent__or_null() - Returns the parent of the branch. If an orphan should return null. Useful for reaching end of family tree.

    • EX: fireball.get_parent_name() should return. "obj_player".
  • std::vector< branch * >) get_branches() - Returns a vector(list) of the branch's sub_branches.

    • EX: player.get_branches() should return a list of active fireballs and other magical attacks.
  • bool is_orphan() - Returns true or false if the object has no current parent..

    • EX: main game object should be parentless
  • UPDATE void add_branch( branch * new_branch )- if the branch is already listed increment by 1 until the name no longer exists and rename added branch.

    • Reason: Useful for serializing objects with same name in scene editor.
  • void add_branch_dont_rename( branch * new_branch )- Adds a branch to the list, if branch already exists with name, add anyway and do not increment.

    • EX: An endless stream of bullets owned by player, instead of serializing those bullets they all behave the same.

Implementation:

-get_parent_name is the result of calling get_parent() and if that object is not null, return the parent's branch name.
-get_branches() has potential to cause issues, so should return a copy and not the actual sub_elements vector.

[Linux] examples cannot be opened

Upon choosing an example from the file->browse projects screen this error message appears:

Project Open Error: 
invalid Project File Type given

Add branch class hierarchal data setting and getting.

Goal:
-Create helper functions to help navigate an object's inheritance tree.

Example:

-ParaTroopa inherits Koopa Troopa
-Koopa Troopa inherits basic enemy
-Basic enemy inherits game_object (which is inherited from a branch).

The following functions will be useful to determinizing the parents of ParaTroopa as well as grandparents:

  • std::string get_group_name(int group_pos = 0 ) - returns group type that ParaTroopa - if none returns a blank string

    • Defaults to the 1st group joined. I.e would be basic enemy=0, Koopa Troopa = 1 and the ParaTroopa =2
  • bool is_in_group (std::string grp_name ) - returns true if the branch is part of the group named grp_name

    • Ex if other.is_in_group("Enemy){ //code;}
  • bool join_group(std::string grp_name) - Adds branch to a group. Returns true if successful or false if unsuccessful.

    • Paratrooper joined the enemy group
  • bool leave_group(std::string grp_name) - Removes the object from the grp_name. Returns true if successful or false if unsuccessful.

    • ParaTroopa.leave_group( "Bowser") and ParaTroopa.join_group("Mario)
    • This should actually return false, since in this example ParaTroopa is loyal only to Koopa, Enemies and himself. Bowser would be a whole new group type as well as Mario.
  • int group_get_count() - Returns the amounts of groups the branch is a part of.

    • In example above, should return 3(Paratroopa, Koopa Troopa and Enemy).

Implementation:

Groups are internal to the object/branch and are not within a list or a map. General purpose of having this is for quick checking of object properties in event of collision or other cross-object logic.

Linux GPU issue reported by Solar Lune

"Hey, there. I saw that you recently open-sourced GPE, and decided to give it a try. Here's some quick suggestions / notes / bugs:

  • It seems that while GPE is open, it kind of hangs up my desktop manager? The task bar is unresponsive, I can't open the main menu, etc. But it seems like it catches up after a few minutes, only for the process to restart again. I'm using Linux Mint KDE, by the way.

  • It sounds like my GPU is working harder than usual when GPE is on. Are you limiting the program's framerate?

  • It seems that creating a new project adds an extra slash before the name of the project file? The project file that I specify, "TestGame", isn't being created (I'm guessing because of that extra slash). However, it does show previously created projects in the Project Resources window despite their files not existing in the project folder.

  • Finally, you might want to just receive errors and issues on the Github page for the application itself rather than asking for e-mails, as it'd reduce duplication between users reporting the same bug to you. It also allows you to more cohesively tie commits that solve issues to the issues themselves.

Thanks for making what sounds like a fairly complete game creation software! It's always nice to have more options."

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.