Fengist's Recent Forum Activity

  • Previously I used the text box to accomplish this and it was a challenge. I'm going to be adding in news to my app and I'll use the HTMLElement.

    To set up the HTMLElement, the text property under HTML holds your news. If you use HTML, check the box "Text like HTML".

    To get the scrolling you'll have to make changes to the 'inline style' properties.

    Make sure the word-break is set to what you want. Break-word will wrap the text based on spaces in your sentences.

    overflow-x will add in a horizontal scroll bar. Set it to hidden if you don't want a horizontal scroll.

    overflow-y will add in the vertical scroll bar. Set it to auto or scroll. If set to scroll, a vertical bar will always appear. If set to auto, the vertical bar will only appear when the text is larger than the box.

    You should get something that looks like this:

    The author of the HTMLElement also created a CSS injector that makes it real easy to add in your own css styles:

    construct.net/en/make-games/addons/166/inject-css

    If you play around with CSS much, you can come up with something like this which is also the HTMLElement:

  • They added an expression: unixtime

    Maybe make a feature suggestion for the rest of the date api?

    That should be built into a language like JS. Instead, what I'm discovering is that in JS you either have to include some huge library or write your own.

    I haven't checked the expression and I may. All I wanted to do was convert a unix time (in the future) to a date time string. I feel like landing on the moon would have been an easier task.

    But... I guess I expect to much from a programming language.

  • Well, I ended up just doing this.

    function timeConverter(UNIX_timestamp){
     var a = new Date(UNIX_timestamp);
     var months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
     var year = a.getFullYear();
     var month = months[a.getMonth()];
     var date = a.getDate();
     var hour = a.getHours();
     var min = a.getMinutes() < 10 ? '0' + a.getMinutes() : a.getMinutes(); 
     var sec = a.getSeconds() < 10 ? '0' + a.getSeconds() : a.getSeconds()
     var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
     return time;
    }

    Good reason for me not to invest a lot of time into learning JS. When the base code doesn't even have basic date/time conversions then it's still not a real language.

    Proof?

    Date.now() - gives the Unix timestamp in UTC.

    Date() - gives the date string in LOCAL time.

    Seriously? What logic came up with that?

  • And I'm having an issue with JS date's which make no sense.

    -> SkillFinished: Set text to Browser.ExecJS("Date("&UDATE&")")

    Doesn't matter what I set UDATE to, it spits out the local date time in HUGE string format.

    You are asking questions about an aspect of gaming that is a science unto itself. Here's a place to get started:

    https://medium.com/@narengowda/how-does-any-mmo-games-backend-work-df19b44f73a7

    To answer your question about how much hardware do you need: To sum it up, there's an old saying amongst those who hod-rod cars and such, there's no substitute for cubic inches (I guess liter's in today's world). The bigger the engine, the faster you can go. Same goes for game servers. There's no substitute for hardware and bandwidth.

    Running a game server on a shared host with 1gb ram and a platter style hard drive is NOT going to come close to a dedicated server with gobs of ram, an M.2 drive and massive bandwidth.

    Now that being said, there was an old multi-player game from the late 80's that easily handled 16 players on a server with bullets, lasers, and gobs of other events, all on 386 machines over dial-up using just one server to host the game.

    en.wikipedia.org/wiki/Netrek

    Have you changed versions of construct since you saved it? If you went back in versions and tried to load it, I have seen it give that error.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Legally, not much. Took a quick look and nowhere did I see where he'd put any sort of license on his works. Which means, by default, they are copyrighted.

    I also took a look on his Github and he has been pretty active on there. You might try to contact him and ask him what the license is on his works.

    github.com/rexrainbow

  • I agree. If I have the app installed and it asks to upgrade, it should upgrade the app and not just load the editor.construct.net/whateverbeta. Either way, now that beta & stable are sync'd and stable has the new functions, I've switched back to stable just to keep from getting asked to upgrade every time I run the app.

  • Thanks Ashley Is there any way to get the script to fire when only a specific layout is visible?

  • Not a JS coder but.

    function anipgbar(){
     var p = document.getElementsByClassName("animated"); // class name
     var orig = parseInt(p[0].getAttribute('orig')); // holds the original value of the pg bar
     var cval = parseInt(p[0].getAttribute('value')); // current value of the pg bar
     if (cval > orig) {
     p[0].setAttribute('value', orig); // set the pg bar back to original value
     }
     else
     {
     p[0].setAttribute('value', orig+1); // add 1 to the pg bar value
     }
     };
    
    window.onload = function(){
    setInterval(anipgbar, 2000) // run the function every 2 seconds
    }

    Is there any reason that shouldn't work? It's purpose is to animate a progress bar by increasing and the decreasing it's value. I know the css for it is loading and I know this works on codepen.io but it doesn't work when I load it into C3, and, I checked, it is loading the .js file.

  • Ashley I've been following the bug report. I just noticed. If I run C3 from the desktop icon and I don't update to the latest beta, C3 does not get the bar. However, if I create a new project with just a button and a browser and request full screen when the button is clicked, the project preview gets the new bar in both full screen and non-full screen.

    If I do update to the latest beta, then C3 gets the new bar.

Fengist's avatar

Fengist

Member since 6 Nov, 2015

Twitter
Fengist has 5 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies