• S
    Skaruts

    @robert Oh I hadn't realized html5 and debug-html5 were separate targets. Sorry about that.

    I just created an issue like you said.

    Thanks. 🙂

    posted in Kode read more
  • S
    Skaruts

    @Robert Yea, but isn't HTML5 what we all use for quick testing?
    It's only useful for testing if we can implement things in it... My targets are desktop, but it's cumbersome to test for those by compiling everything, obviously.

    (I'm not worried about the flash backend, tbh. I just mentioned because I also peeked into its code. No big deal there, I think.)

    I don't know any javascript though... Or how to mix it in.

    posted in Kode read more
  • S
    Skaruts

    @robert Seems like I have everything up to date (followed the intructions from Lewis Lepton's recent video), but it seems like it's not implemented for HTML5 or flash yet, though.

    The definition of Window.resize() is empty, and changing the width and height directly seems to not do anything either...

    posted in Kode read more
  • S
    Skaruts

    @robert Well I installed a new version of Kode yesterday. Is kha itself a separate installation? It's been a little while so I'm probably missing something...

    EDIT: yea, I just noticed it in the Haxe Dependencies. It even says where I installed it. Will update it. Thanks.

    posted in Kode read more
  • S
    Skaruts

    @robert Hmm, strange that there seems to be no Window available to me. Kode doesn't autocomplete when I type "import kha.Window;" (it only shows me kha.WindowMode and kha.WindowOptions) and I get a "type not found kha.Window" error.

    posted in Kode read more
  • S
    Skaruts

    I found this issue talking about it, which seems to be fixed, but... how do I do it exactly?

    posted in Kode read more
  • S
    Skaruts

    @robert, couldn't make it work, but may be because the project doesn't have a command line at runtime. I'd have to change that. Maybe I'll try that tomorrow or something, I'm burned out for today.

    @mundusnine, the window opens fine, but just throws that error and crashes (it doesn't get to draw the black background in it, but I can see all the borders). Although my graphics card is getting too old for this. It's an ATI Radeon 4800. Drivers are up to date for sure, their last update was years ago...

    But if my graphics card could be a problem, shouldn't it be a problem for an HTML5 build too? As far as I can tell, in HTML5 it seems to works fine. I already tested displaying some pngs and drawing some shapes.

    posted in Kode read more
  • S
    Skaruts

    I'm not being able to click ok in the error when running it from inside VS. I don't know where's the main entry point of the whole program, but I could try inserting a system("pause") there, just so it halts it, so that I can attach the debugger to the process manually, set the breakpoint, then let it continue from there and see what happens. Not sure this trick would work with your code... I used it in the past while doing some simple SDL projects in C.

    Just thinking it might help in letting me click ok on that thing.

    I'm trying to do this because, when I run it manually (outside VS), after I click ok in error, it seems like it closes the app as normal rather than actually crashing. If I can click ok fast enough; if not it crashes.

    posted in Kode read more
  • S
    Skaruts

    I noticed it shows up in the "breakpoints" tab.

    Continuing to run it doesn't seem to make it hit that breakpoint. It seems to stay stuck at that exception error...

    EDIT: I'm trying to see if I can click ok in the error message, actually. That's probably why it's stuck there. But it seems to want to stay hidden after VS gets in front of it.

    posted in Kode read more
  • S
    Skaruts

    Hmm... I did that but when I press OK (in the New Data Breakpoint box) nothing seems to happen. Shouldn't there be an indicator somewhere, showing that there's a data breakpoint there?

    posted in Kode read more
  • S
    Skaruts

    My friend just told me it works fine on his end. So I guess that's it.

    So that means Kha windows' apps crash if there's no sound card. Not sure if that's useful information for you, but there you go.

    Thanks so much for all the help and for your time, man. Seriously appreciated.

    posted in Kode read more
  • S
    Skaruts

    I think I found the problem: I don't have a sound card at the moment (I physically removed it from my PC because it's broken). It never even crossed my mind that that could be the issue...

    I reinstalled haxe and openfl so I could test it, and then I compiled and ran one of its sample projects to cpp. It runs fine, but it also gave me a hint in the command line:
    "AL lib: (EE) ALCmmdevPlayback_open: Device init failed: 0x80070490"

    I'm gonna send the Kha project's executable to a friend of mine to see if it runs on his PC. If it does, then I guess that's the problem.

    posted in Kode read more
  • S
    Skaruts

    There's the off chance that it can be related to my windows, as it's in very bad shape and has some weird problems with file access permissions sometimes (especially executables -- but it's usually more like temporarily not letting me delete/rewrite them). And it's slow as a snail. I seriously need a new windows...

    I'm not sure if by "data breakpoint" you mean the usual breakpoints we can set for the debugger, but I do know how to work with the debugger to an extent. Perhaps I could try to follow the execution from the start, and find where that problem comes from, at least.

    EDIT: Actually, on a glance I'm not sure where to set breakpoints... I set one at the very start of main.cpp (at the #include <hxcpp.h>), but that breakpoint wasn't even reached before the crash.

    EDIT2: just probably an irrelevant detail, but I just noticed when running debug HTML5, this shows up in the debug console:
    "SystemImpl.hx:350: Could not initialize WebGL 2, falling back to WebGL."

    Also, now that I'm thinking about it, I had problems with Lime in the past that I never got to sort out, that made it stop being able to compile haxe/openfl to c++. I think that was related to my windows being screwed up and screwing up Haxe for me. So maybe it can also be something to do with my Haxe installation. I'll see if I can figure something out on that end.

    posted in Kode read more
  • S
    Skaruts

    Yes, I just created a Kha project and compiled it immediately (for Windows, not Windows Universal). It works fine in HTML5, both debug and release. A blank (black) window pops up no problem when I run it.

    I also tried reverting Kode to use its own version of Kha, and that also seems to work now, although it can't compile only because I didn't install the SDK version it requires. I'll try that one later to see what happens.

    About the script errors, I just noticed they're VS related, and probably irrelevant. The same error dialogue boxes popped up when I closed the solution, and they also pop up when I debug a simple Desktop Application (not Kha related). I did that as you suggested earlier, to test if I could create and build a Desktop App, and it worked fine; compiled and ran no problem at all. So I'm guessing the script errors are related to certain web-like elements in VS, both in the diagnostic tools and its "Start Page". As you can see in my previous screenshot, there's a white blank area in the diagnostic tools panel, which shouldn't be blank. I didn't edit that out, it's really looking like that. I had noticed this on VS2015 before, but VS2015 told me to install an updated version of Internet Explorer in order for it to be able to display some information there. I couldn't be bothered doing that.

    But anyway, since the errors also happen when debugging an unrelated Desktop App, and that one still compiles and runs fine, I'm guessing they're actually irrelevant.

    posted in Kode read more
  • S
    Skaruts

    Well, creating a new project in Kode and compiling again worked. Well, almost.

    As far as compiling goes, it compiled the whole thing inside Kode, which is more than I was expecting, with no errors and only this warning: "c:\kha\backends\kore\khacpp\src\hx\hash.h(517): warning C4390: ';': empty controlled statement found; is this the intent?"

    However, the application itself doesn't run. It crashes, and shows me this:
    alt text
    (it's grayed out because it's behind the "application stopped working" notice)

    I tried digging a little deeper and debug it in VS (I can now open the project, btw), but I've really no clue what's happening. It pops up a few script errors, and stops here: (And this is just a default Kha project, with no changes.)
    alt text

    posted in Kode read more
  • S
    Skaruts

    I suppose I could've showed this earlier. This is how it looks in VS. (I can't access the project's properties by right-clicking).
    alt text

    Well, so far this is what I've installed (screenshot below), but it's still not working. I'm gonna try installing the rest of the optional stuff later, to see if it makes a difference. It may be worth noting, I'm on Windows 7. All those SDKs are "Windows 10 SDK..." so I'm wondering if that has anything to do with it.

    alt text

    I also wonder if it could work in VS2015. I also have it installed, and I can open the project, it just doesn't build. It gives me a warning as soon as I open the solution: "warning : The build tools for v141 cannot be found. Install v141 to build using the v141 build tools."

    posted in Kode read more
  • S
    Skaruts

    @robert That may be the case indeed. I'll see what more I can install. And sorry about not posting the errors, at the time I posted this I forgot it had given me a popup with a message before, saying this:

    This version of Visual Studio is unable to open the following projects. The project types may not be installed or this version of Visual Studio may not support them.
    For more information on enabling these project types or otherwise migrating your assets, please see the details in the "Migration Report" displayed after clicking OK.
    - New Project, "D:\Works\Gamedev\Haxe\Kha\TestProject\build\windows-build\New Project.vcxproj"

    Non-functional changes required
    Visual Studio will automatically make non-functional changes to the following projects in order to enable them to open in Visual Studio 2015, Visual Studio 2013, Visual Studio 2012, and Visual Studio 2010 SP1. Project behavior will not be impacted.
    - New Project, "D:\Works\Gamedev\Haxe\Kha\TestProject\build\windows-build\New Project.sln"

    posted in Kode read more
  • S
    Skaruts

    I have Visual Studio Community 2017 installed, and it's telling me the project is incompatible.

    I'm using github's version of Kha as suggested in another question here. Although, I cloned it using the windows Github Desktop, not through the command line, as the command line one was giving me an error. As far as I can tell, there's nothing wrong with it (all the files seem to be there, including executables, etc).

    I also tried building the solution manually with Node (version 10.4.0), through the command line, but the result is the same. I tried compiling with Node, and it gives me an error about deprecated functions or something. I don't know if that's relevant for any of this.

    I have no clue what could be wrong.

    posted in Kode read more
  • S
    Skaruts

    @laxa88 said:

    Just thought I'd add a note on this topic. The non-alphabet keyboards do not return the correct value for mac. e.g.

    I just noticed the same thing for the F keys, they are returned as CHAR "p" (F1) to CHAR "z" (F11), and F12 as "{".

    Is there a workaround for this?

    posted in Kode read more
  • S
    Skaruts

    I'm trying to draw some tiles from a tileset, but I'm a bit confused. I need to know two things:

    I know about the drawSubImage() function from g2, and I'd like to know if that's really what I want for this.

    I would also like to know how to draw the tiles in different colors.

    Any help would be greatly appreciated.

    posted in Kode read more

Looks like your connection to Kode Forum was lost, please wait while we try to reconnect.