tulamide's Forum Posts

  • So, here we go again. After Nintendo, Sony and a few more, this time Sega was the victim, and the hackers stole informations about 1.3 million customers...

    http://www.cityam.com/news-and-analysis ... ack-attack

    It's kind of funny, because those firms now suffer from something they provoked themselves, when insisting on online user profiles. Anyone know of the good old times, where you just bought a game in a store, then installed it and never had to give any information?

    Steam next?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I worked with Blender for a while. It's true, you can get results and have a quite good workflow - but the UI is more of a power-user-friendly interface than anything else. I felt it being terribly un-intuitive, even more if compared to C4D or Maya, etc.

    Sculptris can't be compared to it, because it is very limited. On the other hand it has a very intuitive interface.

    Can't check Autodesk 123D, but will asap.

  • As always, the best recommendation is Silent Cacophony's Python Shell:

    http://www.scirra.com/forum/viewtopic.php?f=8&t=6158&p=50287

  • Yes, as Arima said. For something like a growing or shrinking bar I would advise using the panel object or the tiled background object.

    An example of the panel object use for a health bar can be found in Verve! (I give this link, because it definitely works with your version)

  • Yes, that's why I said, that it only makes sense against other cars

    It is just a start, you would have to further split the events by adding sub-events, to catch all possible situations, e.g.

    + car's speed is negative

    -> set a variable to -1

    + else

    -> set a variable to 1

    + on bounce

    ++ colliding with another car

    --> Set speed as mentioned

    ++ else

    +++ variable is -1

    ---> do what is needed if the car hits anything but a car, while driving backward

    +++ else

    ---> do what is needed if the car hits anything but a car, while driving forward

    It should be doable. But, of course, you can always try to do it with custom behavior. It's just, that you don't need to completely redo the car behavior, just those on bounce situations, and therefore events are the easier solution with less overhead.

  • http://www.scirra.com/forum/viewtopic.php?f=8&t=8400

    Further down on that page you will find a cap, that accesses a 2D-array, writing and reading. Compare it with your array usage, maybe it helps.

    Also, Verve! features its own sort algorithm, realized with 4 arrays, accessing them reading, writing and resizing.

    Good luck

  • I would love to give you an exact example, but I don't have a pc to work with Construct for quite a while.

    But you really don't need another behavior, just use events that take over control as soon as the car behavior needs tweaks.

    Your idea is what I would do, too. Adjusting the speed, via 'Set speed'. Do it over time (n * TimeDelta). And keep in mind, that when bouncing, all values are expressed negative. If you don't want the car to go backwards, but rather slow down against zero, just reverse 'Get Speed' with abs() in the 'on bounce'-event.

    + On bounce

    -> car: Set speed to Abs(expression for get speed) - n * TimeDelta

    n being pixels per second, e.g. 'Get deceleration'

    This would decelerate linear and only when bouncing, making sense only when hitting another car for several ticks. It's just a simple approach to point to the right direction. For more detail I would need to work with Construct. I'm sorry.

  • Unless you're using some 15 year old gfx card, I'd bet it's a driver problem, particularly if it isn't a Construct problem alone.

  • The car behavior is rather limited in the points you mentioned. But there's a trigger, 'on bounce', it will be triggered once, exactly after a collision. I used it to get rid of bouncing, by using the action 'stop', in Verve!.

    You could use the trigger to dampen the bouncing. Also, decceleration is quite possible.

    When the car drives backwards, the velocity is expressed negative. Just create a condition that checks for velocity < 0, and dampen the velocity in some way, e.g. velocity = velocity - velocity * TimeDelta, or whatever is to your likings.

  • Open the wizard. Instead of picking an object right-click over the bar and select "use expression" from the context menu.

  • I wasn't able to get either threading or multiprocessing to fully work with Python. For some reason, I can't seem to populate the entire Construct array inside the thread (only the first element). It is like it runs the loop once then just stops.... also can't set globalvars from inside the thread, etc... For multiprocessing I get an error "AttributeError: 'module' object has no attribute 'argv'...perhaps related to running the program via the Construct IDE and not commandline.

    That's really too bad. I assume that Construct's objects are only updated per tick and threads are running outside the scope. Threading might only be usable with a Python array/list/dict etc.

    AttributeError: 'module' object has no attribute... most often indicates that there is no correct path to the module. Maybe a 'sys.path.append' with the working or temp directory in the script before calling any other functions could help? Also, try saving the script to Construct's python directory and import it.

    A few weeks left until I can really test things out instead of just proposing them and hoping for the best ^.^

  • Also, Python may be an alternative. The standard library, starting with v2.6, supports threading/multiprocessing:

    http://docs.python.org/release/2.6.7/li ... ading.html

    http://docs.python.org/release/2.6.7/li ... ssing.html

  • >

    > Not directly, but you can use UID to find identical objects:

    >

    index=0
    > for i,obj in enumerate(Sprite):
    >     if obj.uid==SOL.Sprite.uid:
    >         index=i
    >         break[/code:2vs3xkyj]
    > 
    > 
    

    Does this work with indirect references? I mean the selected objects list:

    def getIndex(constructObject):
        index=0
        for i,obj in enumerate(constructObject):
            if obj.uid==SOL.constructObject.uid:
                index=i
                break
        return index[/code:2vs3xkyj]
    If it isn't possible, is there a workaround without direct access like SOL.Sprite ?
  • Yes, the new code makes more sense

    But being the smart *** I am I can't let go and need to talk about the expression 'timer' again. You are using 'Every 1000 milliseconds', which isn't a bad thing. But you are not counting seconds this way. And this is why:

    Every event including every x ms can only be triggered on a tick. A tick has a duration, and that duration depends on many details, e.g. the number of events that need to be executed (something that differs from tick to tick), the processor speed, the cap is run on, even the system may interfere because of heavy hd access or other background tasks.

    This all leads to totally different tick durations, even when overall the game runs with stable 30, 60 or whatever fps. So when will every x ms be executed? On the nearest tick right on or after the specified time. In other words, every 1000 ms may be executed after 1002 ms the first time, after 1011 ms the second time, after 1000 ms the third time, etc.

    I know, this might not be essential for a game, but then again, if you really want to count seconds (up or down) you can only rely on 'timer' (followed by timedelta), because those are counted outside of the event loop, so whenever you ask for 'timer' you get a very accurate time measure.

    But, as I said before, this might not be that important for a game

  • I know, but I do think it has the same reason, the time units needed to evaluate the or'ed conditions. On the top level of the event tree it gives the impression of always working (although it does only work beginning with tick 2 (instead of tick 1).

    I use the following image to explain it to myself:

    Tick N: First condition is retrieved. Second is missing, so it can't be compared. Any call to the 'or' event will fail.

    Tick N + 1: Second condition is retrieved. Both are present to compare. A call to the event will be successful.