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 - eri0o

#2681
Ah ok, since it's only on Debug build it's alright :]
#2682
So something like below?

Code: ags

int originalGraphic;
DynamicSprite * dyn_spr; 
 
void tintPortrait(Character * chr, int r, int g, int b, int s,  int l){
  ViewFrame * chr_vf = Game.GetViewFrame(chr.SpeechView, 0, 0);
  originalGraphic = chr_vf.Graphic;
  dyn_spr = DynamicSprite.CreateFromExistingSprite(originalGraphic, true);
  dyn_spr.Tint(r, g, b, s, l);
  chr_vf.Graphic = dyn_spr.Graphic;
}
 
void untintPortrait(Character * chr){
  ViewFrame * chr_vf = Game.GetViewFrame(chr.SpeechView, 0, 0);
  
  chr_vf.Graphic = originalGraphic;
  dyn_spr.Delete();
}


But now I need to track the original graphic since tint is definitive and clean the dyn_spr before exiting game to avoid warning logs. But since it's only at some very isolated points, it will be ok.
#2683
I need to tint a character portrait - single frame speech view, and no limp sync and no blinking.

I have thought about, but I am not sure how to do it. :(
#2684
Use CW Timer module when you need a timer. It's so much better then regular AGS Timer they should just come in every template.
#2685
Oh... 3D characters in 2D background like Alone in the Dark in a module? (nod)
#2686
Engine Development / Re: AGS engine Linux port
Wed 30/05/2018 01:05:19
wait, both snaps are work in progress! I think I wasn't clear when I wrote. I am currently having some trouble with lxd on my computer (which I need to snap wine in a reproducible manner), once I finish this, there will be a release (in Github->Release) and also on the snap store. But yes, it's the same as wine, the idea was just to make it easier to install. I just post work in progress with the hope that someone will find/solve the problem for me :-D.
#2687
Below is my little code to workaround if you are using Speech.SkipStyle=eSkipMouseTime; to allow skip dialog with the space bar.

Code: ags

bool acceptKeyWasPressed;

void repeatedly_execute_always(){
  if(IsKeyPressed(eKeySpace)){
    if(!acceptKeyWasPressed){
      Mouse.Click(eMouseLeft);  
    }
    acceptKeyWasPressed = true;
  } else {
    acceptKeyWasPressed = false;  
  }
}

Spoiler

---

I tried to follow the code but I still don't fully get how getch() from allegro or ags substitute standard c getch. I think that every key press passes through the record part of ags even if you are not recording, since record.h is everywhere and getch is redefined for rec_getch() in Engine/ac/record.cpp, and under it my_readkey() is called. And below it's how it generates the 399 code (defined as AGS_KEYCODE_ALT_TAB).

Code: c

int my_readkey() {
    int gott=readkey();
    int scancode = ((gott >> 8) & 0x00ff);

    if (gott == READKEY_CODE_ALT_TAB)
    {
        // Alt+Tab, it gets stuck down unless we do this
        return AGS_KEYCODE_ALT_TAB;
    }
...


readkey() is defined in allegro-4.4.2/src/keyboard.c, where it calls ureadkey(), that reads from a buffer, key_buffer. I don't understand how this buffer is filled. I don't understand how allegro-4.4.2/src/win/wkeybd.c comes into the mix. I have a feeling that alt+tab, since it is ignored by wkeybd.c function, but is considered in readkey, is somehow getting set as pressed, but the release event is lost, so in the boolean key array that marks if the key is pressed or not, it's kept marked true, which is pressed. My fix would be finding this array and everytime ags window receives focus (returning from alt+tab) all keys would get release. Unfortunately, I can't really understand this code so I don't know where the fix should be.
[close]
#2688
Hey AGA, I still can't post in the wiki.
#2689
Engine Development / Re: AGS engine Linux port
Fri 25/05/2018 23:11:09
until latest 3.4.0 the engine does run well under Wine. Since 3.4.1, the engine doesn't run well under Wine- sometimes it crashes and require you to kill it (you can use xkill) - but the Linux build should run. It's available in the release of the Editor. If you use Ubuntu, building either the latest stable engine or the sdl2 port (still in development) should be easy. I've been thinking about packaging it as snap, if you think it's useful, let me know.

Edit: I started by going after the editor first, once it works, I will give a shot at the engine. github repo for ags-editor snap here.

github repo for ags-engine snap here

all snaps are still in development, but once they are solved, people with Debian derivatives will be able to snap install ahs-editor and snap install ags .
#2690
Engine Development / Re: AGS engine Linux port
Fri 25/05/2018 18:18:29
CW is too fast.

Everything he said is true, but there is a catch, the default engine should run well windowed, independent of scalling.

So comes the question: which Linux distribution and version of the Engine did you test?
#2691
I have nothing to add except to point that DxDiag has the event below as reported error.

EventType: BEX

Indicates a buffer overflow (/GS) or DEP exception (BEX64 indicates a buffer overflow (/GS) or DEP exception on 64-bit versions of Windows)

DEP is related to data execution prevention.
#2692
You are using RoomScript, just to check one thing, are dialogs involved somehow here? They give weird priority issues.

Checking SECOND thing. I think a previous AGS had trouble with Switch cases. I always prefer if/else if/else pattern for clarity. Which version of AGS is this?

Finally, I kind got lost in the thread, was your problem solved?
#2693
1- you talk about TWO objects and repositioning, but your code only has ONE object.

2- instead of creating a variable to track state, just read back .Graphic property of the object and see if it's the open or closed graphic.
#2694
I think that should work, pretty sure I do that, but you could also create a view, assign to the object and animate forward or backwards.

I know in rare cases that a character doesn't update I solve by grabbing it's surface and drawing a transparent pixel in a transparent place and release the surface.
#2695
New 0.2.1 release | github repository

Windows build: agsjoy.dll (SDL2 edition) | SDL2.dll (you need to download this one too!)

Linux build: libagsjoy.so

MAC OSX build: libagsjoy.dylib

feature parity with Wyz plugin hasn't been reached yet.

Note:

  • For Windows Build your game using Wyz's .dll and then switch in the compiled game folder for this agsjoy.dll and SDL2.dll if you want to test it.
  • For Linux, just place libagsjoy.so in the same folder as the binary ags (if you are building the Engine yourself) or in Compiled/Linux/data/lib64 if you are using prebuilt Linux right from the Editor. SDL2 must either be installed through your package manager or the game should be loaded through Steam.
  • For MAC OSX I don't know yet, but it should be working. Requires SDL2 too.
#2696
Quote
The actual question is, whether it is convenient to have channel API on engine level, or leave it for script modules. In the latter case audio API should provide sufficient capabilities to create your own channel/mixer system.

That's really the question I think. In engine advanced features and a module on top to make things easier for begginers.

In my game I made two main modules, a SFXplayer and a MusicPlayer. Unfortunately, I have to deal with each clip type through the explorer since the types are read-only. Also the channels have to be defined through Editor instead of script, adding manual steps before being able to use the module.

But I think that's pretty much it, most of the confusion happens from the lack of a module.

About more advanced interfaces, like mixers, I love this idea, just want to point out that WebAudio API, has never been stable, breaks a lot, so I feel that make audio stuff is just VERY hard.
#2697
I didn't do anything, it was all CW, my part was mainly getting him annoyed. (laugh)
#2698
Just curious, what is AGS Archives? And why is it going offline?
#2699
Language codes like en, en-US, pt-BR, ... Look better, and possibly allow passing things like en in query and get en*.
#2700
I don't know how I didn't see this question.

My experience with the Android port was that isButtonDown only reports correctly once the finger is placed in the touchscreen, but then, even if the finger stays in the screen, it doesn't return true anymore - like it would when you do a mouse left click and hold. I saw that iOS Wadjet port does has this behavior - which gets rid of the mouse left click being thrown on finger hold.

This is because the Android port is designed for being able to play existing ags games, and not for making Android games.
SMF spam blocked by CleanTalk