Giter Site home page Giter Site logo

mrcsnm / hipremeengine Goto Github PK

View Code? Open in Web Editor NEW
92.0 3.0 8.0 133.4 MB

Cross Platform D-Lang Game Engine with scripting support

License: Other

D 91.84% Batchfile 0.05% C++ 0.58% Java 0.36% C 4.05% Makefile 0.16% Lua 0.01% JavaScript 1.64% HTML 0.06% Shell 0.03% Objective-C 0.91% Metal 0.23% Ruby 0.09%
dlang hipremeengine opensource crossplatform opengl gameengine android openal uwp directx-11

hipremeengine's Introduction

The engine maintains some global options which you can modify it on source/global/opts.d:

  • HE_DEBUG -> Use that for creating a debug version for the engine only
  • HE_NO_LOG -> Disable the global logging functions
  • HE_ERR_ONLY -> Maintain only error logging

Current features

  • Input handler and text input with selected keyboard layout;
  • Xbox One/Series Gamepad implementation;
  • Minimal Matrix/Vector implementation;
  • Asset packing, appending, updating and reading for faster performance(less IO);
  • Multi threaded asset loading and decoding (image).

Platforms

Almost all of those platforms can be built by using the build_selector project.

If you have D installed already, the build_selector can be got by running dub run hipreme_engine:build_selector

If not, you may go to the BuildAssets page and select your system. Both the language and engine will be installed locally by using them.

Build System Showcase

Example on build selector running and showing the build system

Requires libgl1-mesa-dev for opening X11 window and OpenGL

Features

  1. Simple build system
  2. Virtual File System
  3. Centralized asset locator with caching
  4. File reading with progress notification

Rendering

  • Metal 2.4
  • Direct X 11
  • OpenGL 3
  • OpenGL ES 3
  • OpenGL ES 2
  • WebGL 1.0 (OpenGL ES 2 emulated)
  • HipRenderer (abstraction)

Features

  1. Sprite
  2. SpriteBatch
  3. GeometryBatch
  4. FrameBuffer
  5. BitmapText
  6. Shader
  7. Material
  8. Tiled maps

Audio

  • AVudioEngine
  • OpenSL ES
  • OpenAL
  • XAudio2
  • WebAudio
  • HipAudio (abstraction)

Features

  1. Streaming
  2. 3D audio
  3. Low Latency on Android -> See flags at config/opts.d HIP_OPENSLES_OPTIMAL and HIP_OPENSLES_FAST_MIXER

Decoding

  • Images: PNG, JPG, BMP, TIFF and maybe others via arsd-official:image_files
  • Audio: MP3, OGG, WAV, FLAC via audioformats
  • Tiled: TSX and TSJ parser
  • TextureAtlas: JSON, ATLAS, XML and TXT(Spritesheet) parser
  • Font: FNT, TTF, OTF
  • Pack: HapFile(Hipreme Asset Packing File)
  • Settings: INI/CONF, JSON (HipremeEngine own's implementation that simulates std.json but faster) and CSV

Coding

  • Scripting:
  1. D ( check api module for reference )
  • Filewatcher for recompiling the script
  • WebAssembly server reloader
  • Live reload ( no engine restart for coding )

    State is not saved, it is a simple restart, but all the assets are also cached, so, it is still way faster than reopening.

  1. Lua (outdated)
  • May be subject to removal

Next steps

  • GLSL to HLSL transpiler
  • Multi threaded audio decoding (currently only single threaded is supported)
  • Create a proof of concept

Issues list

  • You can't spawn an Object from within an interface without calling hipSaveRef or GC.addRoot. This is a bug on DLL implementation which doesn't actually add the new object spawned from an interface as a leaf.

hipremeengine's People

Contributors

john-colvin avatar mrcsnm avatar nithurshnithursha avatar rdgsnm 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

Watchers

 avatar  avatar  avatar

hipremeengine's Issues

`setFont()` interferes with `drawRectangle()`

setFont() interferes with drawRectangle() and makes it actually fillRectangle().

double setFont()

override void render()
{
    setFont(smallFont);
    drawRectangle(40, 40, 200, 200, HipColor(1, 0, 0.5, 1));
    setFont(null);

    renderGeometries();
    renderTexts();
    renderSprites();
}

image

no or single setFont()

override void render()
{
    drawRectangle(40, 40, 200, 200, HipColor(1, 0, 0.5, 1));
    setFont(null);

    renderGeometries();
    renderTexts();
    renderSprites();
}

It makes no difference whichever one is omitted. Bug only occurs when both are there.

image

Update Rmd File

I have fixed a spelling mistake and would like to suggest the item as a class 3 action item 8516f14.

windowing: Linking fails on Debian

…/HipremeEngine/projects/start_here$ dub -c run
ld: error: cannot open /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/X11: Is a directory

Seems like the cause is the following line:

X11 should probably be x11 here.
Furthermore, this pragma seems kinda redundant, as the lib is scheduled for linking in the DUB recipe already:

Funny enough, linking seems to work fine with a capital X here.

Oh and: This is on Debian 11 “Bullseye” on an x86-64 machine.

start_here: crashes out of the box for me

$ lldb bin/desktop/hipreme_engine ./projects/start_here
(lldb) target create "bin/desktop/hipreme_engine"
Current executable set to '/_FOO_BAR/HipremeEngine/bin/desktop/hipreme_engine' (x86_64).
(lldb) settings set -- target.run-args  "./projects/start_here"
(lldb) run
Process 6917 launched: '/_FOO_BAR/HipremeEngine/bin/desktop/hipreme_engine' (x86_64)
INFO: Console installed for Platforms.DEFAULT
		source/app.d:145 at void app.initEngine
INFO: HipFS installed at path ./projects/start_here/assets
		source/app.d:147 at void app.initEngine
INFO: Starting HipRenderer with configuration: 
MultisamplingLevel: 0
BufferingCount: 2
Fullscreen: true
Vsync: activated
		modules/renderer/source/hip/hiprenderer/config.d:27 at void hip.hiprenderer.config.HipRendererConfig.logConfiguration
GL Renderer: Mesa Intel(R) Iris(R) Graphics 6100 (BDW GT3)
GL Version: 4.6 (Core Profile) Mesa 20.3.5
GLSL Version: 4.60
ERROR: Fullscreen is not implemented for this platform
		modules/renderer/source/hip/hiprenderer/renderer.d:316 at bool hip.hiprenderer.renderer.HipRenderer.initialize
Changing window size to [800, 600]
		modules/renderer/source/hip/hiprenderer/renderer.d:325 at void hip.hiprenderer.renderer.HipRenderer.setWindowSize
HIP: Loading default assets
HIP: Loaded default image
HIP: Loaded default font
HIP: 2D Renderer: Initializing viewport
HIP: 2D Renderer: Initializing camera 1
HIP: 2D Renderer: Initializing camera 2
HIP: 2D Renderer: Initializing camera 3 
HIP: 2D Renderer: Initializing camera 4
HIP: 2D Renderer: Initializing spritebatch
HIP: 2D Renderer: Initializing geometrybatch
HIP: 2D Renderer: Initializing text renderer
INFO: Loading dll ./projects/start_here/libstart_here.so
		source/hip/systems/hotload.d:55 at bool hip.systems.hotload.HotloadableDLL.load
HipengineAPI: Initialized Console
HipengineAPI: Initialized FS
Random_range wasn't able to load (tried with Random_range)
Random_rangeu wasn't able to load (tried with Random_rangeu)
Random_rangeub wasn't able to load (tried with Random_rangeub)
Random_rangef wasn't able to load (tried with Random_rangef)
HipengineAPI: Initialized Math
HipengineAPI: Initialized G2D
HipengineAPI: Initialized Audio
HipengineAPI: Initialized Input
Process 6917 stopped
* thread #1, name = 'hipreme_engine', stop reason = signal SIGSEGV: address access protected (fault address: 0x7ffff7363c98)
    frame #0: 0x00007fffc68a42cb libstart_here.so_hiptempso`_D3hip3api8internal__T26loadModuleFunctionPointersSQBxQBw6assets7globalsVAyaa0_ZQCgFZv at internal.d:98:4
   95  			static if(isFunctionPointer!(f))
   96  			{
   97  				importedFunctionName = prefix~member~'\0';
-> 98  				if(f is null)
   99  				{
   100 					f = cast(typeof(f))_loadSymbol(_dll, importedFunctionName.ptr);
   101 					if(f is null)
(lldb) bt
* thread #1, name = 'hipreme_engine', stop reason = signal SIGSEGV: address access protected (fault address: 0x7ffff7363c98)
  * frame #0: 0x00007fffc68a42cb libstart_here.so_hiptempso`void hip.api.internal.loadModuleFunctionPointers!(hip.api.assets.globals, "").loadModuleFunctionPointers() at internal.d:98:4
    frame #1: 0x00007fffc689c279 libstart_here.so_hiptempso`void hip.api.assets.globals.initGlobalAssets() at globals.d:10:5
    frame #2: 0x00007fffc6899315 libstart_here.so_hiptempso`HipremeEngineGameInit at package.d:72:4
    frame #3: 0x0000555555754e40 hipreme_engine`void hip.systems.game.GameSystem.startGame()(this=0x00007ffff7039d80) at game.d:207:13
    frame #4: 0x00005555557923cf hipreme_engine`void app.gameInitialize() at app.d:230:2
    frame #5: 0x00005555557922b9 hipreme_engine`void app.HipremeMain(int, int).__lambda4() at app.d:207:23
    frame #6: 0x000055555578594b hipreme_engine`bool hip.global.gamedef.loadDefaultAssets(void delegate(), void delegate(immutable(char)[]))(onSuccess=void delegate() @ 0x00007ffff703b1c8, onFailure=void delegate(string cause) @ 0x00007ffff703b1b0) at gamedef.d:81:10
    frame #7: 0x000055555579229a hipreme_engine`HipremeMain(windowWidth=-1, windowHeight=-1) at app.d:207:2
    frame #8: 0x0000555555792549 hipreme_engine`_Dmain(args=slice<string> @ 0x00007fffffffdd80) at app.d:348:3
    frame #9: 0x00007ffff79028dc libdruntime-ldc-shared.so.101`void rt.dmain2._d_run_main2(char[][], ulong, extern (C) int function(char[][])*).runAll() + 76
    frame #10: 0x00007ffff79026f6 libdruntime-ldc-shared.so.101`_d_run_main2 + 406
    frame #11: 0x00007ffff790254e libdruntime-ldc-shared.so.101`_d_run_main + 158
    frame #12: 0x0000555555792e82 hipreme_engine`main(argc=2, argv=0x00007fffffffe068) at entrypoint.d:42:17
    frame #13: 0x00007ffff74a9d0a libc.so.6`__libc_start_main + 234
    frame #14: 0x000055555574ebea hipreme_engine`_start + 42

OS: Debian 11 “Bullseye” (LMDE 5)
Arch: x86-64
Desktop: Cinnamon on X.org

Am I doing something wrong here?
Let me know if you need further information, please.

It's dub time! (compilation errors)

Hey, just had another error when doing a standard bog dub command on my terminal, here let me paste:

api/source/hip/api/data/commons.d(207,17): Error: alias mem cannot alias an expression this , pop
api/source/hip/api/data/commons.d(150,21): Error: template instance hip.view.testscene.TestScene.Preload!().finalImpl!().foreachAsset!(IHipAudioClip, pop) error instantiating
api/source/hip/api/data/commons.d(237,17): parent scope from here: mixin ForeachAssetInClass!(TestScene, loadAsset)
api/source/hip/api/data/commons.d(237,17): Error: mixin hip.view.testscene.TestScene.Preload!().impl!().preload.ForeachAssetInClass!(TestScene, loadAsset) error instantiating
api/source/hip/api/data/commons.d(245,72): parent scope from here: mixin impl!()
source/hip/view/testscene.d(25,5): parent scope from here: mixin Preload!()
Error /usr/bin/dmd failed with exit code 1.

Debian 11, DMD 2.102.2, debug build

Audio modules error

Hi! Immediately after updating your repo and getting everything right, I got another issue using dmd, here:

modules/audio/source/hip/hipaudio/audioclip.d(43,5): Error: static assert: "HipAudioBuffer must have same size as a ptr, _getBufferAPI depends on that"
Error /usr/bin/dmd failed with exit code 1.

Running a standard dub, Debian 11 once more.

Building on Linux hits an error related to XAudio

Hi. I wanted to know if DMD is supported or not? Since it seems that when I'm building through a 'dub build' command I hit:

modules/audio/source/hip/hipaudio/audioclip.d(57,25): Error: undefined identifier XAUDIO2_BUFFER
Error /usr/bin/dmd failed with exit code 1.

And I am not sure why that is happening since Linux does not uses xaudio at all to my knowledge, I built from master too. Perhaps I have to use LDC instead of DMD for a successful compilation? Does the projects states that so? (Or you're not supposed to use dub?)

@nogc Logging

  1. Make Console @nogc, as it is not really necessary. Specially now that we have betterC strings, (and conversions).
  2. Change logging arguments to compile time variadic arguments. FILE, PRETTY_FUNCTION and LINE should not be template arguments
  3. Remove _formatPrettyFunction, probably it is a waste.

FR: MOD/XM/S3M/IT support

This is something of an optional thing but I think it'd be pretty useful to showcase be it on gamejams or technical demonstrations of the engine. These formats are known for being made from a program known as a tracker, and they contain sample data and everything needed to run standalone. I was wondering if it would be feasible or possible to have this added on the HipremeEngine?

Cannot build on latest master

Hi! I did a fresh new git pull origin and clone and I got these errors now:

source/hip/view/scene.d(21,17): Error: cannot implicitly override base class method hip.api.view.scene.AScene.pushLayer with hip.view.scene.Scene.pushLayer; add override attribute
HipTextRenderertruefalse
Exporting module inputmap
Exporting module random
Exporting module animation
Exported Class HipAnimationTrack
Exported Class HipAnimation
Exporting module utils
Exporting module hipfs
Exporting module audio
Exporting module assetmanager
Exporting module timer_manager
source/hip/view/testscene.d(33,19): Error: function hip.view.testscene.TestScene.initialize does not override any function
source/hip/view/testscene.d(42,19): Error: function hip.view.testscene.TestScene.update does not override any function
source/hip/view/testscene.d(56,19): Error: function hip.view.testscene.TestScene.render does not override any function
Error /usr/bin/dmd failed with exit code 1.

Once again, on Debian Linux. DMD version 2.101.2

Implement a Scene Graph

Scene Graph is pretty important for 2D and 3D games, helps a lot into managing a lot of objects at the same time, its almost time to implement that.

Images

working on web

PS Vita:
IMG_20230303_230856

Mac OS:
image

iOS:
Captura de Tela 2023-12-20 às 21 28 33

Change Utils to hipstd

Utils has gone a step beyond being just an utils. It is an entire stdlib for the D programming language. I'll need some time converting the names and references to it.

Linking error related to /TIME on Linux

Hey there, been awhile. I was updating the repository and I encountered a bug where attempting to run a dub or dub build command nets me a: /usr/bin/ld: cannot find /TIME: No such file or directory
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
Error /usr/bin/dmd failed with exit code 1.

Not sure what is happening here though

2nd run of the generated project doesn't run

After a project is generated:

First run of dub -c run --compiler dmd run the game.
Repeating dub -c run --compiler dmd doesn't run the game.
I didn't expect that.

Here the 2nd run result:
image

Using dub -c run --compiler dmd -f makes it run again.

Key out of range

Hello,

Engine sounds very promising!

How to reproduce:
On Windows, when I press the Fn key, or the "sound mute" key on my keyboard, the engine closes with message:

core.exception.AssertError@source\hip\event\dispatcher.d(270): Key out of range
----------------
0x00007FF76476EB49 in d_assert_msg
0x00007FF76461CD9B in hip::event::dispatcher::getHipKeyFromSystem at C:\Users\guill\Desktop\HipremeEngine\source\hip\event\dispatcher.d(270)
0x00007FF76461C635 in hip::event::dispatcher::EventDispatcher::this::__lambda2 at C:\Users\guill\Desktop\HipremeEngine\source\hip\event\dispatcher.d(58)
0x00007FF76472C8CD in hip::windowing::platforms::windows::WndProc at C:\Users\guill\Desktop\HipremeEngine\modules\windowing\source\hip\windowing\platforms\windows.d(61)
0x00007FFB93B58231 in DispatchMessageW
0x00007FFB93B57A7B in CallWindowProcW
0x00007FFB825D1D74 in wglSwapBuffers
0x00007FFB93B58231 in DispatchMessageW
0x00007FFB93B57CF1 in DispatchMessageW

Expected behaviour: key being ignored instead of closing game.
So cannot hit F5 on that keyboard for now since I need Fn key

How to use a system compiler

Linux, Debian testing

gdc 13.2.0-7, also had ldc 1.35.0 (LLVM 16), and dmd v2.106.0.

Tried running with gdc,

user@debian:~/aa$ dub run --compiler=gdc hipreme_engine:build_selector
             Building package hipreme_engine:build_selector in /home/user/.dub/packages/hipreme_engine/1.0.13/hipreme_engine/tools/user/build_selector/
     Warning Dependency 'arsd-official:terminal' depends on git branch '~master', which is deprecated.
             Specify the git repository and commit hash in your dub.json:
             "arsd-official:terminal": {"repository": "git+<git url>", "version": "<commit>"}
     Warning Dependency 'arsd-official:cgi' depends on git branch '~master', which is deprecated.
             Specify the git repository and commit hash in your dub.json:
             "arsd-official:cgi": {"repository": "git+<git url>", "version": "<commit>"}
     Warning Dependency 'arsd-official:minigui' depends on git branch '~master', which is deprecated.
             Specify the git repository and commit hash in your dub.json:
             "arsd-official:minigui": {"repository": "git+<git url>", "version": "<commit>"}
     Warning Warning: License in sub-package hipreme_engine:build_selector is different than its parent package, this is discouraged.
    Starting Performing "debug" build using gdc for x86_64.
  Up-to-date arsd-official:core ~master: target for configuration [library] is up to date.
  Up-to-date arsd-official:cgi ~master: target for configuration [embedded_httpd] is up to date.
  Up-to-date arsd-official:color_base ~master: target for configuration [library] is up to date.
  Up-to-date arsd-official:simpledisplay ~master: target for configuration [normal] is up to date.
  Up-to-date arsd-official:textlayouter ~master: target for configuration [library] is up to date.
  Up-to-date arsd-official:minigui ~master: target for configuration [library] is up to date.
  Up-to-date arsd-official:terminal ~master: target for configuration [normal] is up to date.
    Building objc_meta 1.0.11: building configuration [library]
../.dub/packages/objc_meta/1.0.11/objc_meta/source/objc/runtime.d:2:15: internal compiler error: in make_import, at d/imports.cc:48
    2 | public import objc.meta : selector, ObjectiveC, ObjcExtend, instancetype;
      |               ^
0x7f4eacf1c6c9 __libc_start_call_main
	../sysdeps/nptl/libc_start_call_main.h:58
0x7f4eacf1c784 __libc_start_main_impl
	../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-13/README.Bugs> for instructions.
Error gdc failed with exit code 1.

Ok. Fair enough, requires some version probably and stuff (this objc probably should not even be a dependency on Liunx).

Lets try system ldc:

user@debian:~/aa$ dub run --compiler=ldc2 hipreme_engine:build_selector | cat
             Building package hipreme_engine:build_selector in /home/user/.dub/packages/hipreme_engine/1.0.13/hipreme_engine/tools/user/build_selector/
     Warning Dependency 'arsd-official:terminal' depends on git branch '~master', which is deprecated.
             Specify the git repository and commit hash in your dub.json:
             "arsd-official:terminal": {"repository": "git+<git url>", "version": "<commit>"}
     Warning Dependency 'arsd-official:cgi' depends on git branch '~master', which is deprecated.
             Specify the git repository and commit hash in your dub.json:
             "arsd-official:cgi": {"repository": "git+<git url>", "version": "<commit>"}
     Warning Dependency 'arsd-official:minigui' depends on git branch '~master', which is deprecated.
             Specify the git repository and commit hash in your dub.json:
             "arsd-official:minigui": {"repository": "git+<git url>", "version": "<commit>"}
     Warning Warning: License in sub-package hipreme_engine:build_selector is different than its parent package, this is discouraged.
    Starting Performing "debug" build using ldc2 for x86_64.
  Up-to-date arsd-official:core ~master: target for configuration [library] is up to date.
  Up-to-date arsd-official:cgi ~master: target for configuration [embedded_httpd] is up to date.
  Up-to-date arsd-official:color_base ~master: target for configuration [library] is up to date.
  Up-to-date arsd-official:simpledisplay ~master: target for configuration [normal] is up to date.
  Up-to-date arsd-official:textlayouter ~master: target for configuration [library] is up to date.
  Up-to-date arsd-official:minigui ~master: target for configuration [library] is up to date.
  Up-to-date arsd-official:terminal ~master: target for configuration [normal] is up to date.
  Up-to-date objc_meta 1.0.11: target for configuration [library] is up to date.
  Up-to-date hipreme_engine:build_selector 1.0.13: target for configuration [default] is up to date.
    Finished To force a rebuild of up-to-date targets, run again with --force
     Running ../.dub/packages/hipreme_engine/1.0.13/hipreme_engine/tools/user/build_selector/hipreme_engine_build_selector 



No ldcVersion specified, your HipremeEngine will attempt to install locally LDC2 1.36.0-beta1
	This compiler version is installed locally and won't affect your system D installation.
Your system will download a file: Download D cross compiler LDC2 1.36.0-beta1(https://github.com/ldc-developers/ldc/releases/download/v1.36.0-beta1/ldc2-1.36.0-beta1-linux-x86_64.tar.xz) [Y]es/[N]o

I do not like that.

Is there a way to not do that, and use system ldc by default?

Also please DO NOT do terminal reset, before printing this message. It screws things up (i.e. hard to copy build logs).

Additionally pressing N, causes terminal to be in-non-echo mode forever (until reset). Please do not touch echo mode. Require Y+Enter instead.

Not sure if example working?

I was kindof expecting something on screen, but the generated project is a black screen.
What I was expecting: anything else, even a plain non-black color rectangle, so that I know the engine is working as intended.
What I see: black window

Setup: Windows 11, dmd DMD32 D Compiler v2.101.0-beta.1-dirty, DUB 1.27.0

image

Linker error

So, now all modules have successfully compiled and there are no issues there! Now I encountered a new bug, allow me to dump what it says on the terminal (user is mega):
Linking hipreme_engine
/usr/bin/ld: modules/windowing/.dub/build/default-debug-linux.posix-x86_64-dmd_v2.101.0-1487C0C4D73EE1149313B5787F50E73F491D7E43EBD1E7409DB3001BA1124E01/libwindowing.a(x11_4d_657.o): in function _D3hip9windowing9platforms3x1116initializeOpenGLFNbNiiiZb': /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:60: undefined reference to glXChooseFBConfig'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:64: undefined reference to XCloseDisplay' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:71: undefined reference to glXGetVisualFromFBConfig'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:74: undefined reference to glXGetFBConfigAttrib' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:75: undefined reference to glXGetFBConfigAttrib'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:85: undefined reference to XFree' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:91: undefined reference to XFree'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:92: undefined reference to glXGetVisualFromFBConfig' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:96: undefined reference to XCloseDisplay'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:106: undefined reference to XCreateColormap' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:126: undefined reference to XCreateWindow'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:134: undefined reference to XInternAtom' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:146: undefined reference to XSetWMProtocols'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:158: undefined reference to glXQueryExtensionsString' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:161: undefined reference to glXGetProcAddressARB'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:169: undefined reference to glXCreateNewContext' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:189: undefined reference to XSync'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:191: undefined reference to glXIsDirect' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:193: undefined reference to glXMakeCurrent'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:199: undefined reference to XClearWindow' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:200: undefined reference to XMapRaised'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:201: undefined reference to XStoreName' /usr/bin/ld: modules/windowing/.dub/build/default-debug-linux.posix-x86_64-dmd_v2.101.0-1487C0C4D73EE1149313B5787F50E73F491D7E43EBD1E7409DB3001BA1124E01/libwindowing.a(x11_4f_415.o): in function _D3hip9windowing9platforms3x1110swapBufferFZv':
/home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:212: undefined reference to glXSwapBuffers' /usr/bin/ld: modules/windowing/.dub/build/default-debug-linux.posix-x86_64-dmd_v2.101.0-1487C0C4D73EE1149313B5787F50E73F491D7E43EBD1E7409DB3001BA1124E01/libwindowing.a(x11_50_5bb.o): in function _D3hip9windowing9platforms3x1114setVsyncActiveFNbNibZv':
/home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:220: undefined reference to glXGetProcAddressARB' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:221: undefined reference to glXGetProcAddressARB'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:222: undefined reference to glXGetProcAddressARB' /usr/bin/ld: modules/windowing/.dub/build/default-debug-linux.posix-x86_64-dmd_v2.101.0-1487C0C4D73EE1149313B5787F50E73F491D7E43EBD1E7409DB3001BA1124E01/libwindowing.a(x11_53_1b7.o): in function _D3hip9windowing9platforms3x114pollFZv':
/home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:249: undefined reference to XPending' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:251: undefined reference to XNextEvent'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:257: undefined reference to XGetWindowAttributes' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:327: undefined reference to XKeycodeToKeysym'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:332: undefined reference to XKeycodeToKeysym' /usr/bin/ld: modules/windowing/.dub/build/default-debug-linux.posix-x86_64-dmd_v2.101.0-1487C0C4D73EE1149313B5787F50E73F491D7E43EBD1E7409DB3001BA1124E01/libwindowing.a(x11_56_740.o): in function _D3hip9windowing9platforms3x1118destroy_GL_ContextFZb':
/home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:359: undefined reference to XDestroyWindow' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:360: undefined reference to XCloseDisplay'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:361: undefined reference to XFree' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:362: undefined reference to XFreeColormap'
/usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:363: undefined reference to glXDestroyContext' /usr/bin/ld: modules/windowing/.dub/build/default-debug-linux.posix-x86_64-dmd_v2.101.0-1487C0C4D73EE1149313B5787F50E73F491D7E43EBD1E7409DB3001BA1124E01/libwindowing.a(x11_57_42a.o): in function _D3hip9windowing9platforms3x1110openWindowFiiZi':
/home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:372: undefined reference to XOpenDisplay' /usr/bin/ld: /home/mega/HipremeEngine/modules/windowing/source/hip/windowing/platforms/x11.d:379: undefined reference to glXQueryVersion'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
Error /usr/bin/dmd failed with exit code 1.

Not sure what is going on here admittedly, though so close to being compiled now! (not sure if this is something related to my linker, or the codebase, or something else entirely even)

ninepatchtest.d incompatible types

Hey! Thanks for taking notice so soon of my reported issue. I noticed that an hour ago or so a new PR was released and most of it was compiling! There is still this error that I'm running into though

source/hip/view/ninepatchtest.d(32,29): Error: incompatible types for (getTouchPosition(0u)) - (this.startPatch): float[2] and Vector!(2u, float)
Error /usr/bin/dmd failed with exit code 1.

I do appreciate that most modules and the audio ones were fixed!

Make the Renderer and Audio classes optionally structs

This could take a long time. For integrating with betterC, classes can't be used, unless someone have a better idea on how to solve that. We could have a special version which would actually use only one renderer and only one audio player. No dynamic switch via the .conf file.

Onboarding

  • I took a long time to find the link to: https://github.com/MrcSnm/HipremeEngine/wiki/Getting-Started#getting-started

    • first I tried to look into "projects"

    • then I tried "start_here" in projects. But, not sure what it is in the end, doesn't build with strange DUB error
      image

    • then I tried to open HipremeEngine.sln, but does not open correctly in VS

    • then I found the big link in README.md, in editor did not really noticed that link before

  • follow the tutorial in Getting-Started

  • Got a build error:
    image

Allow trailing slashes in paths for the script loader

It would be nice if the script host/loader would allow paths with trailing slashes.

works: bin/desktop/hipreme_engine ./projects/start_here
doesn’t work: bin/desktop/hipreme_engine ./projects/start_here/

core.exception.ArraySliceError@modules/util/source/hip/util/system.d(132): slice [0 .. 3] extends past source array of length 0
----------------
??:? onArraySliceError [0x7ffff78cb16a]
??:? _d_arraybounds_slice [0x7ffff78ca880]
modules/util/source/hip/util/system.d:132 bool hip.util.system.dynamicLibraryIsLibNameValid(immutable(char)[]) [0x55555586882a]
source/hip/systems/hotload.d:37 hip.systems.hotload.HotloadableDLL hip.systems.hotload.HotloadableDLL.__ctor(immutable(char)[], void delegate(void*)) [0x5555556a268e]
source/hip/systems/game.d:145 void hip.systems.game.GameSystem.loadGame(immutable(char)[]) [0x5555556a60cb]
source/app.d:229 void app.gameInitialize() [0x5555556e40a1]
source/app.d:207 [0x5555556e3fa8]
source/hip/global/gamedef.d:84 bool hip.global.gamedef.loadDefaultAssets(void delegate(), void delegate(immutable(char)[])) [0x5555556d763a]
source/app.d:207 HipremeMain [0x5555556e3f89]
source/app.d:348 _Dmain [0x5555556e4238]

Rationale

  • I fail to remember which one the correct one is (trailing slash vs none).
  • Bash completion supplies the path with a trailing slash

BetterC Arrays

BetterC Arrays could be used instead of plain D runtime arrays. This is great for increasing compatibility with more projects and requires almost no effort. Almost every HipremeEngine backend could be a ref counted array. As the syntax doesn't change much.

Performance could be compared. Although I really don't think that ref counting arrays should have much impact.

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.