nimos100's Recent Forum Activity

  • A simple way to do it is to store the UID of the tile that the player is standing on, and use that to make sure that its not triggering several times.

    So to do that:

    1. Make a variable for the player called "Tile_UID"

    2. Whenever the player move to a tile you do: "Player.Tile_UID = Tile.UID" this you add to the overlapping action.

    3. In the overlapping event you add the condition: Player.Tile_UID not Equal to Tile.UID Since in (2) you set the "Player.Tile_UID to the Tile.UID" the player have to leave the tile before it can trigger again.

  • Im not really 100% sure how those cards work, but from what I recall its something about drawing some cards and based on those and some hokus pokus its possible to tell the future or something about a person?

    Anyway back to reality....

    Think you might be overcomplicating things a bit, try to look at it this way.

    "You have 10 cards and you want to draw a random card and no more than once."

    1. First of all you need something that can pick a random card. So as you have already done "Pick random Card".

    2. To make sure that the card doesn't get picked more than once. You need to mark a card as being "played" or "Used". This can be done with a simple Boolean, lets call it "Used".

    This is pretty much what you need to make it work, if you add them together.

    Card.Used = False : So only cards that are not used already are picked.

    Pick random Card ; Will pick a random card of those not in use.

    So after you play a card you mark "Used = true" and reset it to false when you want to reset the game.

  • The reason is that when you press "X" player mode 1 triggers true. In this case you Set mode to "Anim2" causing Player Mode 2 to also trigger true right after. Pretty sure that's your problem.

    Its a bit weird setup you have made.

    If you make it like this instead:

    On X pressed

    -------> Player.Mode = "Anim1"

    ------------------ : set Mode to "Anim2"

    -------> Else

    ------------------: Set Mode = "Anim1"

    Then you only need 1 Group to handle the switching for you.

    If you need it to handle more you just add conditions to the Else so:

    On X pressed

    -------> Player.Mode = "Anim1"

    ------------------ set Mode to "Anim2"

    -------> Else

    ---------Player.Mode = "Anim2"

    ------------------ set Mode = "Anim3"

    -------> Else

    ---------Player.Mode = "Anim3"

    ----------------- set Mode = "Anim4"

    -------> Else

    --------- Player.Mode = "Anim4"

    ------------------ Set Mode = "Anim5"

    .. etc

  • It sounds like you (not uncommon) get a bit confused about how picking works in C2.

    But the way you can look at picking of objects is like a sorting or reduction machine.

    Imagine you have 100 workers with the following attributes.

    100 Workers in total

    20 Workers are wearing a red shirt.

    40 Workers are wearing a blue shirt.

    30 Workers are wearing a yellow shirt.

    10 workers are not wearing a shirt.

    30 Workers are between 40 and 50 years old.

    50 Workers are between 20 and 30 years old,

    20 Workers are between 60 and 80 years old (No pension for these poor bastards!)

    Lets say you want all workers wearing blue shirts and that are above 60 year old to either go home or go to lunch.

    So what happens is:

    Pick all Workers : You pick all workers that match the condition that they are workers, in this case all are so its 100. (You don't really need this, its only for the explanation.)

    Workers must have blue shirts : This will reduce the number to 40 workers.

    Workers must be older than 60 : Depending on how many of those 40 workers matching this you will get a new number that further reduce or sort the amount of workers matching the former condition. Lets assume that its 15 workers.

    Now we cant reduce the amount anymore and we have found all the workers that match all our conditions. And since we want them to either go home or to lunch, and don't care how many goes where. We can do the following.

    For each Worker : This will go through each of the 15 remaining workers and tell each of them to either go home or to lunch.

    Go home or Go to Lunch

    So that's pretty much how it works whenever you pick objects, that you keep reducing or sorting them until those that remains fit whatever you want. And then if you want them to do different things you throw a "For each" at the end and then the options they have afterwards.

  • [quote:35c89h28]Also one more thing to note. While having the references automatically change is in most cases a time saver, in some cases it can pose a problem.

    For instance, I created a global variable in one event sheet and used it in the same event sheet, thinking I would need it in other layouts. Turns out I had to reuse part of the logic using the global variable in another layout.

    At this point I had to copy the global variable to my "global variable dump" event sheet and manually change the references in the events from the old variable to the newly created one.

    Think that more comes down to poor design, which is not meant as an assault in anyway, but something that everyone experience while doing things, but are also those types of things that next time you start a project, know how to avoid. And the moment you are aware of it, then things like automatic renaming start to be helpful and needed.

    An example is something I suggested in another post was the ability to right click a function call and go to the function so you don't have to search high and low to find it. The reason I would like such functionality is because I haven't found a really solid way to organize functions correctly, so sometimes my structure simply doesn't match where I would expect a function to be, and then I have to go through lots of event sheets trying to find it. Which is partly due to poor design by me, because I sometimes just want to make things and then Im not careful about organizing things correctly, but also sometimes its just very difficult to organize functions that involve several different element, that can fit more places. But anyway that's another thing.

    But following along the forums there are so many good suggestions that could improve all these small annoying things and hope that they will make some of them soon, as im not really interested in any of the different mobile implementations anyways.

  • Think most of it comes down to just having a good idea, doesn't need to be complicated or even have fancy graphic. But it need to catch peoples interest fast by standing out. For instant if you take a top down space shooter, I think it will be very difficult to make a popular one, if you just copy what is already there, but if you changed it so maybe the player could build there own craft, collect materials on the maps or something that makes it stand out. Its might have a chance.

    But also choosing a popular genre and execute it better than what is there will help, for instant looking at a game like Kingdom rush 1 and 2 which is very popular and good games. But breaking it down, its actually a pretty simple tower defence game, that could fairly easy be made in C2, but they have executed it very well compared to a lot of the others out there, think most know that there are load of those types of games out there, which are not very fun for whatever reason.

    Also I don't think, thinking to much about how much money or success a game could have is not very helpful. But instead focus on making a game that is actually fun instead, and that you enjoy playing or think is missing out there. And as already suggested by other, make a website for it, post it on varies forums when you feel its ready for that, and then if its a good game people will start show interest in it, I think you will find it much easier to make some kind of success out of it that way. At least that's my plan....now I just need my game to actually work the way I want it to

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well it should work, so im guessing you might use the "scroll to X" wrong.

    Here is a very simple car moving to the right and the camera following it, is that what you are looking for, otherwise im not sure what you mean.

  • Just wondering why you posted this in bugs section, I think you could get better help in the "how to" section

  • [quote:3f0suz33]I`m using a textbox to display the score in my game. I`ve read that using textbox is more efficient than using the text-object, concerning the framerate.

    Where do you have this information from? I find it highly unlikely that you would experience any significant frame rate changes using one over the other. Unless you maybe use a serious amount of them, talking more than 500+ or something. I could imagine that the sprite font could cause some drop though.

    But personally I wouldn't concern my self about this if I were you, there are other areas that would be far more important to optimize if you are concerned about FPS.

    However you can change the alignment of the text in the properties. Cant remember what its called, but its somewhere in the bottom of the list, next to hotspot.

  • +1

  • [quote:3969sg9s]I think I have it, but it doesn't work because I'm pretty sure I need families to properly detect two of the same objects overlapping, hopefully I can get the full version in the next day or two.

    You can do it without, but as you said it would be easier to use families. But you can do it like this:

    Example;

    If Box is overlapping Dotted box

    DragDrop on released

    Sub event

    If Green Box is overlapping Another Red box (If it does you add Pick Red box)

    else

    If Green Box is overlapping Another Blue box (If it does you add Pick Blue box)

    else

    etc etc.

    But it will quickly get messy, so if you get the full version soon, I would probably wait as well

  • [quote:33eidwo3]Distance tests don't work with collision cells, do they? Like, if you have a few thousand enemies spread over a large layout, and you are testing collisions against them, col cells will eliminate a lot of the overhead, whereas distance will test against everything--unless that's changed recently.

    Not sure I understand exactly what you mean. But in my case, as it uses a simple distance check to determine whether a collision check should be made in the first place or not, the problem occur as the distance check doesn't take the shapes of the object into account, so if a distance check is used to limit the amount of collision tests needed but the shape of the object is not symmetrical there might actually be overlapping and a collision check should be made, but doesn't happen because of the distance not matching the conditions, so at least in my example you get performance at the cost of flexibility. And guess that will be the same problem that the OP will experience if using distance checks.

    But in my tests all uses the same setting in regards to collision cells etc, the only difference Is the amount of objects that might differ a bit. But you can easily see the difference in performance when using one method compared to the others. the only one is On collision as it doesn't allow you to change how it works, so it doesn't make much different how you try to optimize it as I see it.

    [quote:33eidwo3]Actually, I did an opt in one project where I was using pick nearest/distance for cols, then taking that distance and using it to determine how often to check cols. So...an object far away from anything it can collide with will check for cols much less often. Seemed to work pretty good even with boatloads of objects.

    Yeah agree, there are lots of ways to optimize performance when working with collisions. And if you need a lot of tests, its definitely worth trying to find a way to do it. It seems that C2 provide the functionality so it is solid and work in every setting, but doesn't do much to optimize how its done.

    Regarding "On collision" I suspect that the reason it give worse performance might be because it some how sub divide the amount of checks being done, as it needs to trigger on a very particular point, which is the moment that a collision between 2 objects are made, and therefore it need to be more precise.

    So if an object travel at 300 px per sec and hit another object, to avoid that the object overlap the other object or overshoot it, the amount of checks needed is sub divided to make sure that It doesn't happen. Also it might be more sensitive regarding the collision mesh of the objects than overlapping is. However its just a guess.

nimos100's avatar

nimos100

Member since 23 Sep, 2012

None one is following nimos100 yet!

Trophy Case

  • 12-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies