Maxum's Forum Posts

  • Thanks for the help. I tried it out in this cap

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

    I need to find out more about the RegexReplace command.

    Thanks

  • I can use some help. I am trying to make a function that lets you input a number (123456789.1234) and it will output the formatted number (123,456,789.1234).

    I found some older post here about it and used them and made some updates to it. But I am running into a problem when it is running. it's seems to be some kind of rounding error.

    in the cap i will post you will see. i made a loop that adds 10000.33 each loop. but it starts to output numbers with 8+ decimal places. and I am not sure why.

    So if anyone can take a look and see what the problem is. That would be a great help to me.

    I would like to try to make this a more universal function. so that you could call it with the raw number and it would update the the text string you want.

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

    Or if you know a better way to format the number I'd like to hear about it.

    Thanks for your help

  • Thanks DUTOIT for the heads up on that

    Lordshiva1948, yes I have been reading those tutorials over and over lol

  • Thanks lennaert for the tips .

    I was playing with you in your multiplayer tank game Sunday. The game is looking great.

    Wish I could get a look at a early ver of your cap file so I could study how the multiplayer (Signalling, Host, Peer and Common Groups) all work together. LOL I am having a problem getting my head around the logic of multiplayer coding.

  • I am making this multiplayer demo to learn how to program multiplayer games.

    The problem I am having is with the main sync object(tank). When a new player joins the game the computer will make sync object(tank) for all the other players already in the game. They show up in the right position and angle on the screen but all the instance varibles are set to their default state.

    How do I get all the other players Object(tank) instance varibles to sync up with the new joining player?

    My object(tank) has instance varibles like health,kills,deaths,speed and weapon that need to get sync up.

    I think the problem might be in my signalling group. I have tried playing around with it but nothing I've had tried seemed to work.

    You can play with what I have done so far here:

    https://dl.dropboxusercontent.com/u/1244375/Multiplayer%20Tank%20game%20example/index.html

    I will also upload the cap file so you can check it out.

    https://dl.dropboxusercontent.com/u/1244375/MultiplayerTank22.capx

  • I am making this demo so I can learn how to program for the multiplayer games. The problem I am having is with the weapon select options. I have four weapon to choose from ( Lasers,Shells,Flame and Land Mines). The problem is when a new Player joins the game. The new Player does not show the right weapon fire for the other players already in the game, but when weapon fire hits do happen the right amount of damage is taken. Once the other players change weapons after the new player joins the game, the problem fixes itself.

    What I am trying to figure out is how to update what weapon system is set for all the other players on the new joining player computer system so the weapon fire is right when the other players fire.

    You can see what I have so far here.

    https://dl.dropboxusercontent.com/u/1244375/Multiplayer%20Tank%20game%20example/index.html

    I will also upload the cap so you can look at the code.

    Thanks so much for any help you can give

  • thatserafimkid, I found the last bit of the problem. In the host group under the turret tracking 2 subgroup you needed to set the inputs like you do when you fire the laser and let the common group update it for both the host and peer computer.

    thanks again thatserafimkid for showing me that I needed to have more inputs commands.

    I am just learning the multiplayer programing and there is a big learning curve to the logic to it.

    here is a updated cap with my fix

  • Thanks thatserafimkid, the Peer is working right now. when you change modes it shows up right on both the host and peer computers. but the host is working on the host computer but still not changing on the peer computers.

  • razorMonkey I gave that a try but did not help

  • You can find what I have here

    https://www.scirra.com/forum/viewtopic.php?t=124309

  • I am learning how to do the multiplayer programing now myself. I have found there is a big learning curve to the logic in it. You most likely will need to start over to add in the multiplayer to your game from the very start. I am doing small little demo's to learn the in's and out's of it. and adding more and more as I go.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am making this multiplayer game demo to learn how to program for multiplayer.

    The problem I am having is with the Turret on the tank. If I set the initial turret tacking so the turret is locked forward it works fine in both host and peer modes. If I set the initial turret tacking so the turret has mouse movement it works fine in both host and peer modes. But once I try to change that mode in game the problem starts. It works right on the computer you made the change on but all other computer don't show the change.Does not matter if you are the host or a peer.

    The Instance variable I use is "TurretTracking" in the PeerTank Object. I use "[" for the turret is locked forward and "]" to have mouse movement for the turret. As I said above you can change this variable in the PeerTank Object and it works right. But once the game is running and you try to change the turret mode you run into the problem.

    were I have the code to change the turret mode is in the game events in the common group.

    I have upload my project cap for you to look at.

    Thanks so much for any help you can give.

  • Still having some problems with the movement but just with the Host. The host on the peers computer does not rotate but it does move. On the host computer the tank does move and rotate right. But all the peer's movement works right they all move and rotate.

    Have got the laser firing system up and working now. as well as the scoring system for hits.

    I will upload the latest version so you can check it out and see whats wrong with the Host coding that it does not show the rotation on the peer computer. Thanks so much.

  • thatserafimkid I have to say I am sorry your code is working. Not sure what I did, maybe a lag in when it gets updated to my dropbox. But thanks that did do the trick. now I have to find out why it sometimes it don't show the tanks rotation. and change the hit check to the laser shot and not the mouse pointer from the demo.

  • Humm still needs more work seemed to work ok for a little bit. then after playing with it for a while it seemed to get out of sync.

    please take a look at it and see what you can find. Or if you see something that could be done better let me know. I always like to learn new ways of doing things