tulamide's Forum Posts

  • This is probably something very easy, but I don't see the forest for the trees. How can I get rid of this ugly (and much too large) font, that is used since I switched to .96 of Construct?

    http://www.bilderhoster.net/safeforbilder/5r8wzx96.jpg

    EDIT: Added direct link

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You would need to do a translation as there is currently none. Have a look at this thread: http://www.scirra.com/forum/viewtopic.php?f=7&t=1593&hilit=translation

    To translate, go to your Construct folder and open the folder "Languages". You will find a folder "English (UK)". Copy this one and translate the text files in your copied folder (but be careful not to translate the parts, that are not yet supported for translation). I'm just not sure how to activate it. I assume you would have to replace the content of the "English (UK)" folder. Anyone else who can confirm this?

  • Happy Birthday!

    I'm with Construct just a little over a year, but it feels like it was there forever. Your baby has grown a lot and with it the community. And I still think, it's the community that makes Construct so special. I never had a question unanswered, I answered every question I could, the comm shares thoughts and techniques, pushes themselfs more and more with fantastic results (just think about all those plugins and effects, and the wonderful games and tech-demos) and really care about this 3-year old baby.

    You've done a good work, and I really hope you can stick to the enthusiasm that brought it all to life.

    *put on silver-glitter-suit and dance through the streets*

  • damn, arima, you're right. So, this is a perfect example of "four eyes see more than two"

  • Thanks, but what I'm trying to do is recreate this movement so it's framerate independant. Using the above code makes the enemy extremely fast using unlimited framerate mode, regardless of how I add timedelta.

    It seems I need to scrap the above code and use a different custom movement..one that moves the enemy in a similar but framerate independant fashion..but I'm not sure how

    That's exactly what timedelta is for, so if it doesn't work for you, there's something wrong with the math you're using. If I set the sprite's x to sprite.x + 64 * TimeDelta, it moves exactly 64 pixels per second to the right, no matter the framerate.

    I would suggest you create an example cap showing the problem, maybe a few more eyes see an issue that hides from your eyes?

    EDIT: Maybe you're not taken into account, how often the condition is met? if the enemy is close to the player for a second, the condition is met your framerate's times. So, when running with 60fps it is met 60x and the enemy's x is affected 60x, with unlimited mode it might be 3000fps and the condition is met 3000x during that second and so affects the enemy's x 3000x. What you would need then is a relative change of the enemy's x not an absolute.

    EDIT2: Hmm, thinking about it a second time, this seems to be nonsense, because TimeDelta already makes it relative. There must be something else.

  • On the other hand, this is one of the things I was trying to emphasize in this post:

    We are so close to 1.0, better make it consistent than confusing the user.

  • well, they didn't lie (24/1)

  • ...I was trying to compare the parameter using system function and as an event..

    Not to confuse you, but this is possible ...as long as it is done within the function declaration. For example:

    +On function "test"

    ++function.param(1) equal to 2

    ->Set text to "yes it works"

    +timer is equal to 5000

    ->add parameter 2

    ->call function test

    Assuming there's a textbox and a function object in the layout, this will set the text to "yes it works" after 5 seconds have passed.

    This means, if you want some kind of a central point to manage a menu or something like that, you could set up a function that will test for all possible values:

    on function "selector"
        function.param(1) equal to 1
                                                    ->do menu 1 option
        else
        function.param(1) equal to 2
                                                    ->do menu 2 option
        else
        function.param(1) equal to 3
                                                    ->do menu 3 option
    
    on left clicked on red sprite
                                                    ->add parameter 1
                                                      call function "selector"
    on left clicked on green sprite
                                                    ->add parameter 2
                                                      call function "selector"
    on left clicked on blue sprite
                                                    ->add parameter 3
                                                      call function "selector"[/code:25xuhyac]
  • What Arima said.

    The background: You currently have a fixed value per tick that you substract, but the ticks are of different durations. When using timedelta, you need to know or set a value per second instead of per tick.

  • Functions

    When I add a function parameter then use that parameter for an event, it doesn't register.

    Something like:

    Button Clicked -> Add Paramter 2 (an integer)

    if Function.Param(1) == 2 -> do something

    it doesn't do something..

    However, if I do this:

    Button Clicked -> Add Paramter "something" (a string)

    if Function.Param(1) == "something" -> do something

    it works!

    So is this a bug or am i doing something wrong

    You shouldn't rely on a function parameter being accessible through events. You don't know how they are stored internally, converted, etc. Those parameters are always accessible within a function and you can rely on that. But for a structure like the one of your example you have global and private variables.

  • There's more than saving vram. Graphic cards support textures only up to a specific size. Modern cards may support 8192x8192, older may only support 512x512 or even only 256x256.

    So, when you have a huge image, let's say 8192x4096, you should cut it into smaller pieces, if you want to support players with older gfx cards.

    Also, when using pixel shaders in your game, you could get in trouble, too. Only ps3 (and up) is guaranteed to work on 4k textures. (This could be misleading, let me say it this way: If a card supports ps3, it also has to support 4k textures)

    But you could also still save some vram. Let's take the example 800x800. It's just a matter of how you split the image. See the graphic below:

  • How do non-solid offscreen objects affect performance?

    I might have a Jillion of them :s

    Do you mean invisible objects? Or transparent objects? Or really objects without the solid attribute?

    Invisible objects don't affect the graphic performance, but might affect the processor load (e.g when using PVs from them).

    Transparent and objects without the solid attribute that are offscreen don't affect the graphic card's performance, but they do add to the main processor load. There is no magic that decides when an object has to be drawn, animated, rotated, etc, because it's onscreen. Instead of magic there's simple calculation. Unless Construct will have some mapping that puts the objects in groups of importance (in relation to their distance from the current screen), this means calculating all objects' distances from the current screen.

  • Need some debug help

    http://www.box.net/shared/6ac37tfmk9

    The initial 1 min and 3 minute timer works

    But I can not change my mind and select a different time once one started. Also after hitting stop I can not restart

    Any thoughts?

    Don't mix the code and the behaviour of the xaudio2 object here

    The basic code is correct. It changes 'TimerCheck' to the correct values. The problem is the way you use xa2. You order it to autoplay, that means it will use the next free channel to play whatever it needs to play, until the end of the soundfile is reached. This is not sufficient for your needs I think.

    Instead, use xa2's 'Load file' to bind the soundfile to a specific channel, and use xa2's 'Play' to play the sound. When hitting the stop button you should then also stop the sound.

    To reset the sound, just set the channel's position to zero.

    You don't want to repeat an action every x milliseconds, you rather want to loop a timespan for a specific amount of time (until you hit stop) beginning with a button being pressed. I would recommend to use Timer and a global 'TimeStamp" for this task. With modulo you will get a loop over the allowed timespan. There's just one thing to pass attention to: Timer is an exact value, whereas your events are executed within a tick that may last for several milliseconds. That's why you can't directly compare to zero but a range. For most event sheets, one TimeDelta-range should be enough. TimeDelta is a fraction of a second, so multiply it by 1000 to get a milliseconds value to compare with. If your project grows and you happen to not hear the sound playing, just raise that value in TimeDelta steps (so the next range to compare with would be TimeDelta * 2000)

    btw, you shouldn't raise the volume to 25db, or you will risk the ears of your users. For very quiet sounds setting the master volume to 6 or at maximum 12 db may be ok. On the other hand, there's always the limiter, if you didn't touch it, it will at least prevent distortion. Also, there is no way to restore to 0db right now.

    Yeah, sounds more complicated than it is, really. Have a look at your reworked cap:

    rwTimer.cap

  • Just make sure a condition is met and run the "every..." event as a sub-event.

    + On left clicked on Sprite

    -> System: Set global variable 'warning' to 1

    + Is global variable 'warning' equal to 1

    ++ Every x milliseconds

    -->do whatever is needed after the button was clicked

  • [quote:1ie4m1jp]you might be able to save sometime by using a dictionary

    That's probably a good idea. Could this be used to substitute for an array? I wouldn't be using it to save the game, but it would store values with 3 keys (ex. (x,y,z) or (1,2,1)).

    I'm not exactly sure how you want to create, change and use the values.

    A dictionary stores key/value pairs, much like Construct's HashTable. The closest substitute for an array would be a list. If the values you are using are set once and never change, then you could use tuples. Last but not least you can always create your own data structure using "class"

    # creating a tuple
    position_t = (1, 2, 1)
        # alternative way
        # positon_t = 1, 2, 1
    
    # creating a list
    position_l = [1, 2, 1]
    
    # creating a dict
    position_d = {'x': 1, 'y': 2, 'z': 1}
    
    # creating your own data structure
    class position:
        def __init__(self, x=1, y=2, z=1):
            self.x = x
            self.y = y
            self.z = z
    
    # creating an instance with default values 1, 2, 1
    p1 = position()
    
    # creating an instance with values 4, 3, 7
    p2 = position(4, 3, 7)[/code:1ie4m1jp]
    You may also mix those sequence types/classes to get the structure you need.
    
    [code:1ie4m1jp]# two fixed coords build the positions dict
    headquarter = (1, 2, 1)
    goldmine = (3, 7, 2)
    positions_d = {'head': headquarter, 'gold': goldmine}
    
    # the same with a list
    positions_l = [headquarter, goldmine][/code:1ie4m1jp]
    
    It all depends on what exactly you are trying to do with your values.