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 - fernewelten

#401
Quote from: Crimson Wizard on Fri 11/05/2018 19:39:21
Also, AGS silently creates a number of numeric constants for characters, views, gui and something else, by taking out first letter in their name, for example if you have character cDebug, it will create DEBUG constant, that could also cause this error.

Thanks a lot: That pinpointed the problem. :-D Although I didn't have DEBUG for anything, I did have a GUI named gDebug (for showing debugging variables on-screen). Renaming that GUI to gDebugx made the error go away.

Also, special thanks to you and to ManicMatt for the ultra fast response time! 8-)
#402
Hello,

when editing a game and choosing "Build/Rebuild all files", I get the message:
Code: ags
Failed to save room room1.crm; details below
_AutoGenerated.ash(67): Macro 'DEBUG' is already defined


The online help says that the most likely cause is two things with the same name. In that case, I'm at a loss what those names might be.

I can't read _Autogenerated.ash, so I can only guess at what the code tries to autogenerate.

So how do I hunt down the misalignment?

AGS version 3.4.1
Windows 10
#403
“Grand Kitchen Escape”
is ready for download now.


This started as a MAGS game (see this March), but I found out that I didn't know nearly enough of animating animals to make a proper job of it. I wasn't willing to spoil the gameplay with grotty animations, so I didn't enter the competition as planned and learned animating instead.

Now I'm ready to release the game, and the cat and the dog move better than the human does!

