Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - bx83

#541
Hey again
I'm, building my room with CW's last suggestion, no stutter :)

Just wondering, how do I get the room transition as instant, rather than fade out/fade in?
When I load this room, it fades in from black for about 500ms - how do I make it 0ms?

Checked setgameoption, no luck.
#542
Quote from: Slasher on Fri 09/03/2018 12:25:02
You could check out the Tween Module... It's easy to use once you get the hang of it..

Which function in Tween should I use?
#543
Quote from: Matti on Fri 09/03/2018 13:18:12
Normally you would just move the viewport to accomplish this. Did you try if that results in flickering?

Sounds good, how to I do that? What function? Should I have the background as the tall credit's background and move the viewport down?
#544
I want to move a large image (1024x7068) from top-to-bottom, on a 1024x768 room screen. This is for the credits.
Can I do it without flicker/jaggedness?
Can I do it *at all*, or should I find a module?
#545
Lesson learned ;P
The code now works without gaps or catchup, flawlessly, done :D
#546
Because I want to keep the songPos updating, so it's in sync with the song; guess I didn't have to :/
Sorry, I find this music business so confusing.
#547
I'm using it because there's always a bit of lag between the songs.

I use fadeout/fadein for room transitions.

I have 2 tracks, completely identical in length and content, but one is 'muted' (like being played on a radio). Track 1 for 'beach', muted track 2 for 'cave'.
I switch between the tracks, but at the same time, so hopefullly it's floorless.

I do music-switching in room_Load; perhaps I should change the track, *then* go to the new room? Just a thought; it currently looks like:

Code: ags

Room 'beach':
function room_Load () {
     songchan=aSong.PlayFrom(songPos, etc etc);
}

function room_RepExec () {
    songPos=songchan.Position;
}


...same in room 'cave'; atm I've been using:

Code: ags

function room_RepExec () {
    songPos=songchan.Position+1100;
}


to get them more in-sync.

Should I do this before I change room?

Code: ags

function leave_left
{
    songchan=songMuted.PlayFrom(songPos, ...);
    cChar.Changeroom(2,100,100);
}


???
#548
Extremedly useful advice.

Does anyone know if there's a way to arbitraily time in seconds/milleconds during runtime?
If I wanted to measure the amount of time between room_Load's and room_AfterFadeIn? There's no way of getting a loop or arbitrary timer, but somehow..?
#549
SOLVED.

It was because I was switching between OGG's and WAV's; or, I had both running in channels. Case closed, all works well :)

If anyone didn't know this (and I'm sure most of you did, but whatevs) - it's risky running songs of a different file type... ever :)
#550
AHA!

The beachThemePos, which is being updated on music_chan's position, is NOT being updated in the latest version; it's always 0, no matter what.
However, the code is exactly the same.
The problem then is in the Audio section on the right hand menu, as this is the only thing I've changed in the last week; or, god knows :/
#551
I also tried getting rid of all sounds, and finding out if music would play on sounds_chan (with MaxChannels=1) would play then - nope, total silence.
#552
Changed it to 2 - same deal.
Copied and pasted room 2 (beach) and room 7 (cave) from the working archived one - same problem.
Very very odd.
#553
I replaced SOUNDS and MUSIC with sounds_chan and music_chan, thinking that the capital letters might have thrown them off.
They didn't; all previous errors are the same, and happening the same way.

Also tried deleting everything AudioCache; and comparing to an earlier version where sound worked. Made it extactly the same; no dice.

I know this is an obvious one (or a bug, in which I case I have no idea what I'll do), but I can't see it.
#554
Another interesting thing:

When I do this, music and sound player:
Code: ags

function room_FirstLoad() {
...
SOUNDS=aOcean_crash.PlayFrom(oceanThemePos, eAudioPriorityNormal, eRepeat);
//Display("ocean channel %d",SOUNDS.ID);
MUSIC=a1_beachTheme_5_0.PlayFrom(beachThemePos, eAudioPriorityNormal, eRepeat);
//Display("beach channel %d",MUSIC.ID);


...and this, it doesn't play:
Code: ags

function room_FirstLoad() {
...
SOUNDS=aOcean_crash.PlayFrom(oceanThemePos, eAudioPriorityNormal, eRepeat);
Display("ocean channel %d",SOUNDS.ID);
MUSIC=a1_beachTheme_5_0.PlayFrom(beachThemePos, eAudioPriorityNormal, eRepeat);
Display("beach channel %d",MUSIC.ID);


WTF guys.
#555
Been playing with sound (again...) and this time, it's completely stuffed.
Everything was working.

BEACH room:
Code: ags

function room_FirstLoad()
{
    SetGameOption(OPT_CROSSFADEMUSIC, 2);
}

function room_Load()
{
...
    SOUNDS=aOcean_crash.PlayFrom(oceanThemePos, eAudioPriorityNormal, eRepeat);
    MUSIC=a1_beachTheme_5_0.PlayFrom(beachThemePos, eAudioPriorityNormal, eRepeat);
...
}

function room_RepExec()
{
...
    beachThemePos=MUSIC.Position+1100;
    oceanThemePos=SOUNDS.Position;
...
}


CAVE room (to the left of BEACH room)
Code: ags

function room_Load()
{
...
    if (cJulius.PreviousRoom == BEACH) {
        MUSIC=a1_beachTheme_5_0_CAVE.PlayFrom(beachThemePos, eAudioPriorityNormal, eRepeat);
    } 
	
    if (SOUNDS.PlayingClip!=aWater_dripping) {
        SOUNDS=aWater_dripping.Play(eAudioPriorityNormal, eRepeat);
    }
}

function room_RepExec()
{
beachThemePos=MUSIC.Position+1100;
...
}


...but assignments to MUSIC channel just... don't come on - at this time, or anytime after that.

What happens:
The music stops (doesn't fade out to silence) forever.

What's supposed to happen:
The track from the previous room fades out, and this new one fades in on assignment (eg. MUSIC=aMusic.Play)

What's going on?
-Is it due to order of functions? (I thought it was: FirstLoad -> Load -> AfterFadein)?
-Is it due to me not deleting the AudioCache directory and starting again?
-Is it due to a bug or should I reload the editor?
#556
Okay, I'm elucidated.
PS sorry, was complex to me :p
#557
Basically, do I have to invoke Inventory* or somesuch thing?
#558
I'd like to write something like this:

Code: ags

if (cCharacter.HasInventory(iItem) && this item we've been talking about is iItem and iItem.Graphic==123) {
...


If I just say this, the second part of the expression is not necessarily associated with a item actually in your inventory -- in fact, does it just mean 'the graphic of the general item', and not the one you may/may not have?

Confused :/
#559
...and it was complaining about a Speech file that was too long, nothing to do with Sounds :P

I'll leave this here if anyone is as stupid as me and needs a tip ;)
#560
...also, to add insult to injury, half the sound files are stuff like:
F:\Game\Sounds\Lighting Match-SoundBible.com-329028361.ogg

...Which is well over 12char. Don't know :(
SMF spam blocked by CleanTalk