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

#2721
Quote from: Indra Anagram on Mon 15/08/2022 11:54:48
Is there a way to make the A, S and D keyboard buttons work whatever the language is on on my machine? Because someone having non-Latin alphabet might have the game not working as well.

I did not pay attention to this earlier, but it seems like this got fixed in AGS 3.6.0; it's in Beta currently, may be found here:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=59842.0

If I print keycodes on screen in on_key_press, the AGS 3.5.1 prints 65, 83, 68 for A-S-D keys if latin lang is on, and always 94 if cyrillic lang is on (94 means '^' character, this character is used to replace "invalid codes", I think).
At the same time, AGS 3.6.0 prints 65, 83, 68 regardless of the active system language.

EDIT: oh, I see now, this works correctly only if "Use old-style keyboard handling" is off in the game settings; this is default in 3.6.0. If you switch it on (use old mode), then it stops working correctly again.
#2722
Quote from: hit3nkuro on Mon 15/08/2022 09:21:40
I can't change button's graphic

Not sure what you mean by that, but it is possible to change button's graphic in script using NormalGraphic property.
https://adventuregamestudio.github.io/ags-manual/Button.html#buttonnormalgraphic

As of the latest version GUI cannot have custom properties attached to them, so if using Text (as suggested by Khris above) does not work for you, you'll have to store extra properties in script. You can write structs. Also you can try using Dictionary and Set objects:
https://adventuregamestudio.github.io/ags-manual/Dictionary.html
https://adventuregamestudio.github.io/ags-manual/Set.html
#2723
Quote from: Indra Anagram on Mon 15/08/2022 09:52:03
Quote from: Crimson Wizard on Sun 14/08/2022 23:21:05
I quickly tried this, and it seem to work well if you import directly into 2.72. The sword and throwing stars work too; the script is in place, and I saw no reason for it to not work, unless it got modified.

What do you mean by saying 'if you import directly'?

I mean: directly from original game into 2.72 editor, without using 2.62.

I downloaded from this link you posted above. Judging by the file dates, it's the original game (I guess?):
https://www.dropbox.com/s/60oznzea6r00ee4/platformerius-the-ninja-incident.zip?dl=0

I open 2.72 editor, choose "Load an existing game", choose the game's ac2game.dta.
1. Rooms have to be recompiled - yes.
2. Specify resolution - leave it at 320x200 and OK.
3. Warns about "loose inventory" option - ignore and proceed.

Here I notice that the player character is set to start at room 0, but only room 1 exists. Either game sources are incomplete, or 2.72 was unable to extract the intro room. But the gameplay room is still there.
EDIT: looking inside the ac2game.ags file (with a text or hex editor), it mentions "intro.crm". Apparently 2.72 ignores this file when unpacking (that's my only explanation). There may be a solution to this, but I ignore for now, as this is likely not critical for the current goal.

So to fix the game:
4. Go to Characters
5. Select character "Fruittree", because he has "This is the player character" checkbox ticked.
6. Edit "Start in room" to 1.

Press Ctrl+T to run the test.

Working controls:
A - strange grayscale effect;
S - throw ninja star
D - swing sword
#2724
Quote from: Indra Anagram on Sun 14/08/2022 21:47:12

When opening the original 2.5.1 Platformerius in 3.5.1 the Import Old Game Wizard suggests me to create the game's backup. However an undentified error causes the Editor to crash and close. If I open the re-compiled 2.6.2 version of the game in AGS 3.5.1.19 , the Editor says:


Yes, it looks like it can decypher the 2.51 game itself, but it cannot load the editor project data of anything lower than 2.72.
The crash is a bug, and should be fixed, but that won't make it import the project. So, resaving in 2.72 still has to be done before importing to 3.* editors.


Quote from: Indra Anagram on Sun 14/08/2022 21:47:12
Any ideas why this might happen? Probably, Khris faced same issue, that's why he first said the game must be re-compiled in 2.6.2 and then 2.7.2. But in 2.7.2 not everything works like it does in 2.6.2: the character doesn't respond when keyboard keys for sword and throwing stars are being pressed.

I quickly tried this, and it seem to work well if you import directly into 2.72. The sword and throwing stars work too; the script is in place, and I saw no reason for it to not work, unless it got modified.
#2725
Quote from: eri0o on Sun 14/08/2022 19:25:39
I use the environment variables because then I can sideload multiple Visual Studios and it will work :)

