Jase5z's Recent Forum Activity

  • I've been randomly trying different things and I somewhat got this to work.

    First off, I went to MathJax and LaTex instead of KaTex. I also used the example code for that C3 LaTeX thread.

    main.js is standard except for this line

    import * as MathJax from "./load-mathjax.js";
    

    I can get LaTex to render right the first time I provide the CDN link. It won't work after that unless I change the CND link again. Is there some kind of a Cashe or some other one time only run setting?

    load-mathjax.js

    window.MathJax = {
     tex: {
     inlineMath: [['$', '$'], ['\\(', '\\)']]
     },
     svg: {
     fontCache: 'global'
     }
    };
    
    (function () {
     var script = document.createElement('script');
     script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3.1.4/es5/tex-chtml-full.js';
     script.async = true;
     document.head.appendChild(script);
    })();
    
    // script.src = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML';
    
  • I want to create math equations with Katex in my project. Any help you can provide would be appreciated.

    KaTex with the CDN link->https://katex.org/docs/browser.html

    I have read this forum post (and many others) ->https://www.construct.net/en/forum/construct-3/general-discussion-7/latex-text-editor-c3-145256

    I have addons CSS and HTML Element both by Strani Anelli el3um4s

    Here is main.js that is in Scripts folder.

    // Import any other script files here, e.g.:
    // import * as myModule from "./mymodule.js";
    
    runOnStartup(async runtime =>
    {
    	// Code to run on the loading screen.
    	// Note layouts, objects etc. are not yet available.
    	
    	runtime.addEventListener("beforeprojectstart", () => OnBeforeProjectStart(runtime));
    	runtime.addEventListener("beforeprojectstart", () => LoadExternalScript(runtime));
    });
    
    async function LoadExternalScript(runtime)
    {
    	await runtime.assets.loadScripts("https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js");
    }
    
    async function OnBeforeProjectStart(runtime)
    {
    	// Code to run just before 'On start of layout' on
    	// the first layout. Loading has finished and initial
    	// instances are created and available to use here.
    	
    	runtime.addEventListener("tick", () => Tick(runtime));
    }
    
    function Tick(runtime)
    {
    	// Code to run every tick
    }

    Tagged:

  • * One doesn't have to be a master to make a learning tool.

    https://i2.paste.pics/ba74af57e4c72672a35ae09aad6d0664.png

    Here is a potential interactive learning tool to teach how gears work and their relation to ratios.

    Users might be be able to select how many keyed shafts to use. Next, they could stack different gears on the shafts. Finally, the program could spin the gears for us see how they would move. I don't have to be a mechanical engineer or master mathematician to see this. A similar concept would apply to the pulley.

    * YouTube and other videos are a lecture with distracting video. Listening to others talk is not how most people learn the easiest. Videos are common because they are easy to make, not because they are superior at helping the viewer learn.

    * Interactive learning activities is somewhat new. Does this explain why this thread isn't getting any good feedback?

  • How easy is it to make learning tools? I'm not talking about learning code. It's subjects that are better taught with pictures and interaction then with books full of words and static images. Another buzz term for what I'm looking for is interactive learning media.

    I'm sure it's possible to do what I want but I want to know how easy it is and any see some examples others have completed.

    Thanks in advance :)

  • I've been looking into the Websocket idea. Would I setup a Python local host server running on the same machine as the C2 App? I understand this isn't the place to ask about the Python portion of this. Although, some help pointing in the right direction would be much appreciated.

    I'm not able to find any Javascript code that works with client side computer memory addresses. This path seems highly unlikely.

  • I'd like to use Python in conjunction with C2.

    It appears possible to use Node-Webkit to read, write, delete, append simple text files in JSON format which act as the adapter.

    Is this the only way? Would it possible to make a C2 plugin that has full read and write access to a specified block of memory? I believe using a memory block as an adapter would be a lot faster then a file.

    Currently I want to use Python for Sqlite and a tool to parse text log files (generated by 3rd party application) in fractions of a second.

  • Curious how many people use, say Blender, to draw 3D characters and animate them. Then, use tools to render animation frames to 2D sprite sheets. Blender lets you control camera angle making it easy to produce different perspective based 2d art.

    Drawing the art is likely just as if not more time consuming but once its done in Blender you can change the sprite sheets a lot easier then redrawing 2d sprite sheets.

    Also, I like Inkscape.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • rogerfgay, Thank you for the conversation. I've come to the conclusion that at this point its all just too complicated for my script-kiddy skill level.

    To answer your original question, "What do you want?". Simple, a way to set up a server using c2 style coding. An example might entail: I put a c2 file (this is server code!) in a dropbox linked application, rent some server space, then the application takes my server code c2 file and sets it all up. Finally, I use a different c2 file with client code to complete the communication circle.

    The types of games I'm going to demo and describe will have much of the information needed on each user's machine ? i.e. data that comes in with the web page. Messages from the server will trigger behaviours in each browser that each browser-side program already knows how to do. If you want to set perspective to a particular place on a map, just send the map coordinates. If you want one of the players to move somewhere, just tell it where to go and what behaviour it should use to get there (run, jump, walk ?.) The rest of the logic should be in the browser already.

    Word of warning, players will use cheats and spoofs if you do too much game logic or persistent data storage client side. In your example I could use Cheat Engine to hack the memory address for player position and perform teleport-like movement around the map.

    I've seen many people comment that the best way to handle this problem is to make it so the client only handles capturing user input, sending this input to server, and rendering what the servers tells it too. All game logic and persistent data storage are on server.

    Then again, If you just playing with a bunch of buddies on local network or lan party I'd hope they aren't try to cheat!

  • I'd like to ask a question back. For you, what seems to be the difference between 50 and 100 ms? I mean to the game design you have in mind?

    ....

    So can any good server [does what Tornado claims]. So, not being familiar with it, I can's say why I'd use it.

    ....

    It's really my goal to provide the framework (based on HLL Framework) around the HLL WebSocket server that will be easy for a lot of people to use.

    I'd like to know what kind of time frame client and server can communicate. I guess if I'm constantly seeing less then 100 ms in most all domestic US stuff I can assume a WebSocket can do the same.

    I'm only looking at Tornado because its written in Python. I don't know JavaScript. Although, I probably should learn it so I can make C2 plugins. Teaching myself and using either Oracle's Java or a C variant are not an option for me.

    How are you trying to make it easy to use? It seems to me the problem is its not easy to setup the server. In order for the majority of C2 users to start using WebSockets we'd need a non-coding really simple way of setting up the server. I guess what C2 needs is a plug and play server where we upload a C2 exported html5/WebGl project that acts as the server. How about creating a Dropbox Application? With this users can drop their server C2 files there and easy-setup program takes over from there.

    I'm now wondering if it would be possible to use C2 to make the server side program. I don't know how many concurrent connections a C2 created app can handle. Then there are all the logic decisions to handle 100's of different entities doing things, and finally the database is likely another issue. Perhaps a C2 plugin could be made to interface with SQLite.

    My basic idea for a game uses a scheme where client and server send/receive dictionary of arrays in JSON format. It would be an isometric view adventure, hoarding, building game.

    * the Clients job is to capture user input (keyboard, mouse click, I'm not sure how to do mouse stroke yet). Format it into and array, then asJson, and send to server. The client uses JSON data received from the server to draw the world relative to its view point. In other words making and sending serialized user input; and receiving view point relative drawing information.

    * the Server stores all persistent data in a data base, does all logic, and sends what the clients needs to know to render its current view.

  • rogerfgay, I enjoyed the article. Not sure why I thought it was going to teach me how to setup a websocket server. None the less, great read!

    I'm curious about your take on the WebSocket C2 manual entry section, "WebSockets and multiplayer games".

    scirra.com/manual/153/websocket, section

    What is a reasonable time frame to expect a client and server can constently communicate: 50 ms, 100 ms, more? Assume were talking about a client and server being in the USA.

    I find this all very interesting but my coding skill is limited. I can probably figure out Python Tornado, tornadoweb.org/en/stable/, for web server code. I guess its time to start tinkering.

  • FuzzyLlama   Go back to page 3 and read Pode's last post. I wish we could control Z-order too. In my test I tried z-order bar, putting svg on its own layer below others, and using run time move to layer actions.

  • tulamide   Thank you! It makes sense why it wasn't working, great explanation.

Jase5z's avatar

Jase5z

Member since 28 Jan, 2013

None one is following Jase5z yet!

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies