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

#641
That would be great  (nod)

I mean, I haven't written any but I can contribute with the ones I bookmarked in the forums!
#642
Oh, other thing I noticed may be interesting to have a clear place to go are Tutorials, in the past there have been lots of useful ones that I only found by heavily searching - like a very useful one, I think by Calin Leafshade, about plug-in development. I learned things from it, but I found it by accident looking something else.  8-0 same case, can go on an existing place, but could have this in the description of some forum.
#643
Not sure how to proceed, but I would like a place to post tools developed by community members to support development of AGS games, two recent ones are tzachs translation editor, and my winsetup alternative agsconfig. In the past I saw some font editors. I don't remember if there are much to justify a forum of their own or if an already existing forum could open space for it.
#644
You rock AGA!
#645
I am getting the following message on top of the main website (not the forums)

Code: php

Deprecated: Function get_magic_quotes_runtime() is deprecated in /var/www/adventuregamestudio.co.uk/public_html/forums/SSI.php on line 30
#646
The sci-fi texturet are very very cool, I can see myself using them in game interfaces at some point. Amazing work Eric :)
#647
Thanks!

I have a small update to add in and need to throw a little explanation on how to mod it.

Also I discovered there's no way a character that walks really fast and have movement linked to animation can have a smooth scroll on the background AND not have the character blurred, so if anyone plans to use this, I recommend adding a check that if the level has a big scroll to change the movement type of the character (again, this is only a problem if the character walks really fast). Other alternative is a old-school Zelda like scrolling - just lerp rounding for camera sized grid.
#648
I added The function exists in script but calling it causes "function is undefined" error. to the manual FAQ on the wiki.
#649
just adding +1 on how to call a script function elsewhere.
#650
@Olleh19 the platformer here was just a small thing so it was faster to see the parallax effects happening than by just clicking to interact, so a really dedicated person can make a platformer with a much nicer code :]

Just adding minor bug fix that prevented actually turning the smooth scroll off before.

Edit: Small fix so that the parallax still happens even when smoothing is disabled.
#651


Because soon it's Christmas too! :]
#652
AGS Games in Production / Re: Future Flashback
Sat 26/10/2019 01:45:49
@Jojo_the_monkey I am currently not planning for a demo. I am building one, but I think in the end it will be part of the game itself and just it.

Below is an additional screenshot from the game to remind you guys we are still alive!  8-)

#653
The module is just for parallax and smooth camera, the platformer was just for fun to test it under quick movement situations :)

The game project is on GitHub, you can also download it as zip, if you want to play with the code, the platformer bits are all on room1.asc, and it's just around 100 lines of code (if I remember it correctly). It requires the latest 3.5.0 release available!

Erh, maybe the take here is figuring out a new module that would provide some facility for 2D platfomer, but I don't have anything figured out for this for now (except further developing AgsBox2D to support the full Box2D api, but still, details like grab ledge would be onto who is using it :/)
#654
rellax version 0.4.0

Get Latest Release rellax.scm | GitHub Repo | Demo Windows | Demo Linux | Download project .zip

Rellax while the camera tracks with cool parallax



This module uses the camera and Viewport API from Adventure Game Studio 3.5.0.

Demo game uses keyboard arrows control, up arrow jumps. WASD should also work.


Usage
Before starting, you must create the following Custom Properties in AGS Editor, for usage with Objects.
Just click on Properties [...] and on the Edit Custom Properties screen, click on Edit Schema ... button, and add the two properties below:

PxPos:
  • Name: PxPos
  • Description: Object's horizontal parallax
  • Type: Number
  • Default Value: 0

PyPos:
  • Name: PyPos
  • Description: Object's vertical parallax
  • Type: Number
  • Default Value: 0

The number defined on Px or Py will be divided by 100 and used to increase the scrolling.
An object with Px and Py 0 is scrolled normally, an object with Px and Py 100 will be fixed on the screen despite camera movement.
Objects with negative Px and Py are usually at the front, and positive values are usually at the back.


Script API

static attribute Character* TargetCharacter
The character being tracked by the Game.Camera.

static attribute bool EnableParallax
Gets/sets whether Parallax is on or off.

static attribute bool EnableSmoothCam
Gets/sets whether Smooth Camera tracking is on or off.

static attribute bool AutomaticallySetupOnRoomLoad
Gets/sets whether to automatically setup on room load. It defaults to yes (true).
Leave as this unless you really need it.

static void SetupRoomManually()
You should not call this, unless AutomaticallySetupOnRoomLoad is false.
Then call this at the end of your room_Load, after you are done setting things up.

static attribute bool AdjustCameraOnRoomLoad
Gets/sets whether to instantly adjust camera to target on room before fade in, when Smooth Camera is on. Default is true.

