tulamide's Recent Forum Activity

  • Be careful though, without the limiter all sounds being played at once will add to the maximum loudness. It is easily possible to exceed the 0db, which for digital sound means everything will be unbearable distorted. So, when working without the limiter, you have to make sure, you will never cross the 0db by lowering the volumes of the sounds!

  • Oh, that's cool. I missed that one, indeed.

  • By default, xaudio2 has a limiter active which makes sense but affects the sound being played. Try the following:

    1) While only playing this one sound, switch off the limiter and see if it still crackles.

    2) Open your wav-file with some sound editor and select the first milliseconds (ca 25-50 ms should suffice). Then use a fade-in on that part. Save it and try again with and without the limiter. Does it still crackle?

  • That's what I meant by "mathematically correct". You see, there are two problems here:

    1) sprite.angle returns a value between 0-360, and it expects a positive value in th range 0-360

    2) when crossing 0, the highest and lowest value change, and therefore it's lerping "backwards"

    My Post solves only issue 1)

  • This is so cool!

    Graphically appealing:

    http://earslap.com/projectslab/otomata/ ... 651n1a7a7n

    http://earslap.com/projectslab/otomata/ ... 251n1x7x7n

    Musically appealing (rather simple):

    http://earslap.com/projectslab/otomata/?q=7533

    http://earslap.com/projectslab/otomata/?q=1y79424g

    Graphically and musically appealing:

    http://earslap.com/projectslab/otomata/ ... 424q3y5i4u

    ...and my masterpiece! A very (very!) long sequence, still varying after 5 minutes or so! It's like some musician improvising. Sit back, close your eyes and relax

    http://earslap.com/projectslab/otomata/ ... 1535491v0l

  • Lerpin angles is a bit complicated, might do an example of that.

    lerp(sprite.angle, new angle,x*timedelta)= boo hoo when new angle is greater than 360, or is less than 0.

    That's no problem with math prior to lerp. Set a variable (we call it 'm' here) to:

    m = (abs(new angle) % 360) * Sign(new angle) + 360[/code:3phpb3i2]
    
    then use lerp with:
    [code:3phpb3i2]lerp(sprite.angle, m % 360,x*timedelta)[/code:3phpb3i2]
    
    Whatever value 'new angle' has, it will be (mathematically correct) shifted to the range 0-360

    Thank you very much, ROJOhound! This was very helpful, incl. the links. I will give it a serious try now

  • Thanks Lucid, I understand it, just don't think it will be useful for anything. Things like health bars are already easy to do with variables, just subtract/add.

    If you can't see lerp being useful for anything, then you did not understand it. Just a very simple example:

    lerp.cap

    (click and drag the blue sprites)

    Now recreate this without lerp. It's possible, but needs more effort. And this is just a very simple example.

  • Just calculate the positions exactly as you did for the array.

    Replace

    (int(Random(2150)/48)*48, int(Random(12762)/48)*48)

    with

    (int(Random(2150)/32)*32 + 16, int(Random(12762)/32)*32 + 16)

    That should do it.

    btw, I'm experiencing problems with the platform behavior. Framerate drops down to 20-30 fps.

    lucid, thanks for that. Now it sounds a lot more like Real Studio (that I'm used to). Maybe I should ignore the unpleasant feeling of being overwhelmed and give it another try.

    Here's one question to all who already work on plugins, and please don't be annoyed.

    I saw the thread, where it is explained that you need something for VS Express in order to work on plugins. But I really don't get it. There's something like a 600 MB download, but then again you only need certain parts of it. I don't even know, what functionality it has. And where to install them and how to integrate them, so VS Express knows about it? Isn't there an easier way?

    Yes it is kind of offtopic, so maybe someone can answer by pm?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    This is one of the moments where I regret, that I never got used to C++. I have programming skills, the will to solve problems and a long experience with (oop)BASIC and several script tools. But whenever I try C++, I see all that overhead. VS Express is so bloated. It takes so long to start, there are so many files to create and I always wonder, what that editor expects from me. Compared to something like Real Studio or just Notepad to start Python, it just discourages me.

    I really hope there will be dozens of C++-skilled people interested in further development of 0.x

    I really do

  • If you feel more comfortable by reading the following, you could also consider using Python:

    # creating a game object reference (that will run at start of layout)
    class GameObject(object):
        def __init__(self, item=None, type=None, name=None):
            self.reference = {}
            if item != None:
                self.reference['Type'] = type
                self.reference['Name'] = name
                copy_from_item(item)
    
        def copy_from_item(self, item):
            self.reference['X'] = item.X
            self.reference['Y'] = item.Y
            self.reference['W'] = item.Width
            self.reference['H'] = item.Height
            self.reference['Angle'] = item.Angle
    
        def add_pv(self, pv_title, pv_value):
            self.reference[pv_title] = pv_value
    
    #calling a game object reference (most likely a separate script somewhere in the events)
    myCoolRef = GameObject(Sprite, 'Sprite', 'Bullet')
    myCoolRef.add_pv('will_spawn', 'SmokeTrail')
    myCoolRef.add_pv('Lifespan', int(Editbox.Text))
    [/code:1d5w813b]
    
    EDIT: But I really think, 's' would be the better choice for this particular task, simply because it was made for something like that. Saving the informations is just a matter of one order (whereas in Python you would need to create your own writing routines) and the spatial info shortcut is also neat.
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