DozeMaster's Forum Posts

  • So naturally I assumed if I use choose(0,1) in this event, it will first choose a random number (0 or 1) and then pick instances with id equal to that number.

    But what happens is that this event actually checks each instance separately, and for each instance calculates a new random number and compares id with this number. So it can pick one instance (which seems correct), but it can also pick two instances or none.

    Also, resetting opacity on start of the layout doesn't fix the issue, because all objects are reset anyway when the layout is restarted.

    i already seen the example i think if is the one saying

    i never seen the pick being used like that before, and for me doesn't make sense, as i know the Sprite object if you don't tell the system what instance should pick, it picks all of them and considers all the same object( you get what im saying? it can be confusing or i might be having a wrong idea of how the object instances work it's possible). that's what i seen so far since i installed Construct 5 years back, and that never was changed it was always like that, also i remember something about sprite.objects specifically or any object that is put initially on the screen, is that if u don't specify instance the system automatically picks the 1st put instance in screen and considers that instance like a "master instance" and if u add a 2nd instance and u don't specify it, it picks the "master instance" but takes in account the 2nd instance anyway.

    so you can have 5 sprites, but when you are saying

    system check if the sprite.id equals with this value that you pick random, the system picks all the data available and gets a true on everything he picks, suddenly sprite.id = to 1,2 and even 0 at the same time, creating the current glitch. and the display of the opacity, is just a lag feedback(because of wait 2 seconds then restart, which sometimes can persist even though you restart the layout.), and probably because of the overlap in computing. atleast that's what i was thinking at back then when i typed the message, it might not be the case, and they might work like you say though lol (im laughing at my own confusion here not at you, not trying to be rude :D) ... i never used the comparison like that.

    that's why i was saying the choose(0,1) above in my opinion is just miss usage.

    anyway did you had the same problem on a older C2/C3 version? like going back .10 .20 versions?

    btw did i told you? that when i runned your example in C2 my C2 started opening himself up like non-stop? :O lol that was the latest stable version ... insane XD i think that is a bug i wanna investigate now! (maybe it was because of the = choose() :O the plot twist would be amazing... anyway im derailing my ADD started kicking in... over-editing my post just now ... im curious if there is any other reason of the =choose() behaving that way than the reasons displayed so far.

  • Hi, game looks interesting, quick tip for your team to tackle on, i seen on the video, some of the balls, items, interactive objects are a bit confusing to detect what they do, unless there is a tutorial, or you already know what they are doing so 1st step would be make them more obvious of what they are (an example here would be the elastic in the video, if u would be a regular user, you wouldn't know that should be interacted with, unless u would have went through a tutorial of sorts.)

    as for marketing that is more of where, why, when, how long, how much, how often, type of question, and requires time to be put in and perseverance and money in some cases depending on the marketing.

    as for user retention is also a bit more complex but requires a team effort, and continuous improvement, simply put you can raise it by giving users a reason to come back, if you pitch to them the game as a "5 minutes game in the waiting room to the dentist" then that's when they will come back... when they have a new appointment with their doctor.

    all the above are logical aspects, however logical is not always gonna bring you success, to bring it to success it needs a bit of help from the exploitation of impulses and emotions we as humans have.

    if you want to talk some more, leave a email or a form of contact il reach out! :) (the forum doesn't have anymore a private messaging system maybe soon...)

  • It wont work

    it's a construct 3 tutorial, but should work with construct 2 also... see if you can learn something from it and apply to your project

    scroll to example

    also there is this tutorial on the C2 tutorial sections it works here

  • this example should help you its called flying along template is available on C2 and C3... is basically the same thing the youtube video shows with more limited graphics.

    open template

    edited: seems there is a problem with the file on C3 for me... but should be available in the C2 templates example... if u don't have the C3 yet.

  • are the videos currently private? or are they set public/or accessible who has link?

    also make sure u give the proper access to internet to the .exe app u making.

    from the youtube error it seems you either don't have access to the video as would require login in the youtube account, or the video is not there.

  • I know I can do this using a retro styled project, but I want certain objects in my game to move smoothly instead.

    https://imgur.com/a/oFYdU5O

    have you tried the pixelate effect on the object you want? might work good for some of those objects with 1 color have no clue with a multiple colored sprite though.

    Edited: now that i think about it... C2 might not have that effect...

  • Do you know anywhere I can look at some properly implemented code to detect whether the silent mode is enabled on the device so I can mute all sounds?

    there is an actual similar issue people have on apple side ... it seems is a ios problem, or more of a device problem...

    apple.dev forum detect ios device is silent

    even though might be a feature construct is missing at the moment.

    Ashley

    any thoughts on this issue? never faced it myself yet as i didn't released nothing for ios but from the forum thread seems that the button on ios devices acts like a secondary mute/silent or a quick shortcut to put your device on silent mode... is Construct having that input detected on the audio plugin yet? or is there a way to detect it? should i submit it to the possible features on C3?

    as of now im thinking the is_silent audio expression applies to the audio that is currently being played and not the mode of the device... am i wrong?

  • How can I transfer the values of a variable between one instance and another instance of the same object?

    example:

    Ant (1) finds food in position var foodx and foody that are instance variables.

    Ant (1) collides with Ant (5) and passes the location of the food.

    the ant (5) stops doing what it is doing and goes to the food: foodx and foody

    well if you want to use the same sprite, you have to have a family, so you can differentiate between instances and a few variables.

    however if u plan on having ants animating and stuff i suggest keep each ant "class" different.

    for a scout have a scout sprite for a gatherer have a gatherer sprite and so on, it will make ur life easier.

    that being said... using the family approach and keeping the 1 sprite for all ants...

    here is a example ants-example.c3p

  • Hey Everyone,

    I am trying to get my instant game approved by facebook however they keep responding with:

    On iPhone and iPad, games should mute any sound effects or background music when silent mode is enabled. See our Instant Games guidelines for more information.

    I believe I have fixed this issue but they keep coming back with the same response, am I doing this right ?

    test it on a iphone or ipad? ...also the everytick above the is_silent is a bit redundant as is_silent would check anytick anyway.

    and yes you are doing it wrong, as where the silent feature on audio doesn't work like you are thinking it does, the is silent doesn't apply to the device volume, but to the audio that is been playing, so let's say you have button that mutes and unmutes all sounds, you would use the silent"tag" or silent all audio.

    however audio being able to be heard while the device setting is set on muted, (the system settings from volume buttons and not the ingame feature) is definitely a ios bug (i doubt that is happening though, that would mean either the ios they are using are not legit, or they been tampered with, or the ios system has a bug inside and apple needs to solve it, again i doubt that is what is happening), but as i see your events it might be on your side. i can't really see the issue in that line of code you showing cause that isn't doing nothing really... cause the is_silent condition never gets to be true.

    we need to see more of the audio triggers on your project in order to evaluate it properly... i would suggest redo your volume system, and have a master volume and FX / Music toggle on off menu, if you doing it right it should work.

    also might be that the facebook app evaluator is trolling you (they don't test games, for ios, but ios people do, facebook is just a middle man, i think this is on apple quality content control side)... and facebook doesn't actually tests the new version by removing the old version causing the old version with the issue to be there still.

    u might want to update the version of your new project in the construct version 1.0.0.0.0 to something higher than before, that would automatically update the old version if that is the case.

  • i don't know how you thinked that choose(0,1) would make sense to the construct system, but what happened on my end, after i tweaked it a bit, is Construct started opening multiple sessions of Construct lol... basically froze my cpu at 100% usage... which doesn't matter cause i could still use my pc, but ... that was a strange experience. and not sure how to replicate this issue i had in C2 so ... i can't submit a bug.

    however the choose(0,1) what it does in your example, is when the start of layout happens the system compares the id of the sprite right... and because u didn't specified which instance of the sprite to compare the value on the system picks both instances top and bottom (not specifying which of the two you want the system to pick in order to make the comparison of the id to choose(0,1), would make the system act as the sprite object being a 1 main global instance and giving it both the values to the sprite), and say "well the sprite object has id 0 and 1" and the system falls back to automatically picking in the same tick one of the two or even both .. therefore giving you a false positive interference causing it to glitch out. this isn't a bug... is just miss usage.

    edited: try resetting the opacity on start of layout, cause on my end that kinda fixes a bit the issue, and also, the text is confusing ... has the same problem... as the sprite pickings....

  • Cheers plinkie/bad Mario.

    But why does that piece of code work. What and how is it doing exactly?

    Sorry to be a laymen. Also why is not player.x, player .y? Why player.x, player.x?

    Thanks

    thats simple, because the distance measured there is for horizontal distance

    you can simply put distance(x1,0,x2,0) as well and would work the same, you can also put distance(x1,y1,x2,y2) but that would mean distance would count the difference of pixels from Y1 to Y2 also, so locking the Y1,Y2 to player.x does the same type of job as saying 0 or 1 or 2 or 100 to 100 which is 0., and only distance that is measured is the enemy.x, player.x the other variables don't count.

    distance(x1,y1,x2,y2) calculates the distance of position X1 to X2 and Y1 to Y2 if you lock any of those and say distance(x1,0,x2,0) then you would only get the distance from x1 to x2 if you lock the x1 and x2 then it will use the other variables.

    hope it makes sense.

  • Has anybody ported a box2d car physic to cs2 or cs3? Or is there a example file? Thx :)

    http://www.iforce2d.net/b2dtut/top-down-car

    i remember something about AI and cars and tracks, but not physics however physics in C2/C3 for top down view is explained in the car movement example C2/C3 has. from there is a matter of adding some extra force/torque to "interfere" with default physics, and make it feel more "real".

  • Try Construct 3

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

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

    compare two variables,

    distance(zombie.x,zombie.y,player.x,player.y) >= 70

    sub event 1 condition

    if zombie.x < player.x

    action1 zombie set not mirrored

    action2 zombie set x to self.x+5

    sub event 2 condition

    if zombie.x > player.x

    action 1 zombie set mirrored

    action 2 zombie set x to self.x-5

    that's it.

    if you want to limit where the zombie stops,

    you just compare the

    if zombie.x > player.x + zombie.width*2

    respectively

    if zombie.x < player.x - zombie.width*2

    the 2nd option would make the zombie stop at a distance from player of around zombie.width*2 or if your zombie width is 35 pixels then it will stop at 70 pixels distance from the player.x which is given by the player origin point so if your player has the origin point in middle then it will calculate from that, if your player origin point is to left or right you will face a bit of problems visually, cause logically its still 70pixels distance.

  • Thanks , I'll check that out! :)

    no problem, however the swiping movement for mobile i find it a bit glitchy for tetris type of game, that's why i found the EA tetris blitz version taken that level of wrong input into a simplistic way of doing things, which is predicting each movement or find a place where the pieces can fit and just tap on it. for the regular user on mobile is much more convenient, on pc/keyboard/gamepads/joystics we don't have that issue we can quickly tap the keys and arrange the pieces, but mobile wise we don't have a keyboard to interact with it(unless you get a joystick type of controller for mobiles), from my experience swiping is just not cut for this game.

    but have fun on trying to implement it, i know i had! ^_^

    edited: you might not need to do the swipe, but basically if user keeps the touch on left side of screen u move blocks to left and if they keep pressed on right side of screen the blocks move to right, the collision stop should work the same as the tutorial as they will cancel out your input when they hit the margin blocks. or you can use the touch input on start and some variables to keep track of distance, speed, direction etc. but there are to many things in my opinion.

    swiping itself is a bit of a weird input honestly, and you can "fake it" by using some hidden sprite that u can drag and stuff but its just overcomplicating things for something that shouldn't be that hard to begin with.

    also have you figured out yet, what input would u use to rotate the blocks? ^_^ ..... (are you going with tap?) ....

  • Now to the problem: I can't make the blocks collide to the laterals of the game area (I've created 2 very tall retangles for the collisions, one to the left and other to the right). I got all sorts of problems. I simply couldn't make the blocks stay inside the playable area. I've tried on collision, is overlapping, nothing worked.

    Any tips on how to get this collision working? Or maybe to simplify all this mess with the movements?

    Thankssssss!

    for the best tetris example/collision i found this a long time ago on the C2 section, it should work on C3 i have a clone of my own based on the mechanics of it, with more advanced features including swiping and holding pieces like tetris blitz. however i postponed it cause i wanted to do the tap choice lane type of thing, but the movement for swiping should be working just fine as you would replace the keyboard input with swipe input or distance from initial touch to the current touch. everything else should be the same.

    i can't share my clone but you can look at the mechanics of the original tutorial and you can figure it out. is pretty easy.

    tetris c2 clone