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

#21
Quote from: eri0o on Tue 15/09/2020 00:11:18
Hey Olleh19, I still need to figure out Flugerdufel problem. I use this module in my game, like my main use case is myself, which means if the problem doesn't affect me I tend to postpone solving - most from simply lack of time.

So you need to set the target character, basically the variable player points to a character, say cBob, when you assign player as target character, Rellax.TargetCharacter = player, you are actually assigning Rellax.TargetCharacter = cBob. Let's say now you change the player to cAlice, cAlice.SetAsPlayer(), NOW the player pointer will point to cAlice. But you have previously assigned the TargetCharacter as cBob. So you need to actually do something like this when changing player character:

Code: ags
cAlice.SetAsPlayer();
Rellax.TargetCharacter = player;


About parallax scrolling being stuttery it will depend on many things so I can't comment. I recommending using SetGameSpeed(60). Basically the parallax is an illusion and the math is made simple, the object posx/posy (X position, Y position) is increased/decreased (divided by 100, this way I mentally think in percentages) an additional amount when the camera scrolls. The code is simple enough to be posted below, I find it easy to follow. The pxo are the room objects, the variable naming is stolen from Ali's module.

Code: ags
void doObjectParallax(){
  int camx = _final_cam_x;
  int camy = _final_cam_y;

  for(int i=0; i<_pxo_count; i++){
    float parallax_x = IntToFloat(_pxo[i].GetProperty("PxPos"))/100.0;
    float parallax_y = IntToFloat(_pxo[i].GetProperty("PyPos"))/100.0;

    _pxo[i].X=_pxoOriginX[i]+FloatToInt(IntToFloat(camx)*parallax_x);
    _pxo[i].Y=_pxoOriginY[i]+FloatToInt(IntToFloat(camy)*parallax_y);
  }
}


So you set the room objects custom properties, and then you basically only use Rellax.EnableParallax = true on Room Load and you are done.

Thanks for your reply! I've used setplayer a lot of course, can't believe i didn't try that one! (doh!!). (laugh)
I'll play around with gamespeed aswell, thanks and once again keep working on it. I think it could be really cool if in the future it was inside the thumbleweed template. Since it's missing the parall feature.  :)

Edit: Rellax was it, now i'm making it look way better turns out all i needed was CameraLookaheadX and a minus value!

#22
Hey eri0o!

Just tried it in my upcoming game, and some issues occured.. And here is what happens if you try to use this module in a game sorta like Day of the Tentacle or Thimbleweed Park where you have different playable characters. The Parallax does not seem to recognise the character change, so the parallax effect gets stuck. Maybe it's just me, that don't understand how to do it, but just maybe you could do some kind of check for what player character is active, so the parallax follows that specific player.

Obviously since i've played Thimbleweed Park lately i was excited to try parallax scrolling, however when running in the Thumbleweed Template, the player gets transported back in the picture when running to the sides, so it looks funny. (laugh). Also the Parallax scrolling is stuttery looking, maybe that could be solved if i understood how to change the speed of the parallax, i'm not sure (Not using any objects, just followed the intro post's posy, posx in properties).

Btw, is there a manual of it somewhere? The syntax you wrote in the intro post, i just don't get how to use those in the scripts, it's way over my head, so examples would be great. I've tried several ways that i thought might would work, but to no success. However i did follow the instructions

Thanks, and i hope you deicide to keep working on this, tho it is a really cool feature for usage in AGS games  :)

#23
AGS Games in Production / Re: Future Flashback
Wed 30/10/2019 23:50:49
How is this project coming along, is it following the schedule release? I'm looking for a new retro/cyberpunkish adventure game to play.  (laugh)
#24
Thanks eri0o, that module will probably come in handy once i start exporting various art groups separated from Photoshop! :) I've always wanted to see how a "plattformer" is made in AGS also, i know there's another plattformer done by abstauber. It didn't work in Ags 4.3.1 tho :-\ parallax scrolling is really cool too indeed.  (nod). Looks like i have to get the latest AGS, will do! 8-)
SMF spam blocked by CleanTalk