Results 1 to 1 of 1

Thread: What is this?

  1. #1
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,083 Times in 753 Posts

    What is this?

    Yo all,

    I prepared this project for several months behind the scenes and now finally put this slowly into public. Even back in the CoD2 modding times years ago I always dreamed about a technology to let people play in servers just by sending them a link. Back then it was barely possible, you only had shitty Adobe Flash and some JavaScript etc... but times have changed.

    Every modern browser nowadays is a full blown near-native 3d renderer. The two buzzwords are WebGL and WebAssembly.

    So what is libwebgame? I ported the ioquake3 engine over to web (it still works on PC for local development in Visual Studio). Since it is/was only a bunch of C code, it was mostly just modded by some diehard C coders. And even if you are good in C, you might simply not wanna do it, because C is aids when you quickly want to prototype stuff. So I worked hard to nicely integrate the Julia scripting language. I added some constructs to it so it feels nearly like CoDScript.

    For example, if you want to create a guided rocket, this is easily possible via some Julia code:

    https://github.com/KILLTUBE/libwebga...acks/rocket.jl

    PHP Code:
    function ControlMissile(player::Playerrocket::Entity)::Void
        log
    (consolerocket"start control for"player)
        while 
    inuse(player) && inuse(rocket)
            
    posPlayer getEye(player)
            
    posRocket pos(rocket)
            
    distancePlayerRocket distance(posPlayerposRocket)
            
    targetDirection Float32(100.0)
            if 
    useButtonPressed(player)
                
    targetDirection Float32(-100.0)
            
    end
            rocketDistanceForward 
    posPlayer forward(player) * (distancePlayerRocket targetDirection)
            
    movetoVelocity!(rocketrocketDistanceForwardFloat32(400))
            
    threadwait(0.05)
        
    end
        log
    (consolerocket"stop control for"player)
        
    nothing
    end 
    Julia feels somewhat like CoDScript, just with a way better type system and being more dynamic. E.g. you can edit/update your mod while your players are immersed in your gametype. And best of all, Julia is JIT-compiled, meaning your source code is competing with C/C++ performance (you can still write shitty source code, than you are competing with Python performance lol).

    Currently there are still some rough edges to get your own website and mods running, but I will work to ease all of it
    timescale 0.01

  2. The Following 4 Users Say Thank You to kung foo man For This Useful Post:

    kubislav23 (18th May 2018),Mitch (19th May 2018),Whiskas (23rd May 2018),ysniper (26th January 2019)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •