nimos100's Recent Forum Activity

  • You can use an "Overlapping another object" and then just invert it, by right clicking it and choose invert

  • The coordinate of the layout starts with 0,0 in top left corner.

    All objects have an x,y value thats fits it.

    So if you want an object to move Down 50 pixel, you can just add X-amount to y. To move up you subtract X-amount from Y.

    So in your case to make it very simple, you can store store the current X,Y value of your object. And every 1 sec for instant, you move the object X-amount in the direction you want to. And then test:

    starting value - current value > 50

    If thats the case you stop the object from moving. This check you just put in the event/function that handles movement of the object. And modify it so it fits the different directions you want it to move.

    Then it will slowly move in that direction.

  • Why not simply split it up into several functions?

    function foo(){
       ...
       call Anotherfunction(){
         ...
         if( returnvalue = 1) 
            return 1;
         else(call YetAnotherFunction ){
            ...
            if(Returnvalue = 2){
                return 2;
            }
    
         }
       }
    }
    [/code:2m08bv8y]
    
    To me it looks a bit like you try to just throw everything into one function where they might not be needed. Instead of just splitting them into several functions that does something more specific.
    
    Function Set car() : Set values of the car with UID
    
    Function Find car() : Return the UID of the car based on some input.
    
    Function Delete car() : Delete car with UID.
    
    etc...
    
    In your example it looks like you have a function, that should do something to something, and based on what it does it might have to do something else. But you are not really sure what it is suppose to do. But maybe i misunderstood what you are trying to do, or what exactly your problem is.
  • You can just add a condition to the event that count down the timer, so if timer > 0 then it will do the count down.

  • You can add either a pick nearest or pick top/bottom as another condition when checking collision between the bullet and an enemy that should fix it.

  • You can use the emulation Tool XDK from Intel, it will let you test it on a lot of different phones. Its free if i remember correct, and you can export your project directly from C2, just choose the INTEL AGI.

    However its some time since i played with it. But from what i remembered it was really cool

    You can find it here:

    http://software.intel.com/en-us/html5/tools

  • You can do it with the distance command.

    The way you use it is by adding a comparison from the system and in the first value you just write:

    Distance(x1,y1,x2,y2) that will give you the distance between two objects.

    In your case it would probably look something like this:

    Distance(Flashlight.X, Flashlight.Y, Enemy.X, Enemy.Y) < 50

    You can use the Distance function in any comparison event, so just use the one that fits, what you try to do.

  • I don't think it will make a huge difference in performance whether you are using a 1024 compared to a 512 one.

    As you would need twice as many 512 ones, would also mean that all the stuff that have to check against the 1024, would need to do it twice if you use 512 ones.

    Think the best you can do is just keep track of how much memory and cpu your game requires as you make it, and if something you add suddenly makes requirements jump, then try to remake it. If you can figure out, what limits would be acceptable for the game to run on a older mobile phone, and you just try to make sure that you stay within those limits I think you will be fine, no matter which way you do it.

  • Yeah it almost does that. The only thing it would need was to search all event sheets, and show a menu with a prev and next button :D

    But that will be helpful for now, actually never tried it <img src="smileys/smiley9.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was wondering if you think or all ready might have thought about a functionality that let you find events in the event sheets, would be a good idea.

    The way I thought it could work could be something like this.

    If you for instant have an object, such as a button, text etc. you would be able to navigate through all events that involved it.

    Kind of what you would find in a word program, where you can type a word, and then press next and it would go to the next instance of that word.

    So imagine that it could work something like that, think that would be very helpful, when you have big projects, and have to go back and correct something but forgot exactly where you put it :D

    Also if you have to for instant replace a button with a spritefont, then you could use it to find all the places where the button is used, and be 100% sure that you replaced all of them before removing the button.

  • So i made a new version :D

    And got it running better by using a distance check. So can do around 2500 objects (1250 since half of them are colliding objects) and still keep it around 30 frames.

    <img src="https://dl.dropboxusercontent.com/u/109921357/Image_1.jpg" border="0">

    I tried to see if i could do some kind of Quadtree collision detection that i saw on the internet, that apparently divide the screen into areas for testing. So one area doesn't test against another area and so on. but couldn't really get it to work. :( And think it should probably be implemented into C2 it self, if it should even have a chance of being possible :D

    Anyway here is the new Capx, if anyone is interested:

    Collision test

  • "Your capx is far away from just moving some sprites around. It's moving 650 sprites around and doing 422,500 collision checks every tick."

    I understand what you mean, but i meant "IM" not doing anything, that i don't trigger anything for these objects, C2 does a lot of things, that's why the fps drops.

    "On sprite collision with sprite

    Sprite bullet speed is > 0

    This means c2 misses out on all the performance benefits because it does all the collision checks first, which is the more intensive task. The filtering happens top to bottom, so what you should have done was:

    Sprite bullet speed is > 0

    If sprite is overlapping sprite"

    You are correct about that, did a test earlier of these events, and found that the "On collision" is the one that does the biggest performance hit.

    1000 objects, will reduce fps by 92.5% where the same test using overlapping, only reduce fps by 62.5%. So that could explain why you don't suffer that much when you use that.

    "I want to make sure you understand that just because the object don't appear to be doing anything, doesn't mean you're not slamming the CPU. The act of checking for collisions on them all every tick is intensive, even though there is no visible result."

    Yeah im aware of that :)

    "Which you can. You can set conditions, but they need to be BEFORE the collision check. That's why you use 'is overlapping' rather than 'on collision' so you can put conditions before it. "

    Yeah it does way better than the other. Agree.

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