MobileMojo_Games's Forum Posts

  • I am creating a blackjack game for the kids. I am trying to add instance variables of the cards to a text. Two things I am noticing are not adding up to me.

    1. The variable for a card is always read as the number 10 rather than what is in the variable

    2. I cannot get a for loop to work, or a condition for adding for each variable only once to the text

    1) Interestingly, my highest variable for any number is 10 (11 for aces) just as the game should be. So I am wondering if it has something to do with that but I start all cards off with the same frame, then update them as random cards that cover all 52 cards for each deck (just like a shuffle).

    The text I am debugging (and any text really), always shows 10 as the value, even if say....the card is a 4 with the instance variable of 4.

    2) This I can figure out somehow if not answered but...I cannot get the cards, if more than one that is causing the "trigger", to only add once per card to the total(text). I can get 1 card to add to it once and others not register, or I can get more than 1 card to keep adding and not stop.

    I am linking a video to it explaining it all. Apologies if the video is long and/or partially meaningful. I tried to make it the best I could and got confused during also.

    VIDEO

  • That, unfortunately, did not work for me because I am using "powers of" and variables in combination. The only thing I could do that worked was to calculated the constants and then turn those into readable integers outside of any object vars and just rely on that as a global var.

    Thank you for the help though, this what you show is very intuitive and will be useful for other things I have planned :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Construct 2 is forcing me to use Log10, when I need to do 10 * Log(x).

    How can I do this please?

    Thanks all!

  • I have purchased both C2 and C3, and many plugins are starting to make their way over, and I just wanted to say thank you to all the devs for their hard work on the updates and everything.

    I am currently transferring a c3p game from the play store over to C2, that way I can create a leaderboard for Rex's plugins, which are really cool btw. Should check them out!

    Keeps me busy and my anxiety and depression at bay most day for a little bit, so that is why I am mainly writing the thank you because of that. Thank you all

  • There are not always three situations in the same room, log layaou, layout of color choice and where you have to wait until there are all the players and then you pass the layout of the game.

    Speaking of rooms: Can I restrict access to the room to a limited number of 4 players and test if the room is full to create another room with another 4 players?

    As far as my knowledge, this is something that may be better handled on a server externally, maybe not an implementation of the software yet, unless it can be coded directly with Java or C++ etc, in which I am not sure yet on how to restrict players yet other than the creation of a server such as in the multiplayer example of limiting to 2 players etc and changing the name of the server for each server created.

    So, possibly you can do something to that affect, where you set up your server and then have a code saying if the player amount is greater than or equal to so much, then add 1 to the server name txt and execute another multiplayer action that way. I have no idea how to do that though. Maybe this will help maybe not, but that is the only way I would know how if it is not something handled from your own server purchased to do stuff like that.

  • Have you tried separating the color actions into a different layout also? Then, have them go to the gameroom where host, peer, etc all join?

    It sounds like there are some variables that are not being called before the sync of host and peer that are required to identify them with such.

    So, if you have 2 rooms/layouts, the first as a login, thats great, but between log in and the gameroom where the sync events happen (usually at the beginning of layout), have a layout for the color choices. So 3 rooms.

    Or, instead of having the login go right to the next room, add the color information in the login layout, then have that event group go to the next room after all variables and such are assigned.

    Hope that helps!

  • Since there is no Bugs thread for Construct 3, I believe this is where I should post this.

    So, I built an apk for my first google play store app. Upon downloading the app to my kids phones, we noticed the buttons were not working with touch inputs.

    I debugged, and nothing seems wrong in c3. So I downloaded to my phone and had same results. I worked on figuring out if it was a specific touch event that differed, but found that by testing sprites instead, they worked instead, and buttons did not work.

    I found that out, as well as using sprites let me not have to have 2 conditions for the mouse either, so the code got shorter. Good thing.

    But, the focus here is that for my situation, using buttons and ANY action related to such on an apk build from signed apk distributed either locally or on the store as an official app, failed to recognize the buttons. I ended up having to quickly change the buttons to custom sprites and re-upload a new release asap.

    Just a heads up on the production side of c3. Hope that helps :)

  • So yeah........I had a big thing all typed up and ready to post with this video attached now, but c3 shut down and my browser reset from it so........I was talking in my deleted post, about how this stuff is still an issue.

    The video shows one example of something that just appalls me for a paid product, considering I am now down 300 bucks and a 99 / year subscription with these issues.

    Im not going to say construct is terrible. It is in fact a great concept. But......having a text object update a variable, and that completely messed up other object not even related to it, is simply unacceptable!!!!

    Paid or not also, how long has construct been a thing in the game dev revolution? By now, should these issues not have been resolved already?

    I am STUCK. I cannot even rely on adding any more code without something else messing up, and what that may be has differed for each code. Adding text causes player rotation issues and object syncing rotation updates for the peer, adding an every tick to a visual effect causes my trees to loop spawn across the map over and over. Things like this are like..........wtf moments for real.

    Here is the video link to the one recently JUST before this post had to be re-written: youtu.be/zpebPs4tVmE

    Its just ONE example of a "come on now" feeling, as to where construct is in development versus what support in finance they receive. Especially my 300 dollars on a project that for one, cant go further right now, because I cannot rely on anything now, and two, I had to purchase c3 and c2 differently, where a program otherwise, would consider c3 an UPDATE of "construct", not a COMPLETELY DIFFERENT PRODUCT THAT DOES THE SAME THING..........with "UPDATES".

    Come on guys really?! After all these years, this is how far its improved? I am HIGHLY disappointed and wasted way too many hours thinking these errors were my problems.

    A text that screws up my player and peer updates on a simple common event update for a variable, is ridiculous!

    construct classic started development 11 years ago...c2 started in May 2011...7 years ago! just sayin'

    What excuses can we come up with here? And what solutions can we correct them with?

  • If you can't figure out how to make a TURN server you can get one here for free although you won'T be using it with it'S intended purpose and can'T guarantee it'S availability but it should work for light testing

    http://numb.viagenie.ca/

    Cool, yeah just for testing is great. All I need it for at the moment is when the kids are at their mothers and they help me test, I need to test signaling to peers when I update. Ill check it out! TY

  • Singe player wouldn't work? Is that because it was strictly coded for multiplayer? When you add signaling and all that, the single player won't work because it's trying to pull the server signals for you still.

    You will likely have to create independent coding that says a variable, linked to ALL the multiplayer events at the beginning of each on that says boolean true or false for multiplayer, and then make a button for each single and multi.

    That way, if you click on single, you won't load any signaling anything, and you can have your simple coding for single player in its own group :)

    And YES, it does do its own thing many times during testing, changing stuff up on you. JUST did some testing with my daughter, and she could see my items on my player one game, then without changing any item codes, they didn't show, but other things that wouldn't work before started working.....its frustrating at the least. Because, then you get confused on what happened when you changed, whatever, and its not consistent. Yeah..... :/

  • ok great! Glad it worked out :) I learned a LOT about the multiplayer by a HUGE amount of testing and trial and many error lol.

    Ill see if I can help in the other also. Whats the post?

  • So, Im going to just do a local multiplayer and singe player for now, as that alone is plentiful haha. Ill stand by and don't mind waiting until I can figure out how to either TURN server, or whatever I have to do, BUT, to finish alpha, Ill focus on those first :)

    At least it will be known as a common issue if others can repeat and then maybe we can get Construct to do those things in the future :)

  • I've looked into this and he's right.

    I used the same code that runs in C2 inside of C3 exactly and it doesn't work.

    Any more people running into this issue.

    Thanks for verifying! It's strange. The weirdest part is, I didn't change anything after closing up last night, and opened the project this morning and tested. And the host can't move.

    NOTHING changed! Ive set the project to open using c3 modern and it doesn't even open the game, so I have to set it to play using c2 still in the advanced section of the project setup and run.

    I know quite a bit now about signalling, peer, and host, and common and I can actually "see" the flow happening by looking at the code now, and yet....if I do my own, it doens't work. So, here is something I tested.

    I ran a net test from netscan to see how my firewall is conflicting with WEBRTC, and with my computer, there is no inbound TCP, and its behind a proxy (which is weird because most people have NAT issues, not proxy since proxy is usually auto).

    Then, I tested my cell phone without wifi, and got the same. My phone can run the game with my computer, but others phones wont, nor other computers not on WIFI.

    I changed my firewall settings, and still nothing connecting to the outside world. This got me thinking it is my setup internally of my router, BUT it also made me create this post cause Im like...."So, then how the hell am I able to play with others in the demo?!!!"

    Im baffled beyond at the moment. Bug or not, Im not sure, but Im not giving up lol. Im sure this will work sometime! Construct is an extensive program so it has a LOT of backend stuff going on, so multiplayer Im sure was one of the last thoughts. Im hoping it helps see there is an issue and somehow can be fixed.

    hey, at least we can actively learn a LOT about networking and multiplayer server signalling int he meantime :)

    Standing by!

  • YW. So, if the event is in the peer, it has to by synced by using the sync object in the signalling. Also, the event in the peer is not to be the only/and main event for this action. The main event should be in the host side. THEN, the peer should have a setbit for the same action where the host can getbit from the peer and control it from there. The signalling allows that to happen by syncing.

    For example, if you want every peer to say change color, or an object the peer touches, then in the signalling, first sync the object. THEN, if the color is changed by ANY instance variable, you sync the variable AFTER the object.

    Thats the first thing. Now, that object is synced.

    Then, on the host side, directly under host as an event, make an event that says for each peer(or object of player - whatever you called your player), if the players multiplayer id is = to multiplayer.myid(allows each peer to take action independent of each other locally), then do ......

    The action is change color (for example).

    So, this can be done by clicking, or keyboard, etc. IF clicking, the setup is a bit different than keyboard.

    Keyboard is a simple getbit on the host side, to get the keyboard event from each peer to take action.

    The mouse, however, is like this:

    in the host event, you only need a single event for mouse, since everyone has a mouse.

    You DO NOT have to put anything in the peer side, unless you are doing some aiming stuff with variables. SO, dont worry about peer yet still.

    Still host.

    Put in the host, if mouse button left down, for example, as the condition, and the action is a SETBIT instead of a GETBIT. Because we are sending this "mouse down" across the signalling server to everyone INCLUDING the host. So, for your next number in setbit (keep track lol), that will be that event.

    Then everyone that clicks will register on the server as their own click(or should).

    And then in the common section, you can put the action of clicked as a GETBIT (NOT MOUSE EVENT), on the object, because you want everyone to see it, and interact somehow with it.

    Thats the best I can explain it at the moment :P Hope it makes sense!

    I def recommend not worrying about any other code until it works, otherwise you will get confused and overwhelmed quite easily with this loom of the game setup lol.

    So, in conclusion:

    Set up syncing the object first, then the variables if used (sometimes people just use animation but if using var, sync it).

    then host side, make a mouse down, and the action a setbit for the next setbit number.

    then common, have the getbit action do something to the object, like change its color.

    NOTE: setbit and getbit HAVE to be the same number otherwise it will either do nothing, or control something else lol.

    Hope that helps!

  • How come we can connect to other people on the internet with the space shooter demo, but when we configure our own game, using the same stuff, it doesn't work. Im talking EXACT coding Signalling, Host, and Peer, and Common using the SAME everything. Is there some kind of voodoo going on here that I dont see?

    Trying to figure why my game can connect LAN, but not on another wifi, YET the demo can..... My game isnt the same, but I made a replicate of the demo today to test and learn about the flow of things, and that didnt work either, and its identical.