tulamide's Forum Posts

  • Currently trying to work on my tutorial. Sadly all over the website (at least in the chat and in the tutorial submitter) the multiply sign * is interpeted as a control code and omitted in the text. I think it is as soon as there are two or more multiply signs in one line (which happens quite often if you present a formula). Also, if trying to use the code icon of the tutorial submitter, the text is still converted, and instead of the multiply signs you see the control code, e.g. '<em>', '</em>', etc.

  • http://pxp-graphics.blogspot.com/p/topdown-sprites.html

    http://veni-mortem.deviantart.com/art/Top-Down-Sprite-Pack-150122353

    http://www.retrostylegames.com/blog/free-skeleton-warriors-sprites/

    These are just three of the many links found by googling for "free sprites top down" <img src="smileys/smiley2.gif" border="0" align="middle">

  • There is either rezising going on or zooming. If you used it the same way as in the example (a dedicated layer for the trail sprites below the player's layer), make sure the trail's layer has the same settings for zooming/scrolling as the player's layer.

    Btw: If framerate is an issue with your game, consider the sprite way, because a Canvas uses much more gpu/cpu power, and you will at least have 4 or 5 of them per trail.

    If you can't figure it out, set up an example cap and I'll have a look at what went wrong.

  • What I was thinking was that each spot on the array corresponds to a PV- let's call it "NameEntry"

    1 on NameEntry corresponds to A, 2 to B, and so on.

    So for the three blank spots, scrolling down would increase the value of NameEntry, thus scrolling through the letters/numbers, before resetting back to A.

    Does that make sense?

    Yes it does. Just keep it as simple as possible. Decide which way to go (text boxes or sprites), then use efficient routines.

    For sprites, just add all the letters as frames and switch the frame number according to the input. No need for an array. You could then save the score data with the framenumbers instead of actual letters (e.g. 2000 points from "ABC" would be saved as "2000, 1, 2, 3" or similar)

    For textboxes you would setup a 1-dimensional array with all the letters, and fill the textbox with the index received through input (e.g. Set text to Array(currentIndex)). Again, you could save the score with indices instead of real letters.

  • Thank you all very much <img src="smileys/smiley1.gif" border="0" align="middle" />

    Dancer definitely isn't polished. But I wanted it posted, so I can go on with the tut.

    • My vision for the dancer was a nice designed convincing character (does anyone remember lucid's perfectly animated praying mantis?). Bad news, I **** at drawing. <img src="smileys/smiley36.gif" border="0" align="middle" />
    • I created Dancer to show the potential, that lies behind 2 pretty unremarkable expressions. Imagine an r-type like shooter where the patterns are created based on the music, or an underwater adventure where the background warps smooth related to the music, or a player character whose weapon strength is dependent on the music's power, etc.
    • I will have a look at all your ideas for improving Dancer, hopefully I can implement some of them. But the tut comes first.

    RMS stands for Root Mean Squared, so I think it represents the average volume level.

    For electrical terms it can be the average current, voltage, or power produced from an alternating current source (it is calculated as the maximum value divided by the square root of 2).eplace 'volume' by 'signal' in the first sentence, and you have a perfect description (well, I guess no need for a tutorial anymore then?)

    EDIT: If you set both Sensitivity and Activity to max and try minimizing other windows or applications, it messes up the figure for some reason.

    Don't know if this is a bug or not, just wanted to mention it.

    This will also happen under some other circumstances, even if sensitivity and activity are not at their max level. The problem are the physics here. It seems that when Construct apps get no processing time for a shorter or longer period, the physics try to interpolate based on the time passed - but it leads to unwanted results. Maybe I can set the strength to zero while Dancer's window doesn't have the focus.

    Thanks again to all for the warm words <img src="smileys/smiley9.gif" border="0" align="middle" />

  • Dancer is a special .ogg and .wav file player, featuring a dancing puppet.

    This fun app is part of (or example to) a tutorial I want to post soon, about the lesser known or used ACEs of the XAudio2 object, mainly Peak and RMS.

    Play around with Dancer, it really makes fun!

    The puppet has no premade animations or anything else premade. It simply reacts to Peak and RMS in various combinations!

    F1 toggles a context help.

    If you don't have some .ogg music at hand, here is one of my own songs. Please don't use it in any way other than listening to:

    http://www.mediafire.com/file/d6a4tcx5a808nqj/When_I_think_of_you.ogg

    There are some sources for .ogg music, e.g. http://www.01audio-video.com/download_ogg.htm

    And you could convert some of your mp3's to ogg. Audacity does a good job.

    Download Dancer: http://www.mediafire.com/file/b3vw5whkvb1fnji/Dancer.rar

    EDIT: Just wanted to mention that the level meter are absolutely professional in resolution and display, including dynamic range meter...

  • If only I could have my beloved preview... <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't care what other people qualify a question to, either. If there's a question and I'm able to answer it, I will.

    It isn't as easy as you might think, because you're working with a constantly ticking, parallel processing tool.

    Here is just one example. Keep in mind, there are a couple of other ways to get to the same result, this is just the way I'd do it.

    http://www.mediafire.com/file/jymdjj40y9893ui/npctalking.cap

    (move with arrow keys, interact with space)

  • Sure, why not <img src="smileys/smiley36.gif" border="0" align="middle">

    http://www.mediafire.com/file/f912za7h4cd7eo7/trail.cap

  • Is timer a global variable? Or is it a behavior? Same with timestamp.

    ... you could also use the system expression timer ... timer returns the time passed since start of the game in milliseconds img src="smileys/smiley4.gif" border="0" align="middle">

    But I admit, I wasn't very clear on that.

    Here is the link to the Wiki, btw: Construct Wiki

    Timer: It is a system expression. You access it either by typing "Timer" where needed, or by selecting "Get timer" in the expression wizard of the system object.

    Timestamp: The single quotation marks I used were to indicate that it is a variable. Either global or private - I prefer PV where possible.

    The principle of that method is to get a pointer to a certain time. This can be compared to another time, and if some predefined period has elapsed, you can trigger any other actions you need at that time.

    Calling timer after game ran for 5 seconds:

    timer will return 5000

    Calling timer after game ran for 7 seconds:

    timer will return 7000

    If you use a variable 'timestamp' and fill it once with timer after the game ran for 5 seconds:

    'timestamp' will be filled with timer, and timer returns 5000, so

    'timestamp' = 5000

    If you constantly test against 'timestamp':

    if timer - 2000 = 'timestamp'

    This condition will be true as soon as timer reaches 7000, because 7000 - 2000 = 5000

    Instead of the number 2000, you could use another variable, I called it 'maxTime'. It is the period allowed before the condition will become true:

    if timer - 'maxTime' = 'timestamp'

    Now the problem is, you not just want something to happen after 2 seconds, you also want to inform the player about how many time there is left. That's the third variable 'remaining'. It needs to be set to the difference of 'maxTime' and the current progress within the period. After 0.5s the remaining time is 1.5s, etc:

    set 'remaining' to 'maxTime' - (timer - 'timestamp')

    Let's fill this with values to see how it works. 'timestamp' = 5000, 'maxTime' = 2000.

    We call this action by chance when timer returns 6500, that's 1.5s after we filled 'timestamp':

    set 'remaining' to 2000 - (6500 - 5000) => 2000 - 1500 => 500 or 0.5s

    But 'remaining' will always be calculated, so it can get negative. Imagine we call the action, when timer will return 10000, that's 5 seconds after we filled 'timestamp':

    set 'remaining' to 2000 - (10000 - 5000) => 2000 - 5000 => -3000 or -3s

    We surely don't want that to happen, so we need to catch that before it goes negative:

    'remaining' <= 0

    This condition will be used to trigger any action that makes sense. You could use it to end the game, or you could fill 'timestamp' again with timer, that would reset the timing, so we get a continous loop of a countdown from 2s to 0s, 2s to 0s, ..., or you could switch to another layout. Whatever is needed.

    2)

    So the way I am understanding arrays, they are like grids with values at each of the grid spaces.

    Now, I want a high-score table where people can enter their names, but I don't want something like "type your name here" since that is kind of lame.

    I was wondering, that maybe I can set up an array which has in each space the value for a letter, like A, or H, or a number, 0-9. Stuff like that.

    Of course, I don't know how I'd get that to work, but is it possible?

    I'm sorry but I don't quite understand. Is it the kind of input (name typing, or selecting letters per digit by using up/down/left/right) you are concerned of, or the actual values to store?

    3) Tutorials seem to be split on this- to do a score system, and a high-score system, do you go with arrays, or do you go with INI files (perhaps protected by CRC32), or perhaps some mixture of the two? Whatever is easier is good for me!

    They both are relatively easy. Using ini-files you have all of the informations stored in 1 file, while arrays may use 2,3 or more files, depending on the informations to save, but are more easily sortable. There are two other possibilities: You could also use a hash table.

    Arrays and hash table save their data in a binary format (non human readable), while ini files are simple text files. So you don't really need a crc32 protection for arrays/hashtables.

    Last, but not least you could use 's', a fantastic plugin by lucid. Sorting is easy as well as saving/loading. Plus, all data is not only saved in binary format, but encrypted also, without the need for extra code.

  • YES! Finally!

    Networking with Construct. Hopefully this will become a standard plug for future releases of CC <img src="smileys/smiley4.gif" border="0" align="middle" />

    Can't wait to test it myself. Your work is much appreciated. Thank you.

    (But don't you dare to take a break now <img src="smileys/smiley17.gif" border="0" align="middle" /> )

  • Or, you could always do your own "cone of sight" routine.

    Have a look at the image.

    o = object with cone of sight

    a = angle, to which o faces

    c = the cone of sight

    r = the radius of the cone

    p = sample points within the cone

    d = distance between points on r

    g = distance between points on cone

    All there is to do is creating a virtual cone, and sample only a small subsets of the possible points within the cone (for speed reasons).

    c exists angular, centered around a. The radius is needed and should probably be the border of the visible screen of your game.

    What you need:

    • The height (r) of the cone in pixel => cH
    • The width of the cone in degrees => cA
    • The sample density along r => pH
    • The sample density along the circumference of the cone => pV

    The position of a sample on the virtual grid is

    x = cos( (a - cA / 2) + loop_through_pV * (cA / pV) ) * loop_through_pH * (cH / pH)

    y = sin( (a - cA / 2) + loop_through_pV * (cA / pV) ) * loop_through_pH * (cH / pH)

    Then do whatever suits your needs at that sample point. In my example I did a collision-at-offset check.

    Download coneofview.cap

  • You did a fantastic work, scidave!

    I was especially amazed how smooth it runs. Fast enough for quick shootouts. Very impressive.

    Networking as a plugin, working as in the demo? That would be awesome!

    I really do need to add serialization support to the plugin, but if the performance is pretty decent for folks I think I am just going to release it as an Alpha and take a well deserved break. :-)

    I won't allow you a break until a decent beta is out <img src="smileys/smiley17.gif" border="0" align="middle" />

  • While it played some ogg and wav files, I can't get it to work with mp3. Either complete silence or a short noise sound and then silence, that's all I get. Does it depend on any other library (lame, etc.)?

    EDIT: And what about 'set position' for sounds and peak/rms levels?