WASM -> BotF for Browsers?

You can talk about anything. (please read forum rules before posting)

Moderator: thunderchero

Post Reply
User avatar
Benman2785
Commander
Commander
Posts: 276
Joined: Fri Mar 20, 2009 2:00 am

WASM -> BotF for Browsers?

Post by Benman2785 »

Hi,

how much of the source code is known or reversed so that we can create a version for Webservers?
i would LOVE to play "my" BotF in my browser :)
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 8589
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: WASM -> BotF for Browsers?

Post by thunderchero »

Benman2785 wrote: Sat Nov 09, 2024 7:45 pm Hi,

how much of the source code is known or reversed so that we can create a version for Webservers?
i would LOVE to play "my" BotF in my browser :)
probably not enough, but why can't the webserver run the original exe in a browser?
User avatar
Benman2785
Commander
Commander
Posts: 276
Joined: Fri Mar 20, 2009 2:00 am

Re: WASM -> BotF for Browsers?

Post by Benman2785 »

well, not sure if i can use dosbox emulator to do that -> will try it
also this is a high security risk

but a .wasm has the benefit that its calculated locally in the browser -> all the server does is providing the data and your home-pc runs it
also: it works on (nearly) all os -> you can play it on MacOS / Linux / Android ;)

what i want for BotFweb is something like this: https://hoffmeister.li/diablo_web_simple/ (here Diablo 1)
User avatar
Benman2785
Commander
Commander
Posts: 276
Joined: Fri Mar 20, 2009 2:00 am

Re: WASM -> BotF for Browsers?

Post by Benman2785 »

maybe i found a way: js-dos supports dosbox-x -> in dosbox-x i can run Win95 or Win98SE -> there i can run BotF = all in my browser xD
will test this soon
User avatar
Benman2785
Commander
Commander
Posts: 276
Joined: Fri Mar 20, 2009 2:00 am

Re: WASM -> BotF for Browsers?

Post by Benman2785 »

IT WORKS!!!
yet only 800x600 and is kinda slow -> but it works!!!
EDIT: i improved performance -> using js-dos v8 and Ryzen 7 5800X3D i get ~120k cycles -> game is like 95% fluid and combat is a little laggy -> yet it works

how i did it:
1. install Win95A on an hdd.img (160mb would be enough -> i used 256mb), set it to 800x600@16bit
2. install DCOM95; DirectX 6.1; DOSBox-X Mouse Integration; S3 Driver v2.11.03 (latest for Win95)
3. use (Vanilla) BotF (800x600) -> put it into .jsdos root-folder
4. apply "lower_CPU.patch" & "remove unneeded rendering calculations.patch" -> this gives like 10-15% more performance
5. here my dosbox.conf cpu settings:

Code: Select all

[video]
machine=svga_s3
vmemsize=8
vsync=false
fullscreen=true
vesa modelist width limit=0
vesa modelist height limit=0

[cpu]
fpu=true
cputype=pentium_iii_prefetch
core=dynamic
pageing=true
apmbios=true
apmversion=1.2
a20=true
protected_mode=true
cycles=auto 150000 95% limit 300000
integration device=true
6. here my load script for js-dos (

Code: Select all

    Dos(document.getElementById("dos"), {
        url: "/js-dos/games/BotF.jsdos",
	backend: "dosboxX",
	backendLocked: true,
	workerThread: true,
	noCursor: true,
	FullScreen: true,
        theme: "dark",
        noCloud: true,
        mouseSensitivity: 0.42,
        imageRendering: "smooth",
        renderAspect: "Fit",
        autoStart: true,
    });
7. play and enjoy :)
8. we can save the games locally in the browser (left upper corner) -> do want you want to do -> klick save -> wait for confirmation -> shut down Windows
User avatar
Benman2785
Commander
Commander
Posts: 276
Joined: Fri Mar 20, 2009 2:00 am

Re: WASM -> BotF for Browsers?

Post by Benman2785 »

BotF vanilla (german) (275mb)
https://hoffmeister.li/js-dos/BotF.html

BotF modded (the way i play it - german) (280mb)
https://hoffmeister.li/js-dos/BotF_mod.html
User avatar
Bahamut2703
Ensign
Ensign
Posts: 32
Joined: Tue Apr 01, 2025 2:22 pm
Location: Germany Essen
Contact:

Re: WASM -> BotF for Browsers?

Post by Bahamut2703 »

Genial Idee @Benman2785 !. Ich werde es auch mal Ausprobieren :grin: . Gruß Bahamut2703
User avatar
Benman2785
Commander
Commander
Posts: 276
Joined: Fri Mar 20, 2009 2:00 am

Re: WASM -> BotF for Browsers?

Post by Benman2785 »

danke - bin super froh dass ich nun einige gute Game überall spielen kann :)
User avatar
Bahamut2703
Ensign
Ensign
Posts: 32
Joined: Tue Apr 01, 2025 2:22 pm
Location: Germany Essen
Contact:

Re: WASM -> BotF for Browsers?

Post by Bahamut2703 »

Hey everyone, a new project, the BOTF MOD by Benman2785, starts on December 26, 2025. Is it possible to play BOTF in a web browser? We'll find out. Here's a preview video: https://www.youtube.com/watch?v=u0ODix8BA0o&t=63s

Here's the Playlist Link : https://www.youtube.com/watch?v=WbqGU5G ... X23g-LXEN4

Bahamut2703
User avatar
Benman2785
Commander
Commander
Posts: 276
Joined: Fri Mar 20, 2009 2:00 am

Re: WASM -> BotF for Browsers?

Post by Benman2785 »

with HADES 2.2 and now working 3DFX HW acceleration in jsdos we have a better experience (not native fast - but better)

https://hoffmeister.li/js-dos/BotF_H.html
https://hoffmeister.li/js-dos/BotF_modH.html
User avatar
cleverwise
Captain
Captain
Posts: 635
Joined: Sun Jul 28, 2013 3:09 pm
Location: 127.0.0.1

Re: WASM -> BotF for Browsers?

Post by cleverwise »

This is an interesting test. Are you doing this just locally, on your own LAN, or are you trying this with a remote server in say a data center?

I am curious to how much load is on the server side and how much data is flying back and forth. The network traffic should be fairly low especially compared to modern games.

I will say browsers are beasts with resources and far from very efficient but the fact you can play it in one is a huge feather in your cap. Congrats!
It is your turn to get out and push the starship!
Post Reply

Return to “General Chat”