Inform me!

New releases and general discussions.

Post » Thu Apr 29, 2010 8:43 pm

Could you give some more directions on how to get the error? The only time it does not update the tens position is when I go over 08/08 in the time signature. That would be almost on track, if there is only one note per measure.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Fri Apr 30, 2010 3:13 pm

[quote="newt":db805902]Could you give some more directions on how to get the error? The only time it does not update the tens position is when I go over 08/08 in the time signature. That would be almost on track, if there is only one note per measure.[/quote:db805902]
You should have had the error already. To clear it: The position display is 1 based, as long as you never see "00" or "000" it means there is no problem. The error is not updating the frames at all, they stay at their default frames (which is frame 1, "0"). And that wouldn't surprise me, it proofs once more the randomness I'm talking about. Would you do me a favor and switch every delayed function call of the tempo display to normal calls and see if it works correctly?
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat May 01, 2010 5:54 pm

No change, but as far as I can tell it seems to work. I mean the frames change as long as I don't go over 08/08. Also I don't know that would have changed anything anyways. It was set to call the function after timedelta, and that can be way sooner than 10 ms.
Sorry tulamide, but it looks to me that function is working correctly, and the only conclusion I have is that something is messed up in the conversion.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sat May 01, 2010 11:01 pm

[quote="newt":2beg2b8p]No change, but as far as I can tell it seems to work. I mean the frames change as long as I don't go over 08/08. Also I don't know that would have changed anything anyways. It was set to call the function after timedelta, and that can be way sooner than 10 ms.
Sorry tulamide, but it looks to me that function is working correctly, and the only conclusion I have is that something is messed up in the conversion.[/quote:2beg2b8p]
I think you don't see the real problem here. See my previous posts.
1) Of course it was set to call after timedelta, because that made the function (better said: updating the sprites) work again. Directly calling it didn't work (and does still not on my computer). So you proofed that it sometimes works (on your computer for example) and sometimes not. And there is no feedback if the sprites are not updated. That leads to
2) It's not the function itself that isn't working. It's just updating the sprite's frames that does not work. I wrote in a previous post that I can output the values of the function to text boxes. That works absolutely correct (incl. the values)
3) The 10 ms are not of interest, because the function calls are independent from the music sytem. I can call updating the sprite's frames as often as I like, they should show the current value, whatever it is at that point of time.
4) The sprite's frames are also updated above 8/8, you just don't see a difference. The reason is the system behind the presentation of the values. The time signature describes how many beats of what note value are in each measure. The first value tells the number of beats, the second the note value. 4/4 means four quarter notes, 6/8 six eighth notes, etc. The length of an eighths note equals the length of 2 sixteenth notes, the length of a quarter note equals the length of 2 eighth notes etc. So a beat with a note value of quarter may contain 4 sixteenth notes, whereas a beat with the note value sixteenth only contains 1 sixteenth. The position display shows (from left to right) Bar (or measure), Beat and Sixteenth. 1.1.1 means first bar, first beat, first sixteenth. 4.2.3 means fourth bar, second beat, third sixteenth. Now, when setting something like 10/16 for the time signature, the position display would go 1.1.1, 1.2.1, 1.3.1 ... 1.10.1, 2.1.1, 2.2.1 etc, because there only is one sixteenth position in the beat. That's why it stays at one. The error on the other hand does not sometimes not update the frame, but never. Never. The display then always shows "00" no matter what.

We won't solve this I'm afraid, but I appreciate your help. It was very kind and helped me seeing that the error has a kind of random nature, it seems to be associated to the hardware the app is run on or a special subversion of DirectX.

Thank you very much newt :)
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Aug 14, 2010 2:46 pm

I may have run into a similar kind of error as yours using functions.

I worked around it using what is probably a dirty trick, but it works beautifully. Instead of calling the function directly, I have a global (or holder sprite) variable set and then use that to trigger a new function next tick. My problem was with Selected Object Lists causing hassles. It wasn't something that could be fixed with "Forget objects", and I can't remember exactly why now, only that it worked. :p

SomeEvent: Action: Do stuff, set global variable Schedule_SomeFunction=1

Always
Schedule_SomeFunction=1: Call Function "SomeFunction"; Set Schedule_SomeFunction=0

Alternatively, a variable holder sprite/box can handle all the private variables and won't clog up your app/game with globals.
B
2
G
2
Posts: 42
Reputation: 734

Post » Sat Aug 14, 2010 3:18 pm

this kind of thing happens when you try doing alot of save load stuff with the image manipulator.

i had to make my events run one tick after another for the loading of custom gfx in mega thumb, or else it just wouldnt work. i know the frustration of not knowing whats going on like this ughh!
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Aug 14, 2010 3:33 pm

Well, I did delay the function calls but this only worked for a part of the displays, not all. But I never thought about delaying it "externally" so to say, although this is almost exactly what I did in my Auto Zoom Engine, for accessing PVs of newly created sprites.

So thank you Squish for posting that. I will definitely try this asap.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Sat Aug 14, 2010 4:00 pm

yea i went about fixing the imagmanip problems the same way, doing the saving and loading on different ticks by adding 1 to a pv and using "equal to X" running a diff set of actions each tick
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Aug 14, 2010 4:36 pm

[quote="QuaziGNRLnose":2j7354vu]yea i went about fixing the imagmanip problems the same way, doing the saving and loading on different ticks by adding 1 to a pv and using "equal to X" running a diff set of actions each tick[/quote:2j7354vu]

Yeah, image manipulator's got to read from the video card. Another way around this is to create an internal version of the image using an array.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Previous

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 2 guests