tulamide's Recent Forum Activity

  • If you mean, stretching the size with events/by properties, then it doesn't affect VRAM-usage, because it doen't change the original texture. If you change the canvas size in the image editor, then you are resizing the texture directly and therefore affect VRAM-usage.

  • Yes, I wasn't clear on that. Davio explained it better.

  • The power of two doesn't have to be squared. On most, if not all gfx cards a 32x34 texture will pad to 32x64.

    It never gives any advantage to expand a texture up to the next power of two. But it may give you a decrease in memory usage when splitting such a texture into parts that are power of two based.

    Here are two posts, one with example cap, going into detail:

    http://www.scirra.com/forum/viewtopic.php?f=3&t=7578&p=58897#p58897

    http://www.scirra.com/forum/viewtopic.php?f=8&t=7786#p60406

  • Be aware though, setting a fixed framerate means you rely on your player's hardware to be able to calculate that much frames of your game per second, which is not always given. Also, as soon as there is anything that inhibits the pc at times, your game will run much slower, etc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • lucid, I was always taken by 's', using it in a very complex way (and never had issues other than my own mistakes) and encouraged people to at least try to use it. And I always say: "If it crashes it is your own fault." I never experienced any crash that I couldn't solve by carefully looking at what I've done and correct it. 's' is reliable.

    It is just a matter of personal preferences, if you use 's' or python. The latter being a lot more beginner friendly, while 's' doesn't force you to embed and ship python with your game.

    Just to let you and anybody else know that it is one of the most helpful plugins out there (yes, I think it is even more helpful than the already fantastic MagiCam)

  • I'm not sure what you mean. Basically, switching from one sound to another can be done by creating an array with all the names of the sound files and then have a number variable that you change accordingly. When using autoplay, you would then call

    -> XAudio2: Autoplay file AppPath & "enter your sound folder here" & YourArray(YourVariable) (No loop)

    If this is not what you're looking for, then please explain it with more details

  • Make sure that you import everything to the "Files" folder. Ignore the "Sounds", "Music" and "Font" folders. Construct doesn't recognize resources imported to any other folder than "Files".

  • There is the date object, however, it does not accept setting a date other than the current. I think it would be possible to calculate when setting any date is possible. For now, you would have to implement your own math.

  • Replacing isn't that difficult. The system expressions "Get right substring", "Get left substring" and "Get string length" will help you with it.

    As a first exercise do this: Create a text box and create a private variable with the name word, the type text and the initial value fairy.

    In the event sheet insert a "start of layout"-event. Create a sub-event using System - Compare.

    In the first field enter right(Text.Value('word'), 1), comparison equal to, the second field should be "y".

    Now create an action to this condition. Set the text of the text box to left(Text.Value('word'), len(Text.Value('word')) - 1) & "ies"

    + System: right(Text.Value('word'), 1) Equal to "y"
    -> Text: Set text to left(Text.Value('word'), len(Text.Value('word')) - 1) & "ies"
    [/code:uzzt57u4]
    
    What is going on here is that you check if the last letter of the variable [i]word[/i] equals "y". right(text, count) returns the rightmost count letters of word. right("fairy", 1) returns "y", right("fairy", 2) would return "ry", etc.
    In our case the condition becomes true and the action is performed. Here we retrieve the leftmost letters of [i]word[/i]. left("fairy", 1) would return "f", left("fairy", 2) returns "fa", etc. We just need to know the length of the word to get rid of the "y". len(Text.Value('word')) returns the number of letters in [i]word[/i]. We just need to substract 1 from the length ("y" is just one letter). Now [i]left(Text.Value('word'), len(Text.Value('word')) - 1)[/i] returns "fair" and we just need to add our new ending. "fair" & "ies" concatenates to "fairies".
    Success!   
    
    You will most likely work with text, not just words. So you need to find a way to seperate the words of the text first and then use the above method. You will see that [i]GetToken(String, Index, Separator)[/i] is very helpful for that. For example, GetToken("I see fairy", 3, " ") will return "fairy", which you then could correct to "fairies", while rebuilding the text in a new variable or text box or whatever suits your needs.
  • One way of using them is to have variations to a certain animation. The base animation could be for example a straight walking, some sub-animation could then be a drunken walk, a silly walk, a happy walk, etc, whatever comes to mind.

    Or think of the many games where a character makes some funny things if you let it stand too long without playing. Your character could start sleeping or using a fishing rod or doing some stretching exercises, etc. That would all be variations of the standard standing animation.

  • Also, you could store the object's UID together with any info you need using a hashtable.

    http://sourceforge.net/apps/mediawiki/construct/index.php?title=Hash_Table_Object

    (Look at the example)

    But most of the time you won't need to store the objects. Maybe you can explain what you're trying to achieve?

  • Don't use generic objects like MouseKeyboard multiple times. Go to layout 1, layout editor, select MouseKeyboard and in Properties/Common tick Global. Delete the second MouseKeyboard object on layout 2. That's it

    (You worked with the object 'MouseKeyboard' in the 'Animations' event sheet, but the object on the second layout had the name 'MouseKeyboard2'. That in combination with the first MouseKeyboard object not being global caused the problem)

tulamide's avatar

tulamide

Member since 11 Sep, 2009

Twitter
tulamide has 3 followers

Trophy Case

  • 15-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

17/44
How to earn trophies