TwinBlazar's Recent Forum Activity

  • Although event sheet 2 is at the bottom of event sheet 1, execution precedent-wise for the trigger "on start of layout" in the included event sheet is executed before the trigger "on start of layout" in event sheet 1.

    I think the behavior is correct.

  • Also, this is more of an art question, so Kyatric, what do you think of moving this post to perhaps Open Topic?

  • See http://www.gamasutra.com/view/news/1766 ... _games.php

    [quote:eijp8jzp]If you want to learn more about making great game animations, Robertson says the best way is to play classic games from developers like Taito and Irem, watch entire animated movies frame-by-frame, take relevant educational courses, and read Ollie Johnston and Frank Thomas' The Illusion of Life: Disney Animation (http://www.amazon.com/The-ILLUSION-OF-L ... 0786860707)

  • You could create a group of functions like this:

    on function "group1": (this function creates 2 coins vertically)

    • create coin at 800, 200.
    • create coin at 800, 300.

    on function "group2": (this function creates 3 coins diagonally)

    • create coin at 700, 150
    • create coin at 750, 200
    • create coin at 800, 250

    These functions basically create coins at the specified locations upon being called.

    Now, what you need to do is you need to create the coins in the formation you want. To create stars or other interesting shapes, you need all the points of those shapes and apply all of these coordinates into the position of each coin being created.

  • After you understand the concept above, the next would be start throwing obstacles (probably woth Bullet behavior) that spawn at the top and come down in each lane.

    Now, for the isometric part, this will depend on your aesthetic design and art, but it is not much different from non-isometric view. Maybe try add some art assets and try play around with it.

  • One simple way to do this:

    1. create a global variable to keep track of which lane is the player in. Let's call it "globalLane".

    2. from player's swipe left/right, you increase/decrease globalLane by 1, but make sure they are only in the range of 0 to 2. You can do something like, for example: globalLane = max(0, min(2, globalLane) after you increase/decrease it.

    3. create a new object and call it "signalObj". Every tick, do this:

    if globalLane = 0, set signalObj.X = 100, signalObj.Y = 300.

    if globalLane = 1, set signalObj.X = 200, signalObj.Y = 300.

    if globalLane = 2, set signalObj.X = 300, signalObj.Y = 300.

    4.Create a player object, and in the event sheet, do this every tick :

    player move towards signalObj. You can use:

    [quote:aybkn2pz]Move at angle

    Move the object a number of pixels at a given angle in degrees.

    So: player Move 100*dt pixels at angle angle(player.X, player.Y, signalObj.X, signalObj.Y)

    All these above should give you a basic idea to do what you want. Of course, this is just a basic simpler implementation idea, and not the best way to implement.

  • I think you can use this system condition below and put all of your ( (a = 1 && b = 1)|| c = 1 ) into the first expression and put 1 into the second expression:

    [quote:36jiy9x3]

    Compare two values

    Compare any two expressions (which can either numbers or text) with each other. They can be compared as Equal, Not equal, Less, Less or equal, Greater or Greater or equal.

    source: https://www.scirra.com/manual/124/system-conditions

    Also, the comparison operator for AND and OR in C2 is not && and ||, but & and |.

    See:

    [quote:36jiy9x3]

    Operators

    You can use the following operators in expressions:

    + (addition)

    • (subtraction)

    * (multiplication)

    / (division)

    % (modulo, remainder after division)

    ^ (raise to power, e.g. 5 ^ 2 = 25)

    & (build strings, e.g. "Your score is: " & score)

    There are also comparison operators =, <>, <, <=, >, >= for comparing values. They return 1 if the comparison is true or 0 if false.

    & can also be used as logical AND, and | is a logical OR operator. These are useful combined with the comparison operators, e.g. score < 0 | health < 0, which also return 1 if true and 0 if false.

    ?: is a conditional operator, which allows you to test conditions in expressions. This is especially useful when used with the comparison operators and logical operators. It takes the form condition ? result_if_true : result_if_false

    e.g. health < 0 | score < 0 ? "Game over!" : "Keep going!".

    The condition counts as true if it is non-zero, and false if it is zero.

    source: https://www.scirra.com/manual/78/expressions

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cuz using animated sprites for waterfall mean the number of objects required for copy and paste could be tremedous depending on how many waterfalls there are in the layout.

    Also, if the waterfall is long, how many waterfall objects do u need for one waterfall?

    If a layout has just a few short waterfalls, then sure, you can just copy paste animated Sprites all over and call it a day. (I did this in my game. )

  • I see someone have already mentioned of using the easier particles system already. but if in case that you have lots of waterfalls (implying tons of particle instances on screen, your game's framerate might drop to a crawl especially if this is on the weaker mobile devices.

    If you don't need to optimize, stop reading. But if you do need to optimize, this is another method that uses far fewer instances although also more complicated:

    You can have animated Tiles via event sheet using layer switching method:

    What you need is to create multiple Tiles with respect to number of frames you have. (ex. waterfall_1, waterfall_2 up to waterfall_n, where n is total number of animation frames you have) Put all of these in an unused layout.

    Then, in the layout, create number of layers with respect to total number of waterfall frames you have (ex. "waterfall_layer1", "waterfall_layer2" up to "waterfall_layerX")

    Now, create waterfall_1 at where you want these waterfalls to be on layer "waterfall_layer1".

    Now, on start of layout event, you check through all waterfall_1 Tiles using For Each loop, and do the following:

    • create waterfall_2 tile on layer "waterfall_layer2"
    • create waterfall_3 tile on layer "waterfall_layer3"

    ...

    ...

    (do this up to the last waterfall tile and last layer)

    Now, create 2 global variables called "waterfallstep" and "modwaterfallstep" and set them to 0 and create another global variable called "totalnumberofwaterfallframes" and set it to the number of total animating frames you have for your waterfall.

    Now, create "every 0.1 sec." event , where u will increment waterfallstep by 1 and set modwaterfallstep using this formula:

    modwaterfallstep = waterfallstep % totalnumberofwaterfallframes

    Because of the % modulo operator, this formula will only yield increasing number from 0 to number of waterfall frames you have and then the increasing number will be thrown back to 0 thanks to % modulo operator.

    Now, after the action above, you use for loop i = 1 to totalnumberofwaterfallframes. In this loop, you do this:

    if (i = modwaterfallstep), set layer "waterfall_layer" + i to be visible.

    Else set layer "waterfall_layer" + i to be invisible.

    This means, in "every 0.1 sec" event, the event sheet will go through all of your waterfall layers and will make the only one unique layer that is equal to modwaterfallstep to be visible, while all other layers are turned invisible.

    This will give you the impression of animating tiles. It is a lot more work and hectic, but you can waterfall as long as you like without affecting performance (unlike using particles). All of these waterfall tiles are also not iterated through in every tick (unlike particles as well). Therefore, there won't be much of any performance cost here at all.

  • On NW.js, you could write/read this information to another file yourself, using the NodeWebkit's functionalities:

    [quote:26w722xb]

    Action:

    Write file

    Write a text file to the user's local system. If the file does not exist, it is created. If the file already exists, its content is overwritten.

    Expression:

    ReadFile(path)

    Open the given file and return its text content as a string. Note that each time this expression is used the file is opened and read from disk. Therefore if the expression is used twice, the file is opened and read twice, which can impact performance. If necessary first read the file to a variable, then reference the variable multiple times.

    Alternatively, I believe you could also write/read such data using LocalStorage: https://www.scirra.com/manual/188/local-storage

    For the system time, you may need to use this: plugin-system-date-and-time_t63492

  • Possible but not so straight forward.

    first, see https://www.scirra.com/tutorials/624/te ... box/page-1

    I don't know whether you can truly do all the HTML charade like in regular website on the textbox of C2 alone. If it's possible, that would simplify your problem quite greatly.

    Nevertheless, with respect to the tutorial above, what I would do is creating a Sprite Font that has two colors in it.

    For example, you have the default black letters and red letters. And refer to the red letters in the "character set" [1] by using unicode characters such as ⒶⒷⒸⒹⒺⒻⒼⒽ [2] .

    Also, continuing from the tutorial above in this case, in the event sheet, you would want to check for the text input and see if the input has any matches with certain strings that you want. You will then replace all the characters in such string with their alphanumeric counterparts. Now, you will have certain red words or phrases in your text. It's quite hectic and lots of works.

    Perhaps somebody could suggest a more elegant way?

    [1] - from Sprite Font, C2 manual:

    [quote:ry7dsweu]Character set

    A string of characters that describes the sequence of letters in the sprite font image. This is used to map text to images. While the default starts with the English alphabet, it could be changed to another language or sequence and the image updated accordingly. Note however the Sprite Font can only display characters that are in the character set; any characters not in the character set with a corresponding image will appear as an empty space.

    [2][quote:ry7dsweu]Enclosed Alphanumeric from https://en.m.wikipedia.org/wiki/Enclosed_Alphanumerics

  • Without Canvas+,

    I just tried connecting some bluetooth joystick to my Android phone. I see my C2 game could register button presses responsively but it couldn't register any of D-Pad and the analog sticks. So it somehow got partial support by default.

    Also, I tried http://html5gamepad.com/ on my smartphone and see that my bluetooth joystick could send signals to it. However, the gamepad testing site could not receive R3 analog stick, D-Pad, L2 and R2 button presses. It could receive L3 analog sticks fine though.

    All these joystick charades on smartphone don't seem to get all the proper love, I feel... this is unfortunate.

    But with Canvas+, can you try test and tell us the result, TecenGOD?

TwinBlazar's avatar

TwinBlazar

Member since 14 Apr, 2013

Twitter
TwinBlazar has 1 followers

Connect with TwinBlazar

Trophy Case

  • 11-Year Club

Progress

11/44
How to earn trophies