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 - Crimson Wizard

#761
Quote from: Mehrdad on Thu 14/07/2022 06:00:37
Yes, Demo Game. I hadn't problem with previous versions. It happens for me in 1.1.0
I use 3.6 last version.

So what happens, you download the demo game, open the game in the editor, go to room 3, switch to display room objects, and there are none? And when you run the game, there are also none?
#762
Quote from: Mehrdad on Tue 12/07/2022 14:42:49
Room 3 is empty and doesn't have any items for drag

Are you talking about Demo Game? I don't observe this problem. Please tell, where did you download the game, and which version of AGS are you using to open it?
Does anyone else have same issue?
#763
Quote from: Mehrdad on Tue 12/07/2022 12:08:06
In the game, I haven't items (objects) in room 3.

Sorry, what do you mean by this?
#764
Updated DragDrop & DragDropCommon modules to 1.1.0

* Introduced DragDrop.EvtCancelled attribute, telling that the action was cancelled and object "unhooked" even before the dragging itself started.
* Consequently, fixed a mistake in DragDropCommon when it did not reset some public attributes when the drag was cancelled.


PS. I still have to write a better documentation and examples...

PPS. Started rewriting module docs, I also found a number of logical mistakes in the module, so likely there will be 1.2 update after this...
#765
Updated to v0.9.1, now implements D3D.OpenSpriteFile() again.

For Windows: https://github.com/ivan-mogilko/ags-sprite3d/releases/download/v0.9.1/win_ags_sprite3d.zip
For Linux (debian-based): https://github.com/ivan-mogilko/ags-sprite3d/releases/download/v0.9.1/libags_sprite3d.tar.xz

I think this now covers all the functionality of the old plugin. What remains is mostly testing and writing a documentation.
#766
This is an upgrade of the older "Direct3D" plugin by AJA, which was used to display Theora videos in AGS, and also freely display sprites with various transformations (without creating standard game objects).

WARNING: neither the original plugin nor this reimplementation play any sounds from videos, they only display video frames. Adding sound support might be a goal for the future versions, but it's not in the immediate plans.

The original plugin was a nice addition as it worked around some engine's limitations, such as being unable to display video non-blocking or while keeping some other objects on screen (like GUI or cursor); or randomly creating scaled and rotated sprites on any layer in game. Not much changed since, except maybe in AGS 3.6.0 Overlays now come close to this plugin's sprites abilities.
But the older plugin also had a significant limitation, as it was made for an older engine, it did not support anything besides Direct3D renderer on Windows.

This new upgraded version, called "SpriteVideo", now has following major improvements:
* OpenGL renderer support;
* May be built for Linux;
* Potentially maybe will work on Mac and Android, but not yet configured the project for that.

Another important part is that this plugin is purposely made 100% script compatible with the old plugin, which means that you may simply replace it in your game project and all the scripts will continue to work. In fact, you may even rename new plugin's dll into "ags_d3d.dll", replace it in the game folder, and it should hook up correctly.

Documentation:
https://github.com/ivan-mogilko/ags-spritevideo/wiki

The plugin is currently in the "test stage", and I will be interested to see how it works with existing games that used the original plugin. My primary goal at this point is to make it complete and stable substitute for "Direct3D" plugin.

Downloads:
Updated 24 April 2023
For Windows: https://github.com/ivan-mogilko/ags-spritevideo/releases/download/v0.9.4/win_ags_spritevideo.zip
For Linux (debian-based): https://github.com/ivan-mogilko/ags-spritevideo/releases/download/v0.9.4/libags_spritevideo.tar.xz
Source code: https://github.com/ivan-mogilko/ags-spritevideo

TODO for v1.0:
* Testing in some real games.
* Bug fixing
#767
Quote from: Amir on Sun 03/07/2022 09:33:04
I have a question. As far as I remember I tried android launcher back then and it worked fine, but in my new game there are a lot of "strings" fields where you have to type something. Will this also work with the android launcher? Will the keyboard appear on mobile phones, so that you type something?

There's a built in keyboard, which you may bring by holding "back" key and choosing "keyboard" from the menu. But that is meant mostly for games which were not specifically designed for touch screen. If that does not suit your game you could script your own on-screen keyboard.
#768
Quote from: AndreasBlack on Tue 31/05/2022 16:51:46
Edit 2: The code you've wrote did nothing it's still Software Rendering.

That code is not for changing renderer type, but "Render at screen resolution" setting. It is not supported by software renderer btw.
It's possible to test if renderer type is software or not using "System.HardwareAcceleration".

QuoteOh, and btw pushing the back button and trying to enter a password aka using the text parser throw's me an error and game crash. I believe the error probably has to do with that i use an ä letter, not sure tho.

Please tell, what error is that? Does it happen on desktop?
#769
Quote from: AndreasBlack on Mon 23/05/2022 21:56:33
Edit: a Question. So my game is 320x200 and i used the "render sprites at screen resolution" option, but that seems to not be happening. When my character looks like quasimodo in the face, it's quite obvious somethings gone bad  (laugh) Am i missing something? Anti-alias sprites perhaps?

Please, could you be more specific, what is "not happening"? What do you expect, what happens in reality? Does "it" happen on desktop PC? How do you set the config on android?
#770
Quote from: martag on Sun 22/05/2022 21:47:42
2. Any tricks to remove the white arrow cursor?

Is this arrow cursor a part of the game? in such case you may hide the cursor either using Mouse.Visible property, or switching cursor graphics with a transparent 1x1 sprite. This may be done under condition that the game is run on Android, for example:
Code: ags

function game_start() {
    if (System.OS == eOSAndroid) {
        Mouse.Visible = false;
    }
}
#771
Quote from: eri0o on Sat 21/05/2022 01:12:18
Btw, I don't know if Android Studio works on Windows 7 since I never used it there and the OS is unsupported by MS, so there's that too.

It worked for me last time I tried.
#772
Quote from: eri0o on Wed 18/05/2022 01:35:51
uhm... About overlays... How far off is adding tint to them?  (roll)

Alan Drake is demanding that i dont add anything to 3.6.0 anymore, so all the additions go into ags4 now.
Right now tinting may be added through dynamic sprite's Tint function.

Technically, tint is applied to a texture, so it's a matter of having a parameter in overlay. However, in regards to ags4, I'd rather suggest moving towards base class, where it will contain all the transform and color effects. Then one won't have to add separate parameters to each type of object.
#773
There's one important question that I forgot about, regarding the room overlays: what should happen to a room overlay when the room changes.

Variants probably are:
* it is removed; meaning it exists so long as player is in current room.
* it is kept but is not displayed until returning to the same room; that is owned by room.
* it is kept and transferred to another room as-is. This is dangerous, as there's a real chance of loosing control over the overlay, if its pointer is only in the previous room script: then the new room has no means to control it.

NOTE: right now all overlays are removed forcefully when changing rooms, that's a standard AGS behavior.
#774
I opened a PR if someone wants to test this out the CI server should make the build soon:
https://github.com/adventuregamestudio/ags/pull/1646
#775
Quote from: eri0o on Mon 02/05/2022 17:08:47
Question on cloning. Say in the future somehow is decided that the Graphical property (the sprite id) must be also a writable property, if the Overlay was created using a clone flag, does it mean it should copy on change and not really be a reference in that case? I am wondering if an Overlay should have an additional property for the Overlay type (say textual, graphical clone, graphical... ?)

I see cloning behavior as a historical bit that we are forced to keep for the time being, but may remove later (in ags4). In my opinion that should not be a part of an object's logic (otherwise we should add same to every object), but rather a part of a sprite management. So, if Overlay.Graphic is added at some point, imo that should be non-cloning reference always.
#776
Quote from: Nowhere Girl on Sun 01/05/2022 17:11:36
But... 1920x1080 is my screen's resolution. Does it mean that I will be unable to efficiently play the game in windowed mode?

Not sure if relevant in this case, but 3.6.0 supports "borderless fullscreen window" mode, that makes switching in and out simplier and more stable than in regular fullscreen.
#777
Quote from: eri0o on Mon 02/05/2022 11:25:19
on_ events don't happen when something is blocking. Also they are not good when you need to get something continuously, like keep the character walking.

Ok, but so do events for mouse clicks and keys, and yet they exist and are useful.

Skipping text and skippable blocking actions should be done in the engine IMO. In other words, whenever there's an event for mouse or keys there should be a corresponding event for gamepad. If a mouse or keys are checked in the engine, so should gamepad be checked as well, and so on. Well, at least this is how I thought this will be done. Is your goal for the moment to use gamepad to simulate other inputs in rep-exec-always?
#778
Quote from: eri0o on Mon 02/05/2022 10:54:09
About on_gamepad_press, I will at some point, but it's not very useful right now (can't skip text) so I will keep using repeatedly execute always at this time.

Could you elaborate how is this related to skipping text?

IMO it may be useful just as the key presses in on_key_press are useful: to react to button press without having to deal with their on/off states in the rep-exec. Right now it seems in your examples you're trying to use gamepad to simulate mouse cursor and clicks. But gamepads could be used without mouse cursors as well, similar to how keyboard is used in keyboard controlled games.

My meaning in general is not to try to simulate anything with gamepad (this was the plugin's approach, because there was no other way) but instead integrate gamepad as a part of the normal engine input and script. Have events for gamepad similar to how there are events for mouse and keys.
#779
I see that the gamepad buttons are used as mouse click simulation, but I assume this is done temporary for a test.

Should the goal be to have gamepad buttons handled similar to keyboard key and mouse clicks, that is to have their own respective callback, like on_gamepad_press?

One optional idea is to have gamepad buttons merged with eKey codes. The benefit of that is that you may assign them to the same variables as keys, both in engine API properties, and script variables.
#780
I'm thinking that the most straightforward idea for at least a temporary solution for p1 (graphic sharing) would be to just add a parameter for CreateGraphical that tells "make copy". Make it false by default, as in - make a reference. For example:
Code: ags
Overlay.CreateGraphical(int x, int y, int slot, bool transparent, bool clone = false);

The reason why I think it should "not clone" by default is, to prevent unnecessary resource load without user realizing that.
This would work seamlessly for normal sprites. For dynamic sprites, people might stumble onto this once if they delete the sprite too early, or change it to suddenly see the change in overlay as well. This is solved by learning about the parameter.

The old games run in the new engine would have to "make copy" all the time, as they did not have such param.

Additionally, it would be possible to optimize this by (implicitly) not making copy if we know it's not a dynamic sprite, because normal sprites cannot be changed or deleted.
At first I thought this might be the best approach without extra script parameters. But then I thought that in theory a game may have a collection of generated dynamic sprites applied to overlays, like some kind of a tilesheet or something, in which case making copies would also be not wanted.



UPDATE: Hmm, this appared to be rather promising. At least it works. Even if I'd only make an implicit rule to not make copies of a regular sprites without changing script api - that already should improve perfomance when there's alot of overlays with similar sprites on screen.
SMF spam blocked by CleanTalk