Steam Html dosent work ousite the root

Previous topic - Next topic

D2O

Hello,

I bought the HTMl module via Steam.
It works great at first.
But what do I have to do, so that the .js, .data and .wasm files
are in a lower or and the .html file is in the root?

Calling up with <script src = "jscript/timer.js"> </script>
Instead of <script src = "timer.js"> </script>
doesn't work.

Thank you
And a happy new year.
I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

spacefractal

im did many of the fixes in this thread, which you should look in:
https://www.glbasic.com/forum/index.php?topic=11576.0

Genius.Greedy Mouse - Karma Miwa - Spot Race - CatchOut - PowerUp Elevation - The beagle Jam - Cave Heroes 2023 - https://spacefractal.itch.io/

D2O

I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

dreamerman

It would be nice to have some list of functions not working in HTML target and possible workarounds, in one post or something. Fully working HTML5 game can be for example packed into UWP or whatever it's now called and played on Xbox consoles. That's off topic but C++ inline and additional libs like SDL are not supported most likely, as SDL has some HTML5 port from what I remember.
Check my source code editor for GLBasic - link Update: 20.04.2020

Kitty Hello

inline C++ is fully supported in HTML5. If you have the source for libraries, they might work, propably, too.

D2O

Ist eigentlich ein ganz simpler Timer,

Code (glbasic) Select
// IDE Version: 16.793


// SETCURRENTDIR("Media") // go to media files
ALLOWESCAPE TRUE


GLOBAL fps_time% = 0,fps_temp% = 0
GLOBAL frametime% = 10000 // millisecs

SETSCREEN 800,600,0

GLOBAL dip1% = TRUE, dip2% = TRUE

//--------------------------------------------------------------
SETLOOPSUB "MainLoop"

SUB MainLoop:
        fps_time = GETTIMERALL()
        IF (fps_time-fps_temp)> 1000 AND frametime > 0

                frametime = frametime - 1000
                fps_temp = fps_time

        ENDIF






        IF frametime = 0   THEN dip1 = FALSE


        IF dip1 = TRUE
            DRAWRECT  100,100,100,100,RGB(0x00, 0x80, 0x00)
            PRINT frametime/1000,110,110

        ENDIF

IF MOUSEAXIS(3)
    frametime = 10000
    dip1 = TRUE
ENDIF


PRINT getfps()+" FPS",10,10
PRINT "left mousebutton reset", 10,40


SHOWSCREEN
ENDSUB
//-------------------------------------------------------------




FUNCTION getfps:

STATIC fps_time%,fps_counter%,fps%,fps_temp%
    fps_time = GETTIMERALL()
    fps_counter = fps_counter + 1
        IF (fps_time-fps_temp)>1000
                fps_temp = fps_time
                fps = fps_counter
                fps_counter = 0
        ENDIF

        RETURN fps
ENDFUNCTION

Aber vielleicht rufe ich das scribt nur falsch auf ??

Habe es mit
</script>
<script src="jscript/Timer.js"></script>
und
<canvas id = "canvas" = "event.Preventdefault ()"> </ Canvas>
<Script Type = 'Text/JavaScript'>
var module = {
Canvas: (Function () {return document.getelementbyid ('canvas');}) ()
};
</script>

<script src = "timer.js"> </script>
versucht.
Ist das script aber in der gleichen ebene wie die html Datei
funktioniert es.
</script>

<script src = "timer.js"> </script>
I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

dreamerman

@Kitty Hello
Good to hear that, as it gives hope for possible other targets like TV's, as they should support WebAssembly, at least I hope so.

@D2O
What error is visible in browser's JS developer console (or however it;s called in other browsers beside Opera), other thing is that from what I remember GLB used some internal http server for testing html5 projects, are you using separate client like Xampp?
Check my source code editor for GLBasic - link Update: 20.04.2020

D2O

Ok, ich nutze keinen http Server wie xamp und co.
Ich lade das ganze immer auf den Online-Server.

Jetzt wollte ich das ganze nochmals frisch erstellen und als beispiel hochladen.
Und was ist, jetzt wird  nur die dummy htmal erstellt.

Ok, das ganze wieder deinstalliert und neu installiert.
Nix, nada... lässt sich wieder nicht erstellen.

Da gibts ja noch etwas mit den Icon Dateien, ok überall rein kopiert, hilft aber nichts.
'

Ich bin echt ein ruhiger geselle, aber mir reichts jetzt.

Wenn ich an die Anfangszeiten denke, GLB Installieren, bisschen den HOME Pfad anpassen....
Android läuft, damals sogar Iphone (noch ohne MAC ;)  )...

Und jetzt habe ich jedes mal das gefühl, GLB wird verschlimbessert.

Ich steig aus, vielleicht packts mich in einem Jahr wieder, aber aktuell muss ich mich nur ärgern.

I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell