Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Messages - Crimson Wizard

Pages: [1] 2 3 ... 440
1
Only for the reference, I'd rather recommend to do this slightly differently:

1) Instead of relying on regions you could check player's Y coordinate in "repeatedly execute" function and change backgrounds depending on the player.y value (of course different rooms may have different rules regarding this).

2) Idk if you want to have this DOF effect in every room, but if yes then it may be more optimal to modify backgrounds dynamically (repaint pixels right during the game) using some algorithm. This of course would require searching for a blurring algorithm and converting one to AGS script. But in return you don't need to have multiple versions of same background, and may have smoother transitions (especially combines with the p1).

2
I'm curious, what did you save the image as that you imported as your background?

AGS brings everything to same format (BMP) during the import. If this was related to format then imho the error would occur in the editor rather than the game itself.

PS. we talked in PM about Lord Ed sending me a game source, and I am currently waiting...

3
I would do that, but it is just a test... I'm ashamed :( It is not a game...

That really does not matter. We are not here to judge your game, we are trying to diagnose the problem and it is as hard to do without seeing actual code as to diagnose illness without seeing actual person.

If you look around this forum you will see people posting all kinds of random code all the time, some of which is just made for experiment.

4
I may be missing the line/function but is there a way to change the color of a listbox (for the selected and the non selected) during run-time. If not, and sorry to ask, but you think it'd be too complicated to implement, it's okay if it is, I'll work around it, just wondering.

Following was implemented in 3.5.0:
ListBox.SelectedBackColor
ListBox.SelectedTextColor
ListBox.TextColor.

Full list of script additions is under "Script API" section in the first post.

PS. You must have either v3.5.0 or "Highest" set in the "Script API version" option of the General Settings.

5
I've already made a suggestion: create an empty room, put one object and try single command with eNoBlock there.

Also, please, show us your actual code.

For instances, I tried interacting with a NPC and told him to walk. He does so, but only if the eNoBlock is not chosen. Otherwise he blinks on the last position and then returns to the starting position...

This sounds like there's some other code that overrides NPCs behavior. If you still have that moving between 4 points in RepExec that could explain these weird things. RepExec is still run during any NoBlock commands.

6
Are you moving and animating SAME character (or object) or different ones? If these are different then normally there should not be any problem. If they are the same, some actions in AGS may override each other so you need to know how to deal with that.

Can you show your full room script?

Like I mentioned before, my recommendation is to solve one problem at a time. That is: make a new room, put 1 object there and make it animate. After you succeed in that continue adding more things. This way at least we may be sure that things are not messed up because of some unaccounted code.

7
Let's focus at one problem at a time and only move further after we solve that one.

Objects only exist in rooms. This is why they are created and edited in the Room editor. They are not shown in the project tree for example.

The creation of an object is demonstrated at 1:25 in the video you linked above.

8
Engine Development / Re: Parser cleanup
« on: 15 Jan 2019, 00:03 »
Yes it is one.

By the way, I don't know if you found that earlier, but you may see how built-in API is declared in this file:
https://github.com/adventuregamestudio/ags/blob/master/Editor/AGS.Editor/Resources/agsdefns.sh

This script is embedded as resource into Editor's binary and prepended to user scripts before compilation.

9
Engine Development / Re: Parser cleanup
« on: 14 Jan 2019, 20:56 »
Hello!

There was little "hiccup" with Alan deleting "ags4" branch in our repository :), and your pull request was automatically closed.
In our repository "ags4" is merged into "master" branch now, which is the branch for AGS4 development, although it's not really being developed much yet. We were mostly working in "ags3" branch for the last 6 months, with what could be the last big 3.* release. But all of its contents are merged to master too.

I asked following on the github as well: please create a new feature branch based on top of our latest master and put only your related commits there. This way there will be proper pull request without unnecessary commits from the older history.

Now I am unsure how to proceed.

Well, depends on what are your intentions. Usually we recommend having one PR per task. If your first aim was to refactor and enhance the code (not adding/removing any functionality) that would be first pull request that needs to be checked and fixed if necessary to keep everything in working state when new code is merged.

Meanwhile you may ofcourse proceed with other changes, creating another feature branch (this is also why making separate branches per task is beneficial).


Also, as far as I know, you can call predefined properties in AGS code, but you can't define your own properties in AGS code -- so I can't write self-contained googletests that check property parsing code.

If by "properties" you mean ones declared with attribute keyword (e.g. Object.X), user may create these. Unfortunately they were never properly documented in the manual, but there's this wiki topic for the reference: https://www.adventuregamestudio.co.uk/wiki/Keyword:_attribute


I cannot answer your other questions yet, but I'll try to find time and investigate.

10
Hey, similar problem is being discussed regularily on the forum, usually people ask how to make a patrolling character (walking between 2 or more points). Even if this is not exactly what you need, you may still use this as an example:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=40122.msg528994#msg528994

11
Advanced Technical Forum / Re: Error When Game Is Run
« on: 14 Jan 2019, 01:09 »
I was adding a new room background and then I ran the game and this happened. I have no scripts written, just a custom sprite and background. I also have only one room and one main starting character.

The error is strange, I can't imagine how this may occur in practice.
Since this is just a new game you've started, could you send me the game project files? That would be fastest way to diagnose the problem.

12
Advanced Technical Forum / Re: Error When Game Is Run
« on: 13 Jan 2019, 21:41 »
Did this happen just all out of the sudden, or you were adding some content to your game when this happened?
Could you remember the last thing you did (like adding objects to the room or writing script)?

Will it work if you start in another room?

13
Yes, it's game.following_room_timer in script, but has different name in the engine.

I think it's in game ticks.

14
Yes, this is expected behavior.

There is also this:
Code: Adventure Game Studio
  1. // delay before moving following characters into new room
  2. game.follow_change_room_timer
  3.  

15
Well, one thing I am noticing is that you don't get rid of the DynamicSprite before creating a new one, which will lead to memory leaks.

It really should not, managed objects are reference counted, so they all got deleted automatically as soon as the number of references reaches zero.

16
Well, I am clueless at this point. If this was a constant behavior I would think there is definitely a bug, but since as you say it started after anti virus quarantine, this is something messed up.
In the past there were certain bugs in wip version (I think it was 3.4.1's beta) when it could not find some resources in game, but all of these were fixed eventually.

I wonder, could you send me your game project to look into this? At the same time we'll know if it something wrong with this version of AGS in general or happens only in your enviroment (as a blind guess - antivirus is blocking some AGS features, regardless of how crazy this sounds).

17
Okay I ran a quick test to duplicate problem, I took a piece of music and set it to "ambient" and InGameEXE with your check and got "Sound playback not started" in the compiled game.

Question: what if you test separately a clip that is not of type "ambient" but is added to GameEXE, and a clip that is not added to GameEXE but is ambient, which will work (or not)?
Another question: is there a difference if you run game from the editor or directly from Compiled/Windows folder?


But it looks like for some reason either editor cannot compile the clips into game data, or game cannot read it when it's attached to exe.


18
I'm not sure what you mean by calling Play() for the non-working ambient sounds, or how to check the Audio Channel?

When you do aSomeSound.Play() it returns a pointer to AudioChannel. What I was asking is whether it returns valid channel (meaning engine at least trying to play it), or null pointer, which means it could not even start or load the clip.

Code: Adventure Game Studio
  1. AudioChannel *chan = aAmbientSound.Play();
  2. if (chan != null)
  3.     Display("Sound playback started");
  4. else
  5.     Display("Sound playback not started");
  6.  

19
So, I was able to reproduce this, and it does not look very good. It occurs in release build of the engine but not in debug one, and when in release build it fails in clib function realloc, which in summary means there's some memory corruption.

Then I tried running same scene with the latest 3.5.0.5 engine it did not crash.
I made following engine version based on 3.5.0.5 and added back support for the 3.4.2 saved games:
https://www.dropbox.com/s/8gvp111n20j9s7u/acwin--3.5.0.5--svg9restored.zip?dl=0

Could you try that with your game and tell if it stops crashing for you or not. If it does, then this means I somehow fixed the problem along the way. I may then trace back the changes in git history to find what could be a problem exactly.

If it still crashing, then I'll be investigating further.


EDIT: Well, I found a commit that fixes this crash apparently, it was where I replaced inner workings of spritecache from C-arrays to C++ std::vectors.
This is not very clear whether it was simply that replaced old code contained some mistakes which are now gone, or new implementation is more resistant to these mistakes...

20
TBH the usual cause of crashes with dynamic sprites is simply when you delete dynamic sprite (or it got deleted by last reference destroyed) and forgot to remove its index from a view frame or a GUI.

Pages: [1] 2 3 ... 440