Virpoja's Forum Posts

  • Multiplayer Shooter Template — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-game-templates/multiplayer-shooter-template-2846

    <p>Online Peer to Peer real time multiplayer game with:</p>

    • Fully functional Platformer style controls and mouse aiming.
    • Platformer style animation control in multiplayer environment.
    • Damage system with line of sight and impenetrable obstacles.
    • Visual effects such as hitting enemy or wall, muzzle fire and shells.
    • Respawning system with smart camera and player control.
    • Smooth scrolling camera and zoom system.
    • Weapon system with weapon swapping and stats such as damage and rate of fire.
    • Over 300 events and sh** loads of trial and error.

    <p>Notification! Construct 2 personal or business edition required.</p><p>Also, Capx is well commented, but it`s fairly complex so you have to be well familiarized with multiplayer examples in construct 2.</p>

    Use this topic to leave comments, ask questions and talk about Multiplayer Shooter Template

  • ISSUE SOLVED!

    Basically problem / bug was something completely different. (one event was missing peer.peerid = multiplayer.myID)

    • This caused peer and host to overlap positions on the peer side.

    Reason why I thought the problem was multiplayer ID, because i had set text string to show Id in the wrong way... (showed host id for everyone)

    So.... completely irrelevant "HOW DO I" post... Sorry about that

  • Also I forgot to ad. When the problem occurs, on the peer game instance both peer and host are shown in the same position. (because of identical multiplayerID). However when you refresh the browser window and log in again, everything works. It works like this every time.

    Whats the difference between first & second peer login? Maybe this helps...

  • Hello!

    I am having a big problem on my multiplayer project: https://www.scirra.com/arcade/multiplay ... team6-5795

    For what ever reason game instance for Peer doesn`t set peers multiplayer ID correctly. It some times leaves it complately unassigned and sometimes it sets same multiplayer for peer and host. It used to work fine. I set peerid`s the same way that they are set in multiplayer real time game example.

    Has anyone run to this kind of problem or knows a work around? Maybe something like "forcing" game instance to set multiplayerID?

    I don`t know what broke it, only guess I have is that when you have enough events in your multiplayer project events does not fire of correctly for everything to be set in the right way when connection is established or something... Does this make any sense?

    I know that without posting capx its difficult to give me a specific answer, but I mostly asking if anyone has pumped in to this problem before.

  • Thanks for your response gumshoe2029. I will PM you for more info!

  • Thanks for the info fm4fanAt.

    ATM. I am not intressed of running my own hardware. Mainreason being that I live outside of the city lights so to speak and there for I do not have access to really stable web connections (or even electricity for that matter).

    There for i would need a web hosting... So I still are in need of good entry level web host and some guidance how to start configuring my rented server? Again I only need to be able to run browser tabs on the server, nothing more. (I am guessing I need alot mor to actually do this tho)

  • Ok, maybe I was exaggerating a bit when I said that I don`t know anything about servers... I do know what they are, but I am not aware how to configurate them and which hosting service provider would be suitable for my needs.

    Many service providers have ton of different options and it is really hard to grasp what do i need...

    So basicly my needs are:

    • to be able to open browser tabs on the server
    • to have enough bandwidth to be able to host simple action game for about 40 simultanious players (players would be divided in 8 rooms.
    • bandwidth requirement would be around 20 bytes / peer
  • Hello!

    I`ve been toying with multiplayer games lately. I`ve made a small multiplayer action platformer using peer to peer techinique. You can check the game out in Scirra Arcade: https://www.scirra.com/arcade/multiplay ... 6-v10-5795

    Next i`d like to try programming multiplayer game that uses Client - host infrastructure. I am going to try method that Ashley is talking in this thread: multiplayer-discussion-dedicated-server-peer-and-client_t122599

    I do grasp the principals of peer / host programming in the way Ashley is referring on the thread, but....

    Problem is that I don`t know anything about servers... I`ve been searching for days and I still have no clue how to:

    • open browser tabs on server etc. (i know that I could do this on my own PC, but I am looking towards Web hosting)

    SO.... how is opening browser tabs on a server done? Would I need a hosted virtual machine for that or is there another way? Does any one know a good tutorial on setting up servers this way?

  • Got it!

    Thanks Ramones your code works perfectly. Problem was my collision system which was flawed. Again thank you for your help Ramones!

  • I tested this out. It works but collisions to other players seems to be buggy. I am guessing its because multiplayer object only updates every other tick and that doesen`t work well with this kind of raycasting. I`ll keep on testing and try to make improvements.

    So.... I am still looking for an answer to original question: "Is there a way to pick specific instance of multiple simultaneous overlaps?"

    Also thank you Ramones, even if I can`t get this to work I learned something new from you.

  • Thanks Ramones, looks very promising!

    I`ll have to test this in my full project. I think this is going to work well in that too. I am bit worried it makes controls feel bit laggish since I am implementing this in multiplayer environment. On the other hand target should always be between player and wall so it might not be a problem.

    I`ll run some tests

  • Hello again!

    Once again I find my self in need of help from the ever awesome Scirra community.

    Here`s my problem:

    I need to find a way to pick a specific instance of an sprite from several overlaps. I am trying to create a "laser" which would always set its width according to nearest wall in Shooting direction. (so not just nearest to the player for instance, but the wall that would be hit first so to speak.)

    Problem is that all the instances are hit simultanously so i can`t exactly pick the one which was hit first. I`ll attach sample Capx, that should clarify what I am trying to achieve.

    As always, any help is welcome and thanks in advance!

    here`s Capx: https://www.dropbox.com/s/61a8isd1rg735 ... .capx?dl=0

  • Thanks for getting back to me lennaert.

    I got this to work, with a little workaround.

    I created separate sprite as a target for the turret. Then attached target sprite to only those peers that are not the player.

    Works like a charm, but since there is now second object that moves 1 tick or in multiplayer environment 2 ticks after the peer, the latency might be an issue.

    I`ll have to test this more and maybe try to find some improvements.

    Thanks anyway, and here`s Capx to show my progress. https://www.dropbox.com/s/kxus09e8sqs2f ... .capx?dl=0

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • UPDATE!

    I`ve figured out some bits of this. I got "AutoAim" to work from host side on prototype level.

    I used: set lookx to Peer(Peer.peerid<>Multiplayer.MyID).X

    to pick enemy player and to set player Aim Position.

    Now i need to figure out how to do this on the peer side.

    Again, any help is welcome.

    Also here`s Capx

    https://www.dropbox.com/s/eeklkieiwswat ... .capx?dl=0

  • HI!

    I am trying to tackle a simple multiplayer action game (and I know it`s nowhere near of simple to implement).

    Anyways, wanted to ask if there`s anyway to use turret behavior to "target" another player?

    I mean like attaching turret to player (peer) and to add target enemy player (peer).

    I am using the real time multiplayer example to test this out, so i do not have CAPX that would clarify this more.

    Also if turret behavior cannot pick specific peer (which I suspect is the case), is there a way to pick different Peers "manually"? For example use lookX lookY variables to aim at the location of another peer. I have experimented with this but I am having really hard time picking specific peers..

    Anyway, I hope some1 can point me to right direction.