Refeuh's Recent Forum Activity

  • Well... in the end a tool is just a tool, and there's always a balance to find between genericity+flexibility and productivity+ease-of-use.

    The C2 solution to simple multiplayer is quite elegant ; it's functional and it works easily. Obviously the design choices in terms of technologies and architecture mean it won't be suitable for every project (esp. on the security side due to the host/peer approach), but it's good enough for the kind of games you would expect to do with such a high-level tool.

    Part of good development practices is to choose the right tool for the right tasks. If C2 is not suitable for your project, or if you end up fighting the existing functionalities rather than using them, maybe a different tool would be more appropriate.

    There's always the possibility of trying to run your own match-making, signalling, routing, etc. but if the goal is to make a game and not create new technologies, and would suggest working your design around the existing limitations to keep focusing on high-productivity.

  • Just a small contribution -

    I don't think there's a solution, because there's no actual problem. That's just the way Internet works at the moment, and it's a big mess.

    The "actual" solution will be finishing the transition to IPv6 which will remove the need for NAT and NAT traversal. But that's not going to happen any time soon.

    For now, both developers and end-users need some level of understanding of networking technologies, to work around the limitations and be pragmatic to find suitable and acceptable options.

    Some platforms or big developers make it seem easier by solving some of the problems via their infrastructure, but in the end making a small online multiplayer game remains difficult

  • In your situation, you cannot rely on the local webstorage, but it should be possible to "serialise" the important states and data of your game session and store the info in a shared location (remote database, etc.).

    Possibly doable, but certainly not trivial, and probably a sizeable amount of work to get to work right.

    Maybe you can design your game around this limitation, and make the "save" data minimal and easy to manage

    In the current state of things, and given the philosophy of the framework, I don't think there's an easy solution to networking multiplayer saves. Maybe someone will prove me wrong, but it sounds like you'd need at least a database, some server logic layers with php/ajax, some custom load/save mechanism, etc. It would be convoluted, and you would lose the benefits of using C2, i.e. the high productivity for simple games.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The whole networking in C2 is built around the idea of using a signalling server to connect peers together in rooms/sessions. You don't connect directly and specifically to a host IP ; as such, there is no exposed support for a typical closed LAN infrastructure where a player would choose to be the host and others would connect to it via its local address.

    Nevertheless, you still have options ; you can run a signalling server locally and do some extra work. Or, if your LAN also has a shared internet connection, you can use the default C2 behaviour (using the C2 signalling server and sorting the NAT for you, making the LAN irrelevant)

    If you make a game, you should try to make it playable by as many users as possible. A closed LAN without shared internet is a rare scenario, these days ; my advice would be to use the built-in C2 features, which would save you time and would cover 99% of the situations.

  • Why not just have a lobby and handle peer connections as part of the implementation of the multiplayer logic ? The host can kick/reject any unwanted player, and you would need something like this anyway to deal with players being disconnected and/or trying to reconnect.

    Unless I am missing something, I don't think this requires any new networking features ; this requires little work but helps with genericity and flexibility, anything too specific is likely to be a limiting factor for other types of games.

  • Here's an example of "pre-rendered" effect with an animated particle used for an explosion :

    (grrr, can't post URLs apparently)

    opengameart.org/content/explosion-animated

    just add the http: ...

  • I never used Construct Classic, so I can't really comment on that - but as elisamuelps already pointed out simply by running the numbers, switching your effects to simple particle systems or animated sprites sounds like a good easy win.

    If your effects are causing the slow-downs, you need to find a way to re-create a similar effect more efficiently. This usually means less naive resource handling, less objects, less object creation/destruction, more sharing between objects, etc.

  • I think the only real kind of game C2 would struggle with would be "non-WYSIWYG" gameplay.

    For example, and to illustrate what I mean, a dungeon crawler. Not a rogue-like, but an old-style fake-3D dungeon crawler (Dungeon Master, Black Crypt, Anvil of Dawn, etc.)

    Graphics resources are only 2D sprites, the environment and the movement are tile-based, etc. but the problem comes from the fact that what the user sees is not what you edit when you create the game.

    The entire level design is a 2D top-down maze, but that's not how you play the game. All the data and game logic is handled in memory, and what is presented to the user is just a different representation of the world.

    This can be programmed very easily, but tools like C2 are designed to let you play what you design. I'm not saying creating a dungeon crawler with C2 is not possible, but it would be clunky and sub-optimal in terms of productivity.

    That applies to every genre that relies heavily on data management behind the scene. Everything else should be a good candidate for C2 or similar tools.

  • You might also want to look into profiling tools (such as Chrome DevTools, Speed Tracer, etc.) ; it might be difficult to link the result of your perf analysis to the structure of your C2 project, but it might give you an hint.

  • Hi -

    hard to say without more details, but here's a few generic performance tips :

    • check the version of your browser and graphics card driver, to make sure you're running hardware acceleration, and not a software renderer
    • use the debug pane to inspect how many entities your scene has, or which are the most expensive. A simple mistake in the logic or scene management could lead to a situation you're not expecting (lots of expensive entities outside of the viewport, etc.)
    • check your entities are running only the logic they need ; it's possible you have physics or collisions, or similar service enabled on objects that don't need it
    • try to isolate the problem by disabling bits of logic or gameplay. Collision, AI, effects, etc.
    • resource management ; it's possible to create simple "naive" situations that are complete perf killers, i.e. geometry that cannot be batched. E.g. "bad" effects with "unique" particles, or unique effects on sprites, etc.

    So... no easy answer, but the general approach is 1. narrow it down. 2. identify perf bottleneck 3. fix perf killer 4. repeat

    'hope that helps a bit.

  • outline.47 — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-sprite-fonts/outline47-413

    <h3>Small but legible</h3><div class="deshr"></div>

    • Incredibly compact yet readable and stylish sprite font !
    • Average character size is 4x7px (up to 4x9px for large symbols)
    • Suitable for low-resolution and pixel-art games

    <h3>Customisable template</h3><div class="deshr"></div>

    • Mix & match layers : 4 exteriors, 2 interiors, 1 effect
    • Easy to recolorise mono-hue resources
    • Supports C2 font scaling ; adjust character spacing as necessary

    <p>Supported characters : abcdefghijklmnopqrstuvwxyz0123456789_ .,:;?!'"^+-*/=%@#()[]{}<>$��</p><p>Note : A..Z and a..z use the same sprites</p><p>Instructions : this font uses variable width and negative character spacing ; use supplied .capx and event sheets for proper settings</p><p>Screenshot background artwork by Michele "Buch" Bucelli (http://opengameart.org/users/buch) ; used under CC0 license (public domain) only to demonstrate the font in context</p>

    Use this topic to leave comments, ask questions and talk about outline.47

  • [quote:1bnn3bqv]could we agree that a single update could be at least 3.5kb and if it is by default sent 30times a second... then can we agree we are going to have a upload bottleneck on a 1mb/s line?

    Absolutely, I will agree that 3-4kbytes updates, 30 times a second, will saturate a home-user 1mbit line !

    Though 3-4kbytes is quite a lot to describe the actions, status and updates of one single peer. That's ~2000 int16 or float16, and since the peer won't be running any critical gameplay logic for security reasons, there's usually not much more to send than just player input and actions, and a few miscellaneous useful bits of data.

    There are already lots of perfectly viable multiplayer games working with this limitation, including massively multiplayer ones.

    What I don't understand is why you consider the number of peers a relevant factor when analysing the upload bandwidth on the peer side ; it's very possible I got your point wrong, in all the confusion about room, sizes, sessions, etc.

Refeuh's avatar

Refeuh

Member since 28 Sep, 2014

None one is following Refeuh yet!

Connect with Refeuh