Soulmachine's Forum Posts

  • Hello.

    I've made some multiplayer games but they seem not to be able to connect between the host and peer any more - and I wonder if I missed some update or something to the multiplayer object?

    There's 2 multiplayer games I've made and I've uploaded them to my website.

    They worked perfectly about a year ago - but not anymore.

    They work if I open two browsers on the same computer but if I try to connect from another computer, or phone the peer cant connect to the host.

  • Hello

    the system expression: loadingprogress will not show/work in Firefox

    I've made a little updater with a progress-bar going from 0-100%

    Everything works perfectly fine in Chrome, but not Firefox.

    As the update is loading I see the progress meter going from 0-100 in Chrome, but in Firefox it sits on 0% and will not change at all until 100%

    I've tried to solve this for a long while now, anyone out there with similar problems?

    Thanks!

    ///Soulmachine!

  • Construct 2 games updates automaticly in the background but the update will not show until you have reloaded the game in the browser.

    You could use the "Browser" On Update Ready...

    And use that to show a reload-button, that reloads the browser when clicked.

    Kind of like this:

    This is the simplest way I can think of to do it.

    The downside is that - the player may have started the game and played for a while when the refresh-button gets visible. And if the player clicks it, all game progress will be lost.

  • You could use the Browser-function/plugin to Update your game... You can make an auto-update.

    Perhaps this is helpful: https://www.scirra.com/tutorials/70/off ... onstruct-2

    The Browser can register if there's a newer version of the game compared to the version that is in the cache, and then update the game.

    I use this to update my games.

  • The bullet behaviour works very good for ships - as they are always moving a direction. Like a sailing ship that gets affected by the wind. Then you only have to turn clockwise or counterclockwise to steer the ship.

    My ship do not have engines, they are sailing.

  • Hello.

    I get different results in Firefox and Chrome - when I use the system: loadingprogress to show progress when updating the game.

    I have a spritefont saying "Downloading Update...( xx% )" and also a Tiled Background showing a progress-bar.

    The events are set up in this fashion :

    ***Every tick

    * Set text to: loadingprogress * 100 %

    * Tiled Background set width to : loadingprogress * 100px

    ***On update ready

    *Set reload-button visible

    *Set reload-button enabled

    In Chrome both the text and bar shows the percentage loaded - but after they've reached 100% the reload-button never shows.

    In Firefox both the text and bar do not show the percentage loaded at all - but when the update have finished the reload-button shows.

    What to do?

  • thanks for your reply oosyrag

    Ok I understand.

    I was looking for that the player could not pass through the solids, more like slide along the edge that you describe.

    I have small navy-vessels I do not want to be able to travel on land

  • I was also looking for the Doppler Factor and the Speed of sound - Audio attributes that are mentioned in the manual.

    I didn't know they've been removed

  • Hello!

    If an object has the 8 Direction-behaviour, does it have to be moving by it's own controls to be able to be blocked by solids?

    For Example: If I have an object with lets say bullet-behaviour, and then I pin the object with the 8Direction on to that object.

    ...if I do that it wont be blocked by solids... right?

    A problem came up for me, when I already had created a player and been working for a long time with the game - but now I needed to make the player so it gets blocked by solids. The problem is that I already made my collision polygons for my player work for the game... Like for when the player gets hit by things and so on. But those collision polygons does not work for blocking solids. That's because everything gets real weird with the polygons I have.

    ...So I thought I would make a small round object and pin that to the player and have that work as an object that gets blocked by solids. And put the 8 Direction-behaviour to that object. But it didn't work. It just go right through solids.

    It seems like I have to put the 8 Direction to the player itself for it to work :/ But if I do, I still have to make a separate object and pin that to the player and have that work as collision polygons for when the player gets hit by things.

  • dropbox.com/s/gij66sod0b8ml2d/teamupWithTheRedDevils.capx

    haha thanks 99Instances2Go

    Nice little capx.

  • Put the instance variables in the Family, then they are available from both Family and Object.

    YES, now I understand I think I've got it now. THANKS!

    You saved me

  • Hello blackhornet <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I think I understand, I'm experimenting with it right now. I haven't quite learned how the mechanics work yet with the Family instance-variables.

    Can I make an instance variable in the Family ..say called. Team and make the individual objects set their own value in there - and later if I pick that object by UID get the variable they stored there?

    I also found an interesting tutorial on the scirra-site that may be helpful: https://www.scirra.com/tutorials/556/un ... o-families

  • Hello

    I need to have access to a specific objects instance variable when it's put in a Family. But I do not manage to do it.

    My problem is like this:

    I have two different sprite objects ( it's a bot and a human player ) and have put them in a Family.

    The objects has an individual instance variable called (Team).

    I need to have access to this variable to determine which team a bot/player is in. I need this so the bots does not attack a bot/player from same team.

    I've managed to select the two different objects individually by identify them by their .UID... So I can perform operations on objects independently, for example a bot attacking another bot OR player, even though they are different sprite-objects.

    But I need determine on which team a bot/player is in. I need to be able to access the sprite-objects instance variable somehow?

    You should know I'm making a Multi-player game. And I have human-players connected on the network and then I have bots.

    I have two teams. Blue and Purple.

    I could not use the Peer-object ( the human players object ) for the bots. Cause in multi-player it needs to be associated with a connected peer. So I had to create another separate sprite-object for the bots.

    I needed the bots be able to target both the other teams human players and the other teams bots.

    I make this happen by using the turret-behaviour. Cause then I can get the objects UID that a certain bot has targeted.

    This way I can make a Function and perform things to that object - and with the Family option in Construct I can do things in-spite they are different objects.

    I cannot have the turret behaviour do everything automatically - cause I have an intricate Finite State Machine working as the AI for the bots. And in certain situations the turret behaviour just don't work.

    I know I can use the the turret behaviour it self and add objects to the turret ( Add object to target ). But I can not do this in this situation cause it's very specific conditions and other things in play on how the bots attack ( the enemy )

    And it would not work anyway - cause how would the turret know which team he is firing on?

    Perhaps I could do something when a bot or player gets created and add that to the turrets targets - but... don't know.

    Or make an Array with a teams enemy-players and -bots that contains their UID and SelectedTeam.

    ...It would be much easier if I just could access the objects instance variable: Team

    Anyhow, thanks for reading this far At least I got to evaluate my problem even further when writing this topic.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the reply oosyrag

    I've done similar to what you explain and the Host is controlling all that the bots do. And I also thought similar to you with the boolean "Bot" active on my bots. It worked very nice for only the Host, but not the clients.

    ...I did not manage to use the Peer-object for the bots, cause the clients could only see them if the Peer-object got a real Multiplayer.MyID ( even though all Peer.Objects are synced )

    The reason I wanted to use the Peer-objects is that then I did not have to recreate a new object and insert all instance variables (again) and so on. If I have the Peer-object and a separate Bot-Object I have to make multiple events in a lot of places, first checking something with the Peer and then checking something with the Bot.

    I decided to make a dedicated Bot-object and have been moving forward quite a bit. I got it to work pretty ok and managed to keep things relatively comprehensible.

    I'm not sure if it is possible to use the Peer-object if it's not associated with a real Multiplayer.MyID ( a connected client ) ?

  • Hello

    I was wondering if it's possible to use the Peer-Object when creating bots in your multi-player game?

    Or is it better to create a stand alone object dedicated for bots?

    I've been experimenting a little with this, and everything looks fine for the host but not for the other connected peers.

    I think that the peers cannot see another peer if it has not been properly associated with a Multiplayer.PeerID

    ...It must be another connected multiplayer, I think??

    It would have been great if there was a way to use the Peer-Object for bots because of the programming is already finished for the peers.