TwinBlazar's Forum Posts

  • [quote:3e0r95ux] I tried loaded it on start layout, I also tried having preload of the music on load, then once preload is done to play the background music.

    are you reloading music? actually, music should be loaded just once. If you load music again, i think it will flush out music data that has already been loaded and start over.

    For streaming, if the Internet connection is bad, there are chances that music streaming will not be stable.

    Since your music is just 5 seconds loop, I suggest putting this sound as sound effects instead. That way, this sound will be loaded as a whole and not as a stream. In addition, if you have "preload all sounds" on, you should be able to play this sound without any problem from now on. Unless C2 has trouble loading it up in the beginning because of unstable connection.

    I believe C2 should keep on trying loading all the sounds listed as sound effects until all sounds are loaded. Only then, will the game start.

  • Without external plugins, you can only play sounds with the default Audio plugin, I'm afraid.

  • Short answer, yes, It's possible.

    Long answer, it's not so straight forward.

    In a nutshell,

    • what you need to do is to create several "checkpoint" object for each stroke of the letter you want to do, and assign index variable for these "checkpoint" object.
    • The index variable will be used for knowing which part of a stroke should be dragged to the next,
    • You can use the Touch events and refer to these index variables accordingly to make sure the player is drawing in order and is on stroke line from the beginning to the end.

    If anyone could provide him a capx, it would be nice...

  • You can simply check for individual object type instead of check for collision using family.

    If my understanding is correct, are you looking for some sort of way to identify the type of object (like using "instanceof" in Java) in family collision when such collision occur?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could you check this for your project setting?

    [quote:1bigbxji]Pixel rounding

    By default Construct 2 objects can be drawn at sub-pixel positions, e.g. (100.3, 200.8). If the browser is using linear filtering, this can make fine pixel art appear blurry. If Pixel rounding is set to On, Construct 2 objects round their position to a whole number before drawing, e.g. (100, 201). This prevents any blurring, and can also prevent "seams" appearing on grids of objects. Note this does not affect their actual X and Y co-ordinates, which can still be between pixels - it only affects where they are drawn on the screen.

    source: https://www.scirra.com/manual/66/projects

  • On the surface, what you have written out seems to be valid, but I believe this is likely related to how you design your event sheet.

    Can you show us how do you design your event sheet?

  • Which will be a better option for game design, a Tilemap or a Sprite?

    This is no game design question but rather optimization question.

    Also, please elaborate more for what do you mean by Linear graphics. Provide some mockup screenshots too, if possible.

  • scrolling outside of layout? Have you somehow set Unbounded Scrolling to true?

    (see https://www.scirra.com/manual/102/scroll-to and https://www.scirra.com/manual/67/layouts and search for Unbounded Scrolling for more info.)

    If this isn't the case, provide us a capx.

  • In the event sheet, you can use Audio's "On ended" trigger.

    [quote:2fydp4u9]

    On ended

    Triggered when a sound with a given tag finishes playing. This is not triggered for looping sounds.

    On a naive level,

    When you play any sound, you can give it a tag. So you can create 3 "On ended" triggers for each audio tag. We will name each tag "musictag1", "musictag2" and "musictag3" for each 3 music respectively.

    When you play the first audio, give it tag "musictag1".

    When the first audio finishes, "On ended" trigger for "musictag1" will fire. In this trigger, you can play the second audio, and give it tag "musictag2".

    When the second audio finishes, "On ended" trigger for "musictag2" will fire. In this trigger, you can play the third audio, and give it tag "musictag3".

    When the third audio finishes, "On ended" trigger for "musictag3" will fire. In this trigger, if you wish to play the first audio again, you can just play the first audio and give it tag "musictag1".

    This naive implementation will have the music keep on playing these 3 musics forever.

    -----

    A possibly better approach:

    The problem with naive implementation above is that if you have 100 songs, doing all those "On ended" trigger charade for each audio is really silly and not feasible for bigger list of song.

    The following is one of the better ways to do this, which name all songs to be in sequential indices, uses variables to keep track of which music is being played and one "On Ended" trigger:

    1. Name all of your songs like this: "music1.ogg", "music2.ogg", ......., "music10.ogg" (Let's assume you have 10 music this time)

    2. Create a global variable named "totalMusic" that keeps track of how many music are there. Since we assume there are 10 music here, we will set the variable "totalMusic" to 10.

    3. Create a global variable named "currentMusic" which is used to track current music index.

    4. Now, play the first music "music1" and give it tag "musictag1", as well as set currentMusic to 1.

    5. Create "On Ended" Trigger which looks for the tag "musictag" & currentMusic. This means "On Ended" trigger will look for "musictag1", as currentMusic is set to 1 in step 4. In "On Ended" Trigger, do the following event and actions:

    -- add 1 to the variable currentMusic

    -- if currentMusic > totalMusic, set currentMusic to 1.

    -- play music "music" & currentMusic and give it tag "musictag" & currentMusic.

    With the logic in step 5 for "On Ended" trigger, this will play all of your 10 music one after another and also get back to the first music after the last music is finished.

    Do you follow this so far? If not, feel free to ask.

  • Share their own levels with friends? Have you ever tried opening some map files of some games? For some games, they just store map's data in XML format while some older games, they might use INI format. This all depends on them.

    Firstly, you possibly need to create your own level parser, and you will possibly be the one who design and decide of all the format and what not. When your app parses the file, it should decide which code does what and which object goes where on a map in the game, possibly in the beginning of the layout, etc. Also, do you want the map to be able to hold some logic too? (ex. if player enters a certain area, what happened?) If so, your event sheets must be designed to be flexible and applicable with all these user-generated contents.

    Transferring a level from one machine to another would be similar to transferring a file. Back when Internet is still slow and sluggish and less interactive, players just download map files (made by other people) online, place these files in the game's folder, then load them up in the game. But of course, many games these days download new maps, etc. automatically, place them in the right place, and the player will just see all the new maps updated and selectable in their game. The idea is the same, but just automated. (Alternatively, some online games stream a map from a server and load it up without saving any file on the device.)

    I think you gotta go down and dirty for this, unless there are some magnificent plugin/tools/engine out there that I am not aware of that could help you further a bit. Have you check out for something like this in the Scirra Store?

  • Yes, check the Examples that came with C2. Look for the file Audio analyser.capx in the Example folder.

  • I see someone already helped you there.

  • Somehow I couldn't load your capx. Can you try that again, but change "https://" to "abcde://" so the forums won't parse that as a link and shrink it?

  • I have a feeling that this is related to https://www.scirra.com/tutorials/67/del ... ence#h2a12 See Minimum framerate section?

    [quote:34uxwuj4]At very low framerates, dt can become very large. For example, at 5 FPS, dt is 0.2. An object moving at 500 pixels per second is therefore moving 100 pixels per tick. This can cause it to "teleport" through walls or miss collisions with other objects.

    Games are usually unplayable at such low framerates, but it is even worse if they become unstable like that. To help the game stay reliable even at very low framerates, Construct 2 does not let dt get larger than 1/30 (about 0.033). In other words, below 30 FPS, dt stays at 0.033. This does also mean below 30 FPS the game starts going in to a slow-motion effect (described earlier as one of the issues of framerate dependent games), however this is usually a better result than the "teleporting objects" problem.

    If you want to set a different limit to 1/30, you can use the system action Set minimum framerate.

    For your case, I believe that the game runs fast enough, but since you mentioned the enemy move faster, I have a feeling that they might be moving so fast that they just "teleport" through the walls. Could you see whether this is indeed the case?

    For Screen Capture, you can use Snipping Tool. Windows should come with it. But I believe video capturing might be needed more in this case?

  • If you are asking this question, you may wish to follow all the basic tutorials of C2 first, starting from https://www.scirra.com/tutorials/37/beg ... onstruct-2