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

#1
I'm not using any special characters. Everything has been typed in using a text editor.

However, I *think* I've found the problem. I'm not sure because it's so hard to get it to show up.
Code: ags

	// Top menu bar tooltips
	if (gMenubar.Visible)
	{
		GUIControl* myButton = GUIControl.GetAtScreenXY(x, y);

		string labelText;

		if (myButton == gMenuExit)
		{
			StrCopy(labelText, "Exit game");
		}
		else if (myButton == gMenuHelp)
		{
			StrCopy(labelText, "Help");
		}
		else if (myButton == gMenuInv)
		{
			StrCopy(labelText, "Inventory");
		}
		else if (myButton == gMenuLoad)
		{
			StrCopy(labelText, "Load game");
		}
		else if (myButton == gMenuNew)
		{
			StrCopy(labelText, "Restart game");
		}
		else if (myButton == gMenuOptions)
		{
			StrCopy(labelText, "Options");
		}
		else if (myButton == gMenuPda)
		{
			StrCopy(labelText, "PDA");
		}
		else if (myButton == gMenuSave)
		{
			StrCopy(labelText, "Save game");
		}

		gStatusLineLabel.SetText(labelText);
	}


There's a missing "else" clause at the end which means that if the mouse is not over a button, it's not clear what it'll set gStatusLineLabel to.

If that's not it, then I have no idea.
#2
There's an error that's been plaguing my game for a while, but I can't get it to happen consistently and I haven't been able to track it down.

The error says "Error: cannot display message with extended characters in SCI font." I'm not using extended characters that I know of. Another thread about the error said that the problem can be caused by using chars as ints, and by trying to display empty strings. I've gone through my game and rooted out the places with empty strings, so I don't know what's causing it.

The problem most often seems to involve the top menu bar, but I'm sure that section of code doesn't have any empty strings.

What should I be looking for? What sections of script should I post that would help?

-Ashera
#3
AGS Games in Production / Re: Elixir Vitae
Sun 17/07/2005 20:53:08
The artist uses Maya for the backdrops and whatnot, and Poser for the people.
#4
I'm using a character as a shadow for the player character, but it flickers when it moves. It seems to be repeatedly switching between the frame it should be on and its "standing" frame. My AGS 2.62 code for the shadow worked without flickering, but when I switched over to 2.7-style code, it stopped working. When I did get the shadow working, it was only with the flickering effect.

Code: ags

function game_start() {
    ...
  
    // Shadow setup
    SetCharacterBaseline(SHADOW, character[EGO].y-1);
    SetCharacterTransparency (SHADOW, 50);
    game.following_room_timer = 1;
    cShadow.LockView(SHADOWTEST);
    
    ...
}


Code: ags

function repeatedly_execute_always()
{
    ...
    // Shadow control
    // Is the player on a walkable area (i.e. in a normal, non-puzzle room)?
    if (GetWalkableAreaAt(cEgo.x, cEgo.y) != 0)
    {
        cShadow.loop = cEgo.loop;
        cShadow.frame = cEgo.frame;
        cShadow.FollowCharacter(cEgo, FOLLOW_EXACTLY,  1);
    }
    else
    {
        // Use transparent loop to hide shadow
        cShadow.loop = 8;
    }
    ...
}
#5
AGS Games in Production / Re: Elixir Vitae
Thu 14/07/2005 06:40:13
Quote from: Disco on Thu 14/07/2005 06:11:13
Intesting concept, and the art is splendid, but-  Is this an AGS game? Just curious, as I know resolution can be that high and you can generate 2d frames from 3d models, but the screenshots carry a certain non-AGS vibe :-\.

It's an AGS game that uses pre-rendered 3D graphics. It's a bit more obvious when playing the game because the character can only face 8 directions and the shadow doesn't change with the room light source. ;) Underneath, it's still all objects, characters, and hotspots.

If I'd had a screenshot with the dialog interface it would have been obviously AGS... I haven't touched it at all.

And thanks for the compliments, guys!
#6
AGS Games in Production / Elixir Vitae
Thu 14/07/2005 05:46:56
The ancients always knew that Elixirs are the key to life. Elixirs can purify air and water, cure disease, and nourish the body. For a long time, only a select few knew the secret of making elixirs from precious orbs. It was a long process, and difficult to master. One day, someone discovered a way to extract the elixir ingredients directly from the orbs. It was easy and quick, although the orbs were destroyed in the process. Orbs were as yet plentiful, so the people embraced the new method whole-heartedly, and abandoned the old.

Centuries later, the world is in a crisis. Orbs are scarce and strictly rationed by the government. You take the role of Rosalind Warrick, a teenager whose parents were involved in elixir research -- and then arrested and imprisoned for "endangering elixir production". To get your parents back, you'll need to follow in their footsteps, and rediscover the ancient method of elixir production.

Some screenshots... (resized from 800x600 to 400x300 to be more web-friendly)

The main interface uses a verb-coin.


