Cassianno's Forum Posts

  • There were a post couple days ago by the dude who's making the bagel game (or something like this, Lou iirc). He asked about the same thing. The only way to do this is basically validate the data with a hash.

    For example, you send 3 infos on the json: player_name, plays and score. By having another info, lets say, checksum, you can validate on server side if the 3 info matches the checksum.

    For the checksum you can use kyatric's hash plugin and maybe use SALT+PLAYER_NAME+PLAYS+SCORE, having the salt being know both by the game and the server.

    Actually, theres another way: to compute the score on server or basically simulating if the score is achievable.

    This concern/problem is not a construct specific thing; the problem here is the ease for users to see/change the values.

  • As robust as gamespark, from what ive researched, you can try playfab.

    Actually mb, i dunno if they have a plugin for C2.

  • You can spawn sprites with fade behaviour and destroy on fade out, will work.

  • Thanks for the answer!

  • So far all i can say is: bots are really clever (im considering im being matched against bots too right? With common names) and there are some words that id never know existed at first hahaha.

    But the game itself is really well made.

    Congrats.

    Edit: ah, the 30 seconds (for this type of game) doesn't work for me. Stressed the shit out of me. Do you have plans to make a solo mode with no timers?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If i understood correctly, C2 won't be getting new functions, only corrections.

  • Updated: Lots of new features including emoji+text chat with your opponent!

    Guys, I really need feedback here ! Anyone?

    Downloading it now!

    Will provide some feedback (hope so) later.

  • Yeah dop, from what i read (after posting this thread, my bad) its native on C3. WIth C2 u need some third party or the way you stated (thats how im doing, but encapsulated in a function).

  • Hello there!

    Firstly, i actually know that i can "spawn another object" and pick the sprite i intend to spawn, while spawning the family itself, the sprite spawned will be random.

    My question is actually how to manage many sprites and it's spawns. Example:

    Suppose 80 enemies at 1 enemy family. The way im doing to have a function that receives a code (or "tag") respective to an enemy and then i check its value to know which sprite i should spawn. Like a switch/case.

    Theres anyway to spawn a <variable_name> sprite? Because with that, i could just pass the name by parameter and could even implement some randomness within choose() etc.

    Edit: found something related; basically C2 can't do this natively ()

  • Cassianno I'm sorry I didn't understand properly. Do you mean you confirm it's not working as intended? Or that you had no problem with it and the square was hiding when a character is moving and displaying when not moving. If it's the latter, did you try to move both characters? I think only one of them who has the highest UID causes the issue.

    Yeah, the way i tested it worked as supposed ("no bug"). I don't remember if i tried with both characters tho, maybe i tried only with the lowest UID one.

    Anyway, the other thread linked before indeed proves that there's a bug.

  • It is def a bug.

  • Cassianno

    I really tried to make an example as simple as possible to understand but I'm not sure I succeeded:

    Here's how it breaks down

    If click on Character then Pick only this Character

    Character (UID = 1) and Character (UID = 2) (Same object)

    One Character is on top of Zone A, and second Character is on top of Zone B

    EVENT:

    Pick selected Character only (After click on Character)              < C2 IGNORES THIS
    	
    	If Character is over Zone A
    	OR
    	if Character is over Zone B
    	
    		If Character is 8-Directions Moving
    		OR
    		If Character is Pathfinding Moving on Path
    			
    			Hide Blue Square
    
    		If Character is NOT 8-Directions Moving
    		OR
    		If Character is NOT Pathfinding Moving on Path
    
    			Show Blue Square[/code:1232xrn1]
    			
    So the fact that there are OR blocks in the middle of the event in sub-events, C2 ignores the "Pick only this instance of the object" instead it picks all objects so the behavior doesn't work as intended. The blue square should react only to the selected Character where here it's also affected by the 2nd one who's not selected. You pick a character, you move it over a zone, this should hide the blue square and show it only when character stops moving over the zone. But blue square is still displayed because the 2nd character which SHOULDN'T be picked is over a zone and not moving.
    

    I actually downloaded your capx at zipfile and tested. Worked as you said it's supposed to. Ive put both characters on a zone and while moving one, the blue square wasn't displayed.

  • You can also have a obj_uid instance variable that is setup whenever you create/spawn the objects, making it easier to pick correct instances, like dop suggested.

  • (...)

    Sprite1 DragDrop is dragging
    
       Sprite2 var=foo    -> Sprite2 set x to 100
       or
       Sprite2 var=bar
    
       Else        -> Sprite2 set x to 200
    [/code:96xj18pe]
    (...)
    

    The way the code is put, i think the problem lies on Construct messing with the OR and Else, last being used against "Sprite2 var=bar" only.

    Telyko by looking quickly couldn't it be a logic problem?

    I'm at work so can't see your example.

  • It'll be easier to help if you provide an example capx