Toby R's Recent Forum Activity

  • Host is the first player who connects to the signaling server room/game. So yes - you just have to put it on some server, run it and keep it alive (simply not killing the process). That's how you get a stable game no matter how many players connect or disconnect, because the first one (host) is all the time online.

    You said that you know how it works and that you've managed to do a Multiplayer game so I am confused about the part where you say "how a server is used through the events". What exactly is unclear for you here?

    Regarding this "My knowledge so far is that the browser object are being used to open a new tab on the server and then so the multiplayer object uses that tab to join". I don't think that browser object has anything to do here. Multiplayer object and signaling server take care about communication via WebRTC.

  • I'm not sure if I understand your question.

    To put host game instance on the server, I believe you can simply export it to NWjs and run it on the server.

  • Maybe something has changed since last year - I haven't tested it recently. However last year when I was releasing my trivia game I clearly noticed that every layout first loading took on my mobile approx 2s. Then every layout second (and n-th) loading took about 0.5s. So the difference was clerly noticable.

    Now regarding RAM. It depends on how the program is written. I am not sure how C2 works atm. But system does not clear any RAM data "by default". Clearing RAM takes time as well so data usually stays there even if it is not used and then some GC (Garbage Collector) clears it periodically. Or you can do it manually by coding as well ofc.

    And let's say I have an app exported to desktop. My laptop has 16GB of RAM. It is "strong enough" to keep in RAM whole game even if it is not being used. But access to the RAM memory is much faster than HDD read so the game would be much more optimised if all the data would remain in RAM rather then be cleared and loaded everytime the layout changes.

    For mobile devices it is a bit different story cause we usually have 1-3GB of RAM which is not that much and indeed sometimes RAM might be not big enough. In such cases unused data will be overriden by the new data.

    I am not an expert, just saying how I see it based on my knowledge and experience.

    Now the last thing to say here is that putting all objects in one layout is not a good practice when you think from the perspective of being a good coder. Good code is semantic and hermetised code, which means (in short) that every "thing" should be where it belongs and nowhere else.

    But loading everything on first layout is acceptable even for good developers in C2 simply because of performace.

    But then again if for some reason data is cleared when you swich to other layout... then there is absolutely no point doing so. It requires testing on various platforms and various mobiles to be sure how it works I believe. Nice topic tho!

  • The need for native mobile exporters is getting more urgent every day!

    Well I think the opposite. The need of native import is less important everyday now. C2 biggest problem comparing to other engines is the performence for mobiles apps. It's because whatever you do in C2 your output is HTML5 and then you have to wrap it to whatever you need. Now keep in mind that even though you can't build very big complex mobile games with C2 due to the performance issue, you still have a tool which lets you build apps in the fastest and most comfortable way on the market.

    Imagine now what will happen in a year or two from now. Power of newest mobiles like SGS6 is higher than the average 3 year old laptop. In a year from now SGS6 will not be the newest and most powerful, it will be the average. What I mean here is that day by day we are getting close to the time where performance limitations won't be really a problem for an average user.

    Now keeping pressure on Scirra to make a native export is pointless. It would be a tons of work for them to implement something like that. And even if they'd decide to do it, it would probably take a year or two. So there is no point cause in that time wrapped HTML5 will work fast enough anyway.

    Now regarding Cocoon IO and IntelXDK. I see there are people voting for and against. Eeach of them has a reason. It looks like it depends on the game itself, plugins used etc.. So if your game release is a serious thing then just take a shot and test both.

    Noone is complaining for no reason, that's clear. Both XDK an IO have some issues. But then again remember that it is not forbidden to use any of them. You do have a choice.

    It reminds me the old times before W3C actually started to do their job. All browsers had their own rules for parsing/interprating CSS,JS and even HTML. That was a real nightmare for frontend developers that time .

    Now we have one project in C2 and it behaves differently when you wrap it with IntelXDK or others... I believe there will be a time soon where it will be obvious what to use OR it will have no matter what to use.

  • Anyone have the same problem? I can't get custom Loader layout working as well. It worked with my previous mobile game (Crosswalk), and now I see only default scirra progressbar.

  • I think everyone of us had that kind of trivial issues which blocked him for hours. You just simply cannot see the obvious for some reason .

    Several days ago I lost few hours wondering why my sprite is not moving, and it turned out that I accidentally typed "=" instead of "+" character in some variable calculation...

    I call it a "ghost error". You know it's there... you know it's simple.. but you can't see it!

  • This is a built in functionality.

    [quote:8y22r9q9]Predictive aim

    A useful feature of the Turret behavior is the ability to use predictive aim.

    https://www.scirra.com/manual/152/turret

  • AI aggresison. Chase and kill. — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/ai-aggresison-chase-and-kill-2023

    <p>This template shows how to implement aggressive enemy AI to your top down shooter or RTS game.</p><h3>The Game</h3><div class="deshr"></div><p>You are a zombie in the woods. There are also two hitmans whose job is to find and kill you. They are patroling their spots and once they spot you they will chase you until they kill you.</p><p>Hitmans have a gun which have a limited range so they have to get close enough before they shot.</p><p>As a zombie you can hide behind trees and crates so they could not see you.</p><h3>What this template shows</h3><div class="deshr"></div>

    • How to make enemy aggressive once they spot you.
    • How to make enemy chase you no matter where you hide. Enemies cannot see, move or shoot through "walls".
    • How to limit shooting enemies range of shot and make them come closer before they make shot.

    <h3>Technical details</h3><div class="deshr"></div><p>This template does not use any external plugins.</p><h3>Credits</h3><div class="deshr"></div><p>Assets used in this template comes from Kenneys free assets. Thanks Kenney!</p>

    Use this topic to leave comments, ask questions and talk about AI aggresison. Chase and kill.

  • Does anyone knows where can I find license data for assets from http://rpgmapshare.com? I see almost every asset is marked as "Usage: Personal and Commercial". But I see no word "free" there... so I'm not sure if I can use these assets in my game or not?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It really depends what you mean. I assume you are talking about Multiplayer object (WebRTC channels). Well designed real-time multiplayer game is the game where peer/client cannot cheat. It means that any action which has an impact on the game and the "fairplay" should go through the host and he is the one to say if this move is correct/allowed or not.

    But obviously there are some action which does not affect overall gameplay, for instance when player goes to the menu and change some setting (sound volume - that is trivial, but you know what I mean) then there is absolutely no point to inform host or other players about that.

    Basicaly when you write multiplayer game it's you (the designer/developer) who decides which data gonna be sinchronized and which won't. Multiplayer object just gives you great tools to do it.

  • I am sure they are. Try to put a lot of assets to the second layout and try to switch between them with System -> go to layout. You will notice that the first time you go to layout 2 takes time, but already second time is very fast (at least on the devices which have enough RAM to hold the data).

    I think it's pretty good practice to put the assets on the first layout because it's the only one layout where you can implement the progressbar, so player at least see that something is being loaded.

    But! It obviously depends on the project size. I think it's a good practice only in a medium size projects. For small projects there is no point since there are usually few small assets. ,

    Now in big projects you might have really a lot of stuff which would be really a pain for user to wait for all of them being loaded. In such case you should have it organized on the layouts that use them.

  • I doubt anyone can help you based on information you provided. Explain exactly what is going on. Posting capx would be also very helpful.

Toby R's avatar

Toby R

Member since 23 Mar, 2015

Twitter
Toby R has 18 followers

Connect with Toby R

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x6
    Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

14/44
How to earn trophies