There's also a top menu bar with additional options, and a large inventory window with a spiffy scrollbar.


The PDA is an important part of the game. It's used to get from place to place.


The PDA also has a document browser containing bits of backstory and useful information. There's also a photo browser. (The document browser will be revamped to use images instead of text to get around the 200-character string limit, but that's a minor code change.)


The laboratory where your mother works


The museum where your father works


A puzzle where you try to make an elixir from orb gels (most puzzles are done in full-screen mode like this one)


Nobody has been here in a long, long time...



There are two of us working on the game. The other guy does mostly graphics stuff, although he's also done a lot of the walkable areas and scaling. He's also a little more involved in the story and puzzle design. I do interface design and lots and lots of scripting.

This is actually a summer job for me and my co-worker. I've been working on it since mid-May; he's been working since about November. The purpose of the game is to teach a certain aspect of biology using elixir production as a metaphor.

Update 2005-07-17

Unfortunately, the game wasn't finished by Friday afternoon. There was just too much for me to do, and no good way to split up the work. However, we're definitely further along than we used to be.

Story and Puzzles: 92%
Coding: 85%
Graphics: 92%
Sound/Music: 0% (will be included if there's time)

-Ashera
#7
The room file tip will help a lot. Thank you.

And I knew it would be a non-trivial change, I just wanted to put it out there. :)
#8
The Quick Save description says that it saves the work, but doesn't compile a runnable game. The problem is that I need to compile a runnable game in order to make sure my script works.
#9
This is a suggestion which unfortunately would be a major change to the way the engine and compiler work.

Right now, the working game files (e.g. roomxx.crm, ac2game.ags) contain a mix of code and imported graphics/resources. My suggestion is that the code and resources should be separated out so that you can, say, change a room background without having to re-compile the room, or can change a room's script without the engine re-writing the room background to disk.
Additionally, in the compiled game, everything is lumped into one executable. This means that when I change, say, the script header, I have to re-compile the game and re-write all the resources to disk. I'll admit I'm working on a pretty big game. It's at 60 rooms so far, using 800x600 high color resolution, with close to 600 sprites. The compiled exe is nearly 300 MB. Most of the compile time is spent just writing the graphics to disk. (I can tell because one of the longest steps is writing acsprset.spr .)

I've searched the forums but haven't found any mention of this before. It may just be that my search-fu is weak.

-Ashera
#10
AGS supports "properties", which are read-only boolean, integer, or string values associated with game entities. You can create and change them using the "Properties" button in the editor. Properties are shared across all game entities (e.g., both rooms and characters can have the property "room label" even though it only applies to rooms).
In the script, these are accessed using entityName.GetProperty("bool/int property name") and entityName.GetPropertyText("string property name", stringToPutItIn).
#11
The main thing I want is the ability to turn on dialog options in other topics. Have I totally missed the ability to add that? (I've been searching the forums and haven't found it.) Also, turning on objects in rooms. Other than that, there's using thoughts in dialog, which someone else mentioned wanting recently. Basically, wrappers for some normal script functions that not everybody would necessarily want but that make things a bit easier for me.

I don't like using run-script because I have trouble keeping track of all the numbers.  ;D
#12
I know you can write plugins that add new functions to the scripting language, but is there a way to write plugins that add new functions to the dialog scripts? There are a couple of features that would be oh-so-convenient for me...

-Ashera
#13
Okay, ignore the initial toggle active inventory part then. It doesn't fix anything and it doesn't break anything, either. (i.e., it's not causing the problem.)

What happens is that I open the inventory, USE item 20, and the cursor changes to item 20's graphic. Then when I USE item 19, the cursor just changes to item 19's graphic instead of running the interaction.

I decided to add a debug message outputting the value for player.activeinv at each click. At every click (every time I USE an item), it says -1. So it's updating the cursor graphic, but it's not updating player.activeinv . Which is why the script's not doing anything.

Sorry for not being clear. :(
#14
The code is in the "Interact object" section of inventory item #19. It used to be in "Use inventory on object", but it didn't do anything.

The "Toggle active inventory" part was my attempt to fix the -1 problem by manually toggling the item's active status. It didn't work.
#15
I'm trying to do a simple thing where you use one inventory item on another to get a third item.

Code: ags
Display ("On click: %d", player.activeinv);

// Toggle active inventory status
if (player.activeinv < 0)
{
	SetActiveInventory(19);
}
else if (player.activeinv == 19)
{
	SetActiveInventory(-1);
}

Display ("After script: %d", player.activeinv);

if (player.activeinv == 20)
{
	LoseInventory (19);
	LoseInventory (20);
	AddInventory (21);
	SetActiveInventory (21);
	Display ("Put glowies in cup to make glowcup!");
}


The first Display always shows "On click: -1", regardless of whether the cursor appears to have picked up the item or not. The toggle code was my attempt to get around that, but since activeinv always starts at -1 it's not that useful.

I've checked the inventory numbers; they're correct. What might be causing this?
SMF spam blocked by CleanTalk