GeorgeZaharia's Recent Forum Activity

  • 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".

  • 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

  • Sorry to jump in on this but I feel like you could've avoided using multiple turret behaviours on one object, which is confusing. You can instead use the turret behaviour, and based on an instance variable on the spaceship, determine the rate of fire and whether its firing a minigun projectile or a missile projectile.

    that's what i did in my example but he has multiple guns that shoot at different rates, and at 120 ships with 2 guns or 5 guns each that is gonna make it hard to keep track of and a big database of firerates and ranges etc.i mean you would have a big spreadsheet of ranges and firerates no matter what, is more of how much you can simplify the management and tracking of all the data, as a beginner the bellow example should work fine, there are more advanced ways of doing this without even using the variables and behaviors, but that would require some xml knowledge, and coding the movement/shooting behavior by events.

    examplev3-2guns #case nr 2 - guns as separated objects.

  • Now I get what you meant. It's a nice approach, indeed.

    But in your demo, only one weapon can be used at a time. In my case, however, I want the spaceship that has Minigun and Missiles to both be used at the same time, with their respective fire rates. So that Minigun fires at 0.25 and Missile fires at 2.

    Using only one turret behavior is not possible at the time, I'm afraid. Unless I set some variable on shoot, and see if it's the 8th time it has been fired. This works, but when you get to 5 different weapon types with differing fire rates (which is my case), this get out of hand pretty quickly.

    well not with 1 turret, but, if you have a spaceship and the guns are different sprites attached to the spaceship then you could use multiple turrets.

    for example spacecraft image with no guns , then u put minigun image attach it to it, and rocket launcher attach it to it, then each of those guns will be able to have different turret systems and firerates. but having multiple guns as a variable it's a bit tricky and overcomplicates things.

  • i think i understood now, i made you an example hope it helps xD im using 1 way of shooting though. but you can use more variables to trigger what type of weapon you are using range/firerate etc. just look at this example and you will understand what i think can be done :D

    Edited: i updated my capx, so you don't have to duplicate the actions as i did earlier.

    Edited2 : examplev2-2guns

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ah ... edited: i misunderstood, you have 120 spaceship using the same turret to shoot... my bad, i was thinking your doing some tower defense type of thing. in this case distance is the way i would do it.

    for different firerates, you can use the family turret behavior for rotating and target.

    but the family turret behavior also is usable for each ship as a sprite object.

    not sure how you spawn your bullets/rockets. but as far as i remember the fire-rate of shooting using a turret it can be set manually or based on a variable, variable that can be different for each ship.

  • Now the problem I'm facing is that if I have two different Turrets enabled on the same ship, with different Fire Rates, all of them are going to shoot using the first enabled turret's fire rate in the behavior list.

    How can I work around this? Or is there a way to do it without turrets?

    the more tedious and simplest way for you i think right now is to separate the turrets from the turret family and have individual targets and turrets with their own turret behavior. (the spacecraft don't need to be taken out of the family, but you would need for the turret to get as target the spacecraft name, and not the family of which the spacecraft is part of.) but you need to separate the turrets not having them in the same family.

    also would require your spacecrafts to be different sprite objects, and not different animations on the same sprite.

    this should fix your problem while still keeping the behaviors and family's to some extent.

    the other way around turret behavior is using distance(x1,y1,x2,y2) and compare for each spacecraft set angle towards it etc manually code the turret behavior with events basically.

    however im not sure why you want the turrets to have different targets... as the games i played so far, they all shoot when have enemies in proximity. unless you wan't to have a turret for long range and one for close encounter. i would use distance for that.

    ah ... edited: i misunderstood, you have 120 spaceship using the same turret to shoot... my bad, i was thinking your doing some tower defense type of thing. in this case distance is your friend.

GeorgeZaharia's avatar

GeorgeZaharia

Member since 30 Jun, 2014

Twitter
GeorgeZaharia has 35 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x9
    Popular Game One of your games has over 1,000 players
  • x21
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies

Blogs

  • Construct For Dummies - Simple Tutorial Collection

    I scour the Construct forums for users tutorial requests, and create small quick and simple tutorials using Construct's defaults features so anyone can use and apply them.

  • My Dev Logs

    Thinking on games 24/7 is fun and waste of time and unproductive if we don't bring those game ideas to life. In this blog im bringing my game ideas to life and log their development process.