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

Topics - Sakspapir

#1
Hi guys,

In my game, one of the rooms is a lot larger than the Camera Size, so that when the player moves around (Camera.AutoTracking == true) then the camera follows the player.

When the playe moves "up" in the room, the camera still follows, but the camera is positioned in a way that the player is always at the top of the screen.

What I want to do is to make the camera follow the player (as it does) but the player should be positioned "lower" on the screen.


I've tried to put the following code in the room's "Room_RepExec()"-function:

Code: ags
Game.Camera.SetAt(cPlayer.x - 300, cPlayer.y - 200);

This kind of works, but there is a "shaking" in the picture. Im assuming there is an issue with the order of which the drawing functions are called.

Need help, and thanks in advance!
#2
Hi guys,

I have created an object that is simply a loose thread from table cloth. This thread is only one pixel thick (the game is very low res) and its bending and turning.

In this game, the mouse changes to interact mode whenever it is hovering above an object, hotspot or character. Otherwise it changes to walkto mode.

The thing is that when the mouse is hovering above it, the mouse cursor needs to be exactly on top of one of the thread's pixels for the Interact-mode to be activated. This makes the UX pretty bad, because there is much flickering between walkto- and interact mouse cursors.

Is there a good way to solve this? Ive thought of the following:

1) Create a hotspot on top of the thread object (and make it rectangular) and then set the objects Clickable property to false. Then the mouse cursor would change according to the hotspot instead of the object.

2) Create the thread graphic with highly transparent pixels where there are no thread-pixels. I really don't like this idea, though.

What im really hoping for, is some smart way of customizing the "hitbox" of the object, instead of it being defined by its pixels. Does anyone know of a good way to solve this?

Thanks in advance!
#3
I'm wondering how reliable the above mentioned function is.

I want to start playing a conversational audio clip and continuously (for every game cycle) read AudioChannel.PositionMs to see how far the clip have played. Based on the return value, I will display subtitles using a gui label. The game is 60fps, so just to be clear: I know that each game cycle is approximately 16 ms. By checking if PositionMs returns an int that is larger than some predefined value, I would have precision no worse than 16ms, which is acceptable.

I'm using mp3 files for the audio.

Anyway, I just want to be sure that, for instance, reading a value of 5000 milliseconds from PositionMs always refers to exactly the same point in the mp3 file. otherwise there might be some accumulating offset between the subtitles and the voices, which is not good enough.

Thanks in advance!
SMF spam blocked by CleanTalk