Oh, these are not shared then. I did not notice that.
#2726
Quote from: eri0o on Sun 14/08/2022 15:44:11
I haven't read a thing because you are adding too many steps, but around step 10 when using the VS Dependencies prebuilt, just create the props variables in your user environment variables on Windows and it should work

Alternatively you may do this in MSVS "user macros", as mentioned in the readme:
https://docs.microsoft.com/en-us/cpp/build/working-with-project-properties?view=msvc-160#user-defined-macros
at least this worked in the previous versions of the VS, never used 2022 one.
#2727
The latest versions of AGS (from 3.5.0 at least) support opening game projects as old as from AGS 2.50. AGS 3.2.1 could not do that, but this ability was restored now.
#2728
For information, all the old engine & editor executables are available for download from this torrent:
https://www.agsarchives.com/agsarchives.torrent

as well as a thousand of older AGS games.


Quote from: Indra Anagram on Sat 13/08/2022 10:18:02
Isn't there a sort of a table that lists the obsolete commands and their revamped analogs?

Yes:
https://adventuregamestudio.github.io/ags-manual/ObsoleteScriptAPI.html

But also there is a way to enable all the old commands in the modern AGS:
https://adventuregamestudio.github.io/ags-manual/ScriptAPIOverview.html#api-switches

EDIT: Only "Enforce object-based scripting" is now called as "Enforce post-2.62 scripting" for clarity.
#2729
Another issue found: when engine is playing MP3 music from the full game package it may skip past the end and continue playing audio.vox contents, as if it were one big MP3 file. This is a funny effect, when you start one MP3 clip, but it keeps playing all of them in order.

Following temp build fixes it (will post a proper update later):
https://cirrus-ci.com/task/6254162487803904
#2730
Hmm, this is either a game shutting down normally for some reason, engine closing a game because it did not like something (but without any message), or a silent crash. But I think contemporary versions of Windows should at least display a notification about program not closing normally.

Not sure how much this will help, but you may enable engine logging, by placing this into a config file (acsetup.cfg):
Quote
[log]
file=all

On Windows the log should be written to "%USERPROFILE%/Saved Games/Adventure Game Studio" in 3.6.0, or "%USERPROFILE%/Saved Games/.ags" in previous versions.

By the way, this reminds me, I forgot to ask which version of AGS are you using?
#2731
Please, when you ask about crashes, always tell the error message you see, if any (post a screenshot if copying the message text is difficult). It could be a script error, or an engine bug, or else, in each case the solution would be different.
#2732
Quote from: actaria on Wed 10/08/2022 15:31:17
I don't know what is their original positions but i will try to find how it's supposed to look

In TextWindow you set 8 "edge" graphics and 1 BackgroundGraphic on GUI (or background colors). When in game the edge graphic will be copied around the edge like tiles, making seamless borders.

With TextWindow you may completely ignore how it looks in the editor, because it never is drawn like when in game. When in game, all these corners will be arranged automatically when the window is displayed. The window's size will also be resized automatically, depending on the active text.

#2733
Quote from: CaptainD on Tue 09/08/2022 12:42:07
When I make arcade games and similar with AGS, I don't use characters (apart from cCharacter to change rooms), I keep the player X and Y position in variables, and have a routine called in each game loop which clears the screen and directly draws the character sprite in the current x,y position. The keyboard commands don't do anything apart from update x and y. Depending on exactly what you're trying to achieve this may be a good option for you. If you do this then any animation has to be handheld by updating a separate variable to keep track of which image to draw.