This adventure features:

  • A choice between three player characters
  • A minigame (opening a safe)
  • Specially composed and recorded background music
  • High-res graphics (more or less: it's 800x600) prepared in Inkscape
  • bugs (probably - if you find one, tell me) and other paraphernalia.

It does not feature much gameplay, unfortunately: If you know the correct places to click on, it's quite short. I can only suggest staying in the kitchen as long as possible instead of escaping. :) You'll be rewarded with in-jokes etc. Have you found the philosophical drawer yet?

Yes, all the player characters do have a chance of escaping, each one in a different way.

Interface:

  • Right-click on things to make your player character look at them
  • Left-click to make them use them.
  • Move the mouse to the top to make the game menu appear.

Epilepsy alert: The main screen features a ceiling fan that blinks/flashes when turning. To avoid that flashing, move the mouse to the top in the starting screen and hit the button "Flashless". A tick should appear after the word then. You need to do that on the starting screen since the later screens don't feature this button.

Download the game here

Some spoilers:
How do you open the locked cabinet?
Spoiler
Only Kevin can. With a key, of course.
[close]
And where's that?
Spoiler
At the curtain
[close]
I looked, and it wasn't.
Spoiler
Look very diligently.
[close]
What's the secret combination?
Spoiler
It changes in each game, sorry about that.
[close]
And how do I get it?
Spoiler
Play a kind of “Mastermind” game. The number of green letters gives the number of symbols that are in the correct position. If you are persistent enough, you only need to get 7 symbols right to open the safe.
[close]

How does Kitty move around?
Spoiler
When Kitty is on the floor, he won't pay attention to cabinet doors. However, when he's in reach, he will jump on some of the cabinets if you click on the corresponding doors. Other destinations work, too: you should be able to figure out what works with this hint in mind.
[close]
#404
Quote from: fernewelten on Fri 16/03/2018 08:35:53
I can't advance time, however

Ah. I was being stupid.
Turns out I _can_ advance time after all, by
Spoiler
sleeping in the berth of my quarters.
[close]

That seems to be the solution in order to be able to carry on.
#405
Hello.
I'm playing the Gateway remake (version 1.1).
I've got:

  • the DATAMAN,
  • credit  card,
  • club pin,
  • clover key,
  • green pamphlet,
  • letter about the Orion program,
  • telephone number napkin,
  • tuning fork,
  • blue badge,
  • round medal,
  • scrap of paper for lvl. babe,
  • gun,
  • magazine.

I've

  • been briefed
  • met three people in the bar, buying two of them alcohol
  • retrieved the tuning fork from the museum
  • won the trivia game in the casino
  • broken the Beach VR
  • visited the room behind the crate on Lvl. Babe
  • played the Light Psych VR without knowing what to do with it
  • retrieved the gun from the armory

I'm at 190 points.

Now I simply don't know what I'm supposed to do next. There are no open puzzles I know of.
The agent guarding the restricted area won't let me pass ("I'm sorry, but you're not listed in the computer yet. ... try back tomorrow").
I can't advance time, however, and I haven't any clue about what else the agent might be waiting for.

According to the PV commset, there's supposed to be a demo in front of T52 at 9 o'clock, but again, I can't advance time in a targeted manner.

So how do I proceed?
#406
I am playing version 1.1.

I attended the briefing in room T20 (the one where you
Spoiler
get handed the blue badge
[close]
). I had the red rose in the inventory. I "gave" the rose to the (left) student that attended the briefing. This made the program crash. The error message suggests that the event "UseInv" was not implemented:
QuoteAn internal error has occurred. Please note down the following information. If the problem persists, post the details on the AGS Technical Forum (ACI version 3.3.4.2)
Error: prepare_script: error -18 (no such function in script) trying to run 'hSudent_UseInv' (Room 17)

Note the misspelling "hSudent_UseInv".
#407
Quote from: Cassiebsg on Thu 06/07/2017 18:53:33
Is there a reason why you don't just take a square/rectangle image out of the BG?

It's an artistic decision. ;) Ego's smartphone has a zoom objective, but the length and width of its shots are fixed; so whenever he shoots something tiny, such as a patch of grass, it gets absurdly blown up and very grainy, whereas anything large gets scaled down. If that looks daft, well, it turns out that Ego isn't such a great photographer, anyway: somehow all his photos have a (randomly varying) slight tilt, or are underexposed or overexposed, or have a tint, or all of that at the same time.

And yes, all those bumbling shots get names such as "IMG_1283.bmp", similar to the names of real camera shots, and are solemly stored on disk, whilst Ego exclaims "Ah, THIS is really going to be my MASTER shot" and things like that.
#408
Thanks for the fast reply! So I don't get ready-made dimensions, but I do get the two-timensional array exposed with the hotspot information per pixel. Great! That's something tangible to work with.

So I've googled around a bit and found an algorithm called "Theo Pavlidis' Algorithm" (descriptive, visual layman's explanation) for crawling around the outline of a pixel blob. That's similar to my problem: I'm considering the points of my hotspot as equivalent to "black" pixels and the rest of my screen as the "white" pixels.

I know a middle point of my black pixels (hotspot), because the player has clicked the mouse at it. So I travel from there in a straight line to the left until I find the first point that has a neighbour that is NOT in the hotspot. This gets me my first outline point. From there, I travel along the outline using "Theo Pavlidis' Algorithm", always keeping track of the lowest and highest X and Y value I encounter. When I'm back at the starting point, I know my bounding box values.

This seems to be efficient enough for my purpose, but there's a snag: If the hotspot happens to be donut shaped or similar, I must take care not to follow the inner boundary (the one of the hole) instead of the outer one. So I've modified the algorithm with a check that happens whenever I encounter a new minimum x value.  In these cases and only in these cases, I check whether the adjacent neighbour to the left is in my hotspot, too. If it is, I assume that I've hit an inner boundary by chance - so I travel from there again in a straight line to the left until I hit a new boundary and re-start the algorithm from that point.

I've implemented this idea in around 200 lines of code. It's working, but I haven't pounded on the code very hard, so it might still contain bugs.

In the meantime, Ego is running around the room happily taking snapshots of patches of grass and of his crashed car and of the rocky ledge that imprisons him. ;-D
#409
In my estimation, a sizable chunk of data will be tied into sprites. Actually trying to remove them will probably turn out to be a HUGE pain:

In your case, most of the sprites will be in use â€" in principle and in the coding, just not in the demoed rooms. If AGS thinks that a sprite is in use, AGS will actively prevent deletion to avoid an unstable state.

What might work, however, is copying a one-pixel sprite into the clipboard (right-click, "Copy sprite to clipboard") and then pasting that over all the sprites to be killed (first time: right-click, "Replace sprite from clipboard..."; then, right-click, "Replace sprite using last sprite..."). It will still be a pain, since there will be loads of them.
#410
Hello,

Is there a way to get the dimensions of a hotspot(!) by code?
What I'm after is the bounding box that contains the hotspot.

Why: My Ego has got a smartphone and loves to take a snapshot with it of the room part that the player clicks on.
Ego can already do this with characters and objects. He wants to shoot hotspots, too.

The way I found for characters is a bit convoluted, but feasible:
Code: ags

Character *chr = Character.GetAtScreenXY(mouse_x, mouse_y);
ViewFrame* frame = Game.GetViewFrame(chr.View, chr.Loop, chr.Frame);
int width = Game.SpriteWidth[frame.Graphic] * GetScalingAt(mouse_x, mouse_y) / 100;
int height = Game.SpriteHeight[frame.Graphic] * GetScalingAt(mouse_x, mouse_y) / 100;
int x = chr.x - width / 2;
int y = chr.y - height;


The way I am using for objects is:
Code: ags

Object *obj = Object.GetAtScreenXY(mouse_x, mouse_y);
int width = Game.SpriteWidth[obj.Graphic];
int height = Game.SpriteHeight[object.Graphic];
int x = obj.X;
int y = obj.Y-height;


I haven't found a way to do this with hotspots.

Ego photographs about 20% more than the bounding box, so if my calculations are off by a little, that won't matter.
#411
Quote from: Gurok on Sun 11/06/2017 16:08:53
Did you try setting a SpeechView for the player character as I suggested above?

@Gurok:

Sorry. I was interrupted by a meeting right now and could not finish my posting activities. I'm back now. Yes, I've tried creating a view with one transparent frame and setting this as the "speech" view. This looks fine, as far as I can see, but with player.Say(), the gui gets a fixed position at the top of the screen in Sierra style. But I could correct this in turn through using player.SayAt() instead of player.Say(). I could wrap a small function around player.SayAt() that calculates a good position based on the player position.

I'll certainly experiment with that option, too.

This option will be especially interesting if I decide to use proper speech views for my characters. I have several ideas that revolve on proper speech views. Since I have a large, 16:9 screen at my disposal ... On the other hand, if the game turns out to have lots of characters, I won't have the resources to provide proper speech views for all of them.

Thanks a lot for the hint!
#412
@Snarky

Yes, I agree, this is probably the way to go. The more so since I can make up a nice one-letter or two-letter method name so that the typing overhead in the dialog editor is nearly non-existent.

I'm aware that it would need several custom text guis to replicate all the cool dialog effects in Resonance - they don't only have "speech bubble tails" that always point to the proper speaker, but also special speech bubbles for telephones etc. etc. I don't plan my adventure to be quite as lavish in this regard. ;)

I'll let you know how it works out, but it'll need some more time since I had to give other aspects priority. I'm currently revamping the verb coin interface so that the pointer always shows a sensible and "allowed" default action wherever it goes, which is also the left-shortclick action; a left-longclick will open a verbcoin that always only shows those actions that are "allowed" at the current screen position. The interface is already mostly functional.
#413
To clarify, I'm after an effect like this, but in high-resolution:


Preferably, in a way that lets me use the Dialog features of AGS.

Note that the "pointer" part of the speech bubble takes up about 40 % of the width of this bubble; it is constant, but the size of the bubble is dynamic (depends on the size of the spoken text).

Translated to my current screen size and font size, the speech bubble for "Where is that noise [coming from?" would need to be around 300 pixels wide, which would mean that the bottom-left "corner" would have a constant width of about 100 pixels. Using the approach in this thread, all the corners would be about 100 pixels wide, and the top and bottom edges would be 1 pixel wide. Padding would probably turn out to be around -35 pixels (negative).

The screenshot is from Resolution, which is an AGS game, albeit low-res and closed-source.


By the way, I've googled the current place of the Phylactère module to be  publishing page link to the download. The page is French, but the only thing it says is "use player.Phylactere() instead of player.Say()", so you don't miss much if you can't speak that language.

I'm currently looking into this extension; thanks for the tip.
#414
Quote from: Riaise on Sun 11/06/2017 11:55:55
If you change the speech style in game options to "Sierra with background", does it work then?

Thanks for coming to help.

"Always show text as speech" -> false, "Speech style" -> "SierraWithBackground"

Display() does show the custom text window, DisplayAt() does show the custom text window.
player.Say() does not show the custom text window, player.SayAt() does not show the custom text window.

"Always show text as speech" -> true, "Speech style" -> "SierraWithBackground"
Display() does not show the custom text window, DisplayAt() does show the custom text window.
player.Say() does not show the custom text window, player.SayAt() does not show the custom text window.

"Always show text as speech" -> false, "Speech style" -> "Lucasarts"
Display() does show the custom text window, DisplayAt() does show the custom text window.
player.Say() does not show the custom text window, player.SayAt() does not show the custom text window.
Same as when "Speech style" is set to "SierraWithBackground".

"Always show text as speech" -> true, "Speech style" -> "Lucasarts"
Display() does not show the custom text window, DisplayAt() does show the custom text window.
player.Say() does not show the custom text window, player.SayAt() does not show the custom text window.
Same as when "Speech style" is set to "SierraWithBackground".

So AGS behaves the same no matter what "Speech style" is set to.

Problem 1: The custom text window never appears with player.Say(). But it is a speech bubble - it is intended for speeches.

Problem 2: When "Always show text as speech" -> true, then DisplayAt() behaves differently from Display(), contrary to the F1 documentation.
#415
Quote from: Kumpel on Sun 11/06/2017 08:40:33
Why are you using negative values at all?

Thats why: http://www.adventuregamestudio.co.uk/forums/index.php?topic=52225.msg636514425#msg636514425
Of course, this is pointless when the speech bubble isn't shown at all when the player Say()s something. And that's what is happening to me: The speech bubble is neither shown for a positive padding nor for zero padding, nor for a negative padding.


Quote from: Kumpel on Sun 11/06/2017 08:40:33
that means the several parts should only be as big as the frame of you text window is. my custom frame tiles are only 2x2 pixels.

Sorry, I think I mis-explained and didn't give enough details. Let's explain this better I hope: As far as I can see, I must load all the graphics in the sprite editor. I've worked on the verb coin interface first. When I uploaded the verb coin image at that time, the sprite editor assigned sprite number 1 to it. Since this time, sprite number 1 means the verb coin sprite. Wherever I use sprite number 1, the system uses the sprite of the verb coin.

Recently, I tried to make custom text guis work. When I created a new, fresh custom text gui, the editor showed me a default bubble with four corner sprites and four edge sprites. It used sprite number 1 for all these sprites (Properties: Image = 1). That was the default the system used. In my case, all these pictures turned out to be pictures of my verbcoin, since sprite number 1 is the verb coin sprite. Thus, the system displayed the editor I've shown above:

I fixed that by setting "Image" to the number of a smaller sprite.

Still, since I have a large (1280 px wide) window, the corners of the speech bubble will turn out to be quite large, too. For instance, I plan a bottom left corner that "points" to the speaker (highlighted in green in the picture below):


I am using 15-point speech fonts and so typical spoken text will be more than 600 pixels wide. A small bottom-right corner with a small "pointer" would look very ugly. I'd prefer the bottom left corner to be about 1/3 of the speech width.

The documentation claims that the custom text gui window is "about a quarter" of the game screen size. In my case, however, the screen is considerably smaller than that.

#416
Quote from: Slasher on Fri 09/06/2017 19:58:30
Perhaps you have selected UseOutlneFont..?

OutlineFont is 0.

I've found out something very strange in the meantime: As noted, player.Say() does not make my custom text gui #7 appear. But the system doesn't ignore that gui completely either: If I set "padding" to a negative value in that gui #7, the spoken text is clipped at all the sides. Just as if there was an "invisible" gui around the spoken text that normally just fits the spoken text and that is shrunk with negative "padding" values. But why would an "invisible" gui obey padding values for another gui that isn't shown? Look:


Code: ags

function room_FirstLoad()
{
    player.Say("Help! My precious[words are being clipped!");
}


"padding" set to 0 in GUI #7 (note that there is some clipping effect even now)


"padding" set to -10


So I've come to believe that this might be an AGS glitch after all. For the meantime, I've decided to proceed without custom text guis.

Another thing that is more or less annoying but tolerable in itself: I'm writing a large screen adventure (1280x720 pixels). Compared to that size, the gui editor window is really tiny. The default for the edge and corner graphics is sprite #1, which is my current place for my verb coin. This coin is huge by comparison (120x120 px), although the size is quite reasonable for an adventure of the screen size (as far as verb coins go). The result is a cluttered, "stamp-sized" editing field. Look:


If this becomes a bug report instead of a beginner's question, as I thought at first, then the thread probably needs to move into another forum section. How? I don't want to crosspost.
#417
Hello.

I'm trying to build a high-resolution (1280x720) adventure with AGS 3.4; for the exact setup, cf. the bottom of this post. This is my first attempt to work with AGS. I've read the FAQ and perused the F1 documentation several times.

Currently, I'm trying to make a custom text window work. I'm testing the following code with different displaying functions:
Code: ags

function room_FirstLoad()
{
    DisplayAt(550, 400, 100, "That's me talking!");
}



I notice:

* When I use player.Say() or player.SayAt() or Display(), the system uses some font that I haven't found in the configuration screens anywhere. Also, the system ignores the custom text window GUI 7 that I set up in General Settings. I've tried every setting in Dialog/Speech style without changing anything in this regard.

player.Say():

Display(): (same picture as above)
player.SayAt():


* When I use DisplayAt(), the system does use my custom text window and does use a font in the resource tree, I think font 1.


The documentation of DisplayAt() claims: "Identical to the "Display" function, only this allows you...".

I've probably overlooked some customization somewhere. So how do I proceed from here?
There's also a slight chance that I might have tripped over some obscure bug.
I've tried several Google queries without finding any article that treats similar problems.

Peter

PS. Please disregard the graphics. I use scribbles for everything where I am still unsure of the exact details, by principle.

Here is my setup:

My AGS version, as given in the Help/About AGS... screen:

QuoteAGS Editor .NET (Build 3.4.0.16)
V3.4.0, March 2017
Copyright © 2006-2011 Chris Jones and 2011-2017 others.
Scintilla (c) 1998-2003 Neil Hodgson, all rights reserved
DockPanel Suite (c) 2007 Weifen Luo
See the DOCS folder for copyrights of used libraries.
System: Windows 7
Editor plugins loaded:
x ags.plugin.notes.dll

My "General Settings" screen:
Quote
Put sound and sprite files in source control   False
Resolution   1280 x 720
Backwards Compatibility   
Enable mouse wheel support   True
Enforce new-style audio scripting   True
Enforce new-style strings   True
Enforce object-based scripting   True
Left-to-right operator precedence   True
Script API version   3.4.0
Script compatibility level   3.4.0
Use low-resolution co-ordinates in script   False
Use old-style custom dialog options API   False
Character movement   
Automatically move the player in Walk mode   True
Automatically walk to hotspots in Look mode   True
Characters turn before walking   True
Characters turn to face direction   True
Compiler   
Build target platforms   Windows, Linux
Compress the sprite file   False
Enable Debug Mode   True
Split resource files into X MB-sized chunks   512
Dialog   
Allow speech to be skipped by which events   Mouse, keyboard or timer
Dialog bullet point image   0
Gap between dialog options (in pixels)   0
Number dialog options   Draw numbers and use keyboard shortcuts
Print dialog options upwards   False
Run game loops while dialog options are displayed   False
Sierra-style portrait location   Left
Speech style   Lucasarts
Use game-wide speech animation delay   False
Use GUI for dialog options   0
Inventory   
Display multiple icons for multiple items   False
Inventory item cursor hotspot marker   None
Override built-in inventory window click handling   False
Use selected inventory graphic for cursor   True
Saved Games   
Enhanced save games   False
Save game file extension   
Save games folder name   Test Freedom
Save screenshots in save games   True
Sound   
Play sound when the player gets points   (None)
Text output   
Always display text as speech   True
Anti-alias TTF fonts   True
Custom text-window GUI   7
Custom thought bubble GUI   7
Fonts designed for 640x480   False
Write game text Right-to-Left   False
Visual   
Default transition when changing rooms   FadeOutAndln
GUI alpha rendering style   Additive Opacity
Pixel-perfect click detection   True
Sprite alpha rendering style   Classic
When player interface is disabled, GUIs should   Grey out all their controls
Windows Vista Game Explorer   
Developer website   http://peter.bouillon.hat-gar-keine-homepage.de
Enable Game Explorer integration   False
Game description   
Genre   Adventure
Release date   01.01.2021
Version   0.0.1.2
Windows Experience Index   1
SMF spam blocked by CleanTalk