Ciao121's Recent Forum Activity

  • I started using this tutorial: https://www.scirra.com/tutorials/4997/r ... oard-basic

    But probably randomly is right. I don't need all those sprites.

    I'm trying a totally different approach.

  • You are absolutely right. Diep.io is really a good game and (for a newbie like me ) is really hard to do something better.

    In fact I abandoned this project. This has been really useful to learn.

    Now I'm tryiing to make something completely different.

  • Hi,

    I have a grid of 99X95 tiles. Total tiles is 9.405.

    I have an event like

    If cursor is over Tile -> So something[/code:cb2pnowd]
    This cause 9.405 collisions check per tick. Maybe this is normal, but does anybody know a better way?
    
    Thank you.
  • Thank you for your aswer.

    Anyway I had more problems using the turret behavior.

    It should work if every player joins before the game starts. But if a player joins after others players it's a little more complicated. Because I send all existing turrets from the server to the new player so the client can create those. But I have to send the all turrets in the same order those were created. Because (I think) if there are two targets at the same distance, the turret acquire the first created one. And if I do not send turrets in the same order those were created, in a client the target can be different from anothe client.

    Also my clients create objects at runtime that are not created on others clients. So uid and targetuid can differ from client to client (i.e. because while a new client creates turrets that it receives from the server it can create another object on the fly addng +1 to the next turret uid).

    All those poblems surely have solutions. Anyway it's little too bit complicated.

    I have found a workaround in this topic:

    It's not using the turret behavior but storing custom turret IDs and target IDs client and server side makes clients be synced.

    Thanks again

  • Hi,

    I'm trying to make a multiplayer game. BTW I'm not using the multiplayer object. I'm using websocket.

    Each player can create turrets. When a turret is created it should get another turret as target.

    If I try to use a single sprite object for everyone 's turret (they look identical but I can use a simple text to see who "owns" a turret) and the event:

    Turret -> Add Target -> Turret[/code:1esy9ver]
    Turret does not make difference from "my" turret and "enemy" turret (also the turret will self target).
    
    I can solve this by using two sprites objects; let say my turrets use the sprite "Turret" and enemy's turrets use the sprite "Enemy_turret".
    So I can do:
    [code:1esy9ver]
    Turret -> Add Target -> Enemy_turret
    Enemy_turret -> Add Target -> Turret
    [/code:1esy9ver]
    
    In this way my turrets should only target Enemy's Turrets and viceversa.
    
    But what if I want to have an undeterminated number (or a max of 5) of players?
    Should I clone all those sprites, events and condition? Is there (I think surely there is) a better way to do it?
    
    BTW I have an instance var in each turret with the player ID. But I can't find a way to use this as filter.
    Thank you!!!
  • Thank you plinkie! Very good sooooolution!

    badmoodtaylor, your solution is also good. To switch debug of/on at runtime.

  • Hi,

    I have a game with (i.e.) 1 sprite and a text object.

    Each time an new sprite object instance is created, also a text object instance is created for debugging purposes.

    I use those texts to display sprite's variable I need to check.

    If i delete the text object from the object's list all text objects references are removed from events/actions and that's ok.

    But if I later need the text object again I need to recreate it and recreate all related events.

    I'm looking for a way to disable this object when I do not need it (without deleting it).

    I can't simply disable the "create text object" even in the event sheet because those objects there are other references to those.

    I.e I have

    Select sprite where xxxxx

    Select text_object where xxxxx

    in the same event. And if the text is not created the event is not fired.

    Is there a way to disable object so all related events/actions are toggled disabled?

    Thank you!

  • Hi R0J0hound,

    looking at the xml make me understand how it works. Thanks!

  • How does it works? Wht's param1 and param2?

    Thank you!

  • plinkie,

    that's what I was doing. For some strange reason (maybe a particular browser setting) it was not fully working.

    Since I cleared browser cache one time it started working like a charm.

    Thanks and sorry for bothering!

  • Hi gumshoe2029,

    Thank you for your answer.

    I'm sure offline.appcache is updated (and in fact the text to reload the page is showed). In offline.cache there is also a list of all files needed to be refreshed (I think) including js files.

    If I clear my browser cache I have no problem. But I need to make it work for everyone. I can't ask users to manually clear their cache or to disable browser caching.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    I have read https://www.scirra.com/tutorials/70/off ... onstruct-2 but I have still some poblems.

    When an update is ready I show a text to say the user to reload the page.

    When, after uploading new files, I open the site I get these requests on apache:

    "GET /offline.appcache HTTP/1.1"
    "GET /index.html HTTP/1.1"
    "GET /offline.appcache HTTP/1.1"[/code:zswy6o7i]
    [b]After this the text to reload the page is showed. Until here is all working.[/b]
    
    Now this happens:
    I hit reload and on apache I can see that only images files and offline.appcache file are requested.
    No js or html files are requested to the server but is still loaded from the cache.
    So the game is not updated (maybe images are, but I did not change those so I can't know).
    
    Can somebody help?
    Thank you!!!
Ciao121's avatar

Ciao121

Member since 18 Aug, 2016

None one is following Ciao121 yet!

Trophy Case

  • 8-Year Club
  • Email Verified

Progress

9/44
How to earn trophies