tulamide's Recent Forum Activity

  • Just saw that you linked to your cap (hint: yellow on white = unreadable ;) )

    Didn't want to dl it at first, cause I hate those "wait x seconds before dl"-sites, but could convince myself to do so.

    A first look revealed why you have problems. You are demanding too much. Quick example:

    You order to loop with 360 iterations per tick for every key that is down. That's 720 iterations per tick, if two (e.g. left and up) are down. These loops create up to 1440 (!!) sight instances and you order each one of these 1440 instances to check against 623 OtherObjects instances. That's 897120 checks per tick. I think, that's no reason to complain, but more a reason to praise CC for its speed :D

    If I knew what you really intend to do, I'd propose something. But I'm not sure. Do you want to reveal more of the scene, as the player approaches the walls? But why are then instances placed over other instances drawing the same graphic at the same spot 2 times?

  • I think there's something wrong. You might think too complicated, or you made an error in the events or whatever else. Of course, you have to optimize things, the more objects you need to control per tick. But in general, those behaviors aren't that slow.

    For example, this (admitted, very simple) cap hosts a player, some obstacles and 200 opponents, and the opponents try to chase the player sprite while they "see" it, and immediatly stop, as they don't "see" it.

    This runs with over 400 fps on an on-board-graphic chip, so I expect this to run at a few thousands on a middle class card.

    http://www.mediafire.com/file/mjdgo9y7l93ovnl/LOSspeedtest.cap

  • You've put 'x' there, because you need a factor to reach the right cap.

    Your formula would output 9821 (99^2 = 9801 + baseHP = 20) for level 99, but TL22 wants 999 as the max value. To reach 999, the factor 'x' would need to be (rounded) 0.0998877665544332211, that's calculated by 979 / 9801

    This by the way is a parabola, the image looks more like a quarter circle.

    With a parabola, the value increase per step will be higher and higher, while level increases.

    With a quarter circle, the increase will be flatter towards beginning and end, and steeper towards the middle.

  • a random rate:

    + Every random(3001) + 1000 milliseconds

    -> drop

    (drop at a random rate between 1 to 4 seconds)

    to change the size of the hair create several frames of the hair from short to long, and set the animation frame according to the collisions.

  • This is not the way you should use an ini-file. An array is more suitable for a 2-dimensional grid form like this one.

    Even worse, you are not loading the ini-data to RAM, but constantly read from the file. You force the file to be read at least 11 times per iteration. With 100x100 positions that's 110000 file accesses in just 36 seconds. It's not slow, it is pretty fast :D

    A better way to use the ini-file would be to not orient to the grid, but make groups of object types (and give the items the x/y values):

    [lights]

    L1=2,3

    L2=25,9

    [cages]

    C1=13,36

    C2=14,52

    etc.

    You'd then, instead of those x/y loops, access the ini-file with:

    + For each item in group "lights"

    ->Create object tile_light on layer "Tiles" at (GetToken(INI.CurrentItem, 1, ",")* whatever, GetToken(INI.CurrentItem, 2, ",") * whatever)

    Add this for every type of object and you're done. this would only access the file once for every item and therefore will be a lot faster than your way.

    But if you for whatever reason want to stick to the grid method, then use an array. Arrays will be loaded to RAM, so multiple access to it will be much, much faster.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Even if it was, It kills the frame-rate.

    This has been answered just a few weeks ago. There is a bug in the LOS behavior regarding objects with instances. The workaround is to use a family instead of the object itself (Just put the object into its own family).

  • Now this is fascinating:

    Two musicians of the band "After the burial" created a formula to set the decimals of pi to music. Read the description, where they explain how it was done.

    In the video you will first hear a guitar intro for about 1 minute, starting roughly at 1:07 you will hear the first 110 (!!) decimal points of pi.

    I admit, if you were never involved much in music, it might be difficult to hear the structure, but every musician will be fascinated by a never repeating sound pattern with its very own feel and rythmic evolution.

    Subscribe to Construct videos now
  • Dont know if you should use that when there is a new plugin:

    http://www.scirra.com/forum/plugin-audiere-sound_topic42873.htmlThere is another sound plugin. That's all. It doesn't mean, it is better, it doesn't mean, XAudio2 shouldn't be used. In fact, XAudio2 is the (robust) standard plug for audio, shipped with CC, while Audiere is just a second alternative. Both have advantages and disadvantages (e.g. Audiere does not guarantee to play mp3 on all systems and lacks a few important features, while XAudio2 doesn't support mp3 for sound channels and is more technically oriented and therefore might seem harder to work with, when you don't know much about the concept of sound channels)

    I am having a frustrating time understanding how to use the XAudio object "correctly" in a few instances.

    Essentially, at the start of each layout I am loading all sound effects and background audio into memory. At the start of each layout the background music functions fine until another sound effect is triggered. Once this happens there is a slight change in volume with the BG music. Also the background music seems to be effected by each trigger of a sound effect in that it acts like it is making a quick skip sound for just a few milliseconds.

    If I use the "Play Music from a file" event everything functions as it should.

    I can't seem to find much information on how to use the XAudio object correctly. Is it recommended to use the "Play Music from a file" event to handle background music for individual layouts or am I just doing something wrong when using events?

    Any help at all is highly appreciated! ;)

    Make sure to read the wiki. Here is a link to the XAudio2 page.

    If you use a sound channel to play background music, make sure nothing interrupts or changes that channel by reserving it. (See actions under sound).

    It is indeed the better way to play music with the music actions. This allows you to better differentiate between sound and music. Also there are two independent engines used for sounds and music, sounds using XAudio2 (part of DirectX), music using the same engine as Windows Media Player. So they both don't interfere with each other. The music section doesn't use the channel concept (there is only one channel, so to say), so there's no need to reserve anything.

  • hehe, no cloak, no long brey beard (goatie^^) :D

  • I know I might soon be called "grampa mod", but modulo is a perfect function to use here.

    modulo returns the remains of the division of two numbers. If you divide a number by 2, and the number is even, it will have a remain of 0 (4/2 = 2, 5/2 = 2 remain 1)

    if n % 2 = 0

    -> number is even, do what you want to do to even numbered instances.

    EDIT:

    btw, this will also allow you to do much more versatile things. Set it to 3 instead of 2 to only change every third instance (3 % 3 = 0, 4 % 3 = 1, 5 % 3 = 2, 6 % 3 = 0, etc). Works with any other number as well, of course.

  • I don't see where this would be possible, unless you explicitly extend the collision options in general by extending collisions.cpp

    It seems that collision detections are not object oriented, but method oriented.

    Or you force your object to switch to no collision and handle collisions in on_frame, but I don't see how to take care of putting it to the sol if a collision condition is in use from events?

    Sorry for being so vague. It's not my terrain^^

  • I tried to replicate this in CC with the following:

    + System: Is global variable 'switch' Equal to 1
    -> Text: Set text to "1"
    
    + System: Is global variable 'switch' Equal to 2
    -> System: Set global variable 'switch' to 1
    -> Text2: Set text to "2"
    -> System: Set global variable 'switch' to 2
    
    + Button: On Button clicked
    -> System: Add 1 to global variable 'switch'
    -> Text: Set text to ""
    -> Text2: Set text to ""
    

    It works as it should. With 'switch' = 0 both textboxes are empty, with 'switch' = 1 the first one is filled, and with 'switch' = 2 the second one is filled.

    It may be .84 or a special case (e.g. if you are using the function object. Functions are aside of the order of events)

    Other than that I'm clueless.

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