static attribute RellaxTweenEasingType EasingType
gets/sets the camera tween type to use when the character is stopped.

static attribute float TweenDuration
gets/sets the camera tween duration once the character is stopped.

static attribute int CameraOffsetX
Gets/sets the camera horizontal offset. It's applied without smoothing.

static attribute int CameraOffsetY
Gets/sets the camera vertical offset. It's applied without smoothing.

static attribute int CameraLookAheadX
Gets/sets the camera horizontal lookahead offset. This is an additional offset that is added in the direction the target character is facing (only 4 direction support now).

static attribute int CameraLookAheadY
Gets/sets the camera vertical lookahead offset. This is an additional offset that is added in the direction the target character is facing (only 4 direction support now).

static attribute int CameraLerpFactorX
Gets/sets the factor the camera should use when interpolating in the X axis.

static attribute int CameraLerpFactorY
Gets/sets the factor the camera should use when interpolating in the Y axis.

static attribute int CameraWindowWidth
Gets/sets the camera window width that is centered on the target lookahead point, when the target is outside of the window, the camera moves to keep it inside.

static attribute int CameraWindowHeight
Gets/sets the camera window height that is centered on the target lookahead point, when the target is outside of the window, the camera moves to keep it inside.


License
This module is created by eri0o is provided with MIT License, see LICENSE for more details.
The code on this module is based on the code of Smooth Scrolling + Parallax Module from Alasdair Beckett, which bases on code from Steve McCrea.
It uses easing code based on Edmundo Ruiz and Robert Penner's, works, which are MIT and BSD licensed, respectively (and included in the module script).
The demo game uses CC0 (Public Domain) art provided by jetrel.
#655
Controlz  0.3.1

controlz.scm | controlz_demo_windows.zip | controlz_demo_linux.tar.gz | GitHub repo

Move your character with keyboard or joystick controlz for Adventure Game Studio.



This code was originally made by Dualnames for Strangeland and I eri0o got his permission to open source and wrapped in this function to be easier for consumption.

Usage example

Call it on repeatedly execute, in your Global Script or in the script that you deal with player input, passing a character and some way to check for directional keys, once for each direction (down, left, right, up).

In the example below, WASD will be used to control the player character, and arrow keys will be used to control a second character named cEgo2. Since 0.3.0, solid characters collide with solid characters.

Code: ags
// called on every game cycle, except when the game is blocked
function repeatedly_execute() 
{
  Controlz(player, 
    IsKeyPressed(eKeyDownArrow),
    IsKeyPressed(eKeyLeftArrow), 
    IsKeyPressed(eKeyRightArrow),
    IsKeyPressed(eKeyUpArrow));

  Controlz(cEgo2, 
    IsKeyPressed(eKeyS),  IsKeyPressed(eKeyA), 
    IsKeyPressed(eKeyD),  IsKeyPressed(eKeyW));
}

script API

Controlz only has a single function

Controlz(Character* c, bool down, bool left, bool right, bool up)

Call it on your repeatedly execute or repeatedly execute always, passing a character and which keys are pressed at that time. If you need to control more characters, just call Controlz again, passing the new character and the buttons that are mapped to move it.

You can check for multiple keys or inputs too.

Code: ags
function repeatedly_execute() 
{
  Controlz(player, 
    IsKeyPressed(eKeyDownArrow) || IsKeyPressed(eKeyS),
    IsKeyPressed(eKeyLeftArrow) || IsKeyPressed(eKeyA), 
    IsKeyPressed(eKeyRightArrow) || IsKeyPressed(eKeyD),
    IsKeyPressed(eKeyUpArrow) || IsKeyPressed(eKeyW));
}

License

This code is licensed with MIT LICENSE.
#657
AGS Editor compiles to an intermediary "AGS Bytecode" (I don't know the actual name) and you can think on the AGS Engine as a "virtual machine" (like Java Virtual Machine or a videogame emulator) that reads the bytecode and makes it work in the machine it's being ran. You only need the Engine running in other hardware and system, once you get that, you can run the "AGS Bytecode" (again, don't know the actual name for it).
#658
Have you hit the 2k mark now Eric? Impressive work you have made!
#659
I noticed there is no way to invoke a ListBox.OnSelectionChanged event. Also it appears changing selection of a list box by code doesn't invoke ListBox.OnSelectionChanged.

I also noticed it's not possible to figure out if a Slider is vertical or horizontal. Apparently If Slider.Height < Slider.Width, it's horizontal. Sliders are also missing a way to check if sliderChanged
#660
My mind is totally blown by that answer.
SMF spam blocked by CleanTalk