I realize this is bit offtopic, but would like to mention:
There's nothing bad in using AGS characters and objects for arcade games per se. In fact that makes perfomance better, as the real objects in the engine are utilizing textures, so they are drawn by a graphics card; while drawing on a DrawingSurface adds to a CPU load. This difference may not be significant for a low-res games (at least on modern computers), but becomes a real problem the higher resolution is, and the more objects are on screen. It also increases with additional effects, such as scaling.
Additionally, objects already have coordinates, scaling and animation support, and so on, so you don't have to track and implement these yourself.

There are two issues with these objects. First is disabling unwanted behaviors. For instance, keeping character's view locked all the time, to avoid "walking view" behavior when it animates or switches directions without your control.
The second is the fact that they are created only at design-time and cannot be created or deleted at runtime. That may be worked around by coding an "object pool", where you track a list of objects, mark them as used and unused as the game progresses. (see this module for a quick example)

As of AGS 3.6.0 Overlays are unlimited in numbers and may be positioned inside the room, and as they may be created and deleted at will, they make a good alternative to characters and objects. Their primary downside is the lack of Animate command, so you'll have to animate them yourself. But otherwise they are well suited for a role of a custom graphical object.
#2734
Quote from: Indra Anagram on Mon 08/08/2022 23:13:22
Crimson Wizard. I've already been recommended to play The Art of Dying. Unfortunately, when trying to run it I get errors like this:

I suspect this may be because of the unicode (cyrillic) letters in the path. Either copy the game to a path with only latin letters. Otherwise, try using the latest engine, but copying acwin.exe from the editor program folder into the game dir, and running. The 3.6.0 engine is supposed support unicode paths correctly.

About compilation: you need Joystick plugin; the editor probably warned you about one is missing when you open the project.
https://www.adventuregamestudio.co.uk/forums/index.php?topic=41658.0
#2735
Speaking on alternatives, since AGS 3.5.0 there's a way to move room's view altogether with everything in it, using new Viewport class. This may be used to shake the room in any direction.

Some dumb example:
Code: ags

int delay = 5;

for (int i = 0; i < 10; i++) {
     for (int y = 0; y < 20; y++) {
          Screen.Viewport.Y = y;
          Wait(delay); // let engine update / redraw
          Screen.Viewport.Y = -y;
          Wait(delay);
     }
     for (int y = 20; y > 0; y--) {
          Screen.Viewport.Y = y;
          Wait(delay);
          Screen.Viewport.Y = -y;
          Wait(delay);
     }
}

Screen.Viewport.Y = 0; // reset
#2736
Here's a "Art of Dying" platformer made in AGS, it is distributed with a source project:
https://gamejolt.com/games/the-art-of-dying/21047
its mechanics are not exactly same as in the above game, but may be useful for someone wanting to make a platformer in AGS.

If you are looking for game projects in general, there's a thread where we gathered a list of open sourced AGS games:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=50980.0
#2737
Please tell, on which line exactly do you get "invalid object specified" error?

I don't know what is going on in your game, but you probably also need to test the Room.ObjectCount to know how many objects are there, before accessing object[] array; because if there are 0 objects then you should not get object[0], and so on.
#2738
Well, this means that the software driver has to be fixed to play shakescreen correctly.
#2739
What I am saying is: we no longer build Allegro as a library. We directly include its files into the project, when and if it is necessary.

If it's included into the project that you are trying to build, then it should be compiled automatically, along with the rest of the project's files.

What is the actual problem you are facing right now, are there any compilation or linking errors?
#2740
Quote from: adipson on Mon 08/08/2022 13:40:12
I try with Direct3D and  OpenGL and Nothing change for me.

The Default Setup page defines the starting option values, but not the current ones; when the game runs it also reads user config. Build the game, then run Build -> Run game setup, and select the driver there.

Quote from: adipson on Mon 08/08/2022 13:40:12
i try with rotation mode otpions too but nothing

"Rotation mode" is for mobile devices only, i think, should not be related to this issue.
SMF spam blocked by CleanTalk