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

#21
Hi there,

just wanted to contribute something that came to mind when people complained about the color reduction making the picture grainy. In Paintshop Pro you always have the choices of "Error Diffusion" and "Nearest Color" when doing a color reduction. The first option results in a sort of dithered picture and is especially good for gradients, the second option makes a color reduced version of the painting look more like the original picture in the actual game (I tried it out). If you look closely, it produces wider areas of the same color. Sometimes this looks good, sometimes it doesn't. I would decide about that for each screen individually.

Hope this makes sense :)
#22
@ Ashen and TheMagician:

Thanks for your input. That idea of Ashen sounds excellent. Really the best way to sovle this I think... I'll try it out as soon as I have more time at my hand. Right now I need to study for a few exams and then I'll be away for about 2 weeks... We'll see how things go after this :) I am somewhat sad that I can't be spending more time on AGS.

So long!
#23
Critics' Lounge / University Campus BG
Sun 30/01/2005 00:24:39
Hello,

just wanted to hear some comments on the following background. I sketched it on paper first and then drew it in PSP. It's supposed to be some sort of university campus, maybe a few years in the future. I'll add at least 3 more buildings, a lot more plants and some details. Just wanted to hear on how you like it so far. BTW this is my first BG.

#24
Sorry, forgot to mention something about the code:

So far, I have only set the buttons in the inventory to give you the specified item when clicked. However, for combining inventory items I still have to insert some other functions. I need to check whether there's already an active item and if the mode is set accordingly. Then you'd have to call the apropriate interaction for the item. Same thing goes for looking at and/or using the inventory items.

Gets a little complicated all this... Hmm. We'll see..

#25
Hi there guys,

thanks for the great answers so far. So what I basically gather from your answers is that you want the different action modes easily available and that the actions you take on different objects are realistic. As of now I am trying to accomplish all of this the best I can. What do you think of this:


  • Keyboard support, with keys from 1-5 associated with the standard commands, multiple keys possible
  • Mouse wheel support for cycling through the modes (forwards and backwards)
  • The active item is always ready for use, i.e. once you selected something from the inventory you can use it multiple times in a row
  • Right-click opens up an inventory menu which has also buttons for switching modes (for looking at inventory items and performing certain other actions - I wanna keep all options open)
  • Four additional mouse modes available later in the game like teleporting and so on.
  • When the mouse hovers over an interesting item, hotspot or character, a message appears next to the mouse cursor explaining what it is and what action you will perform with it in the current selected mode. That way you can not just "look at keyhole" but rather "peek though keyhole". I have solved this with property values. Anyone wanna have a look at the code, see here: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=6240.0

That's all as far as I have come with scripting and ideas so far. I just tried to collect ideas I liked in adventures I played so far (not that many unfortunately) and wanted to hear what other people especially liked. So keep the answers coming :) Thanks again for the responce so far!
#26
I'm sorry, never played the Discworld series. Could you describe the interface to me a little? I'll try to take a look at Discworld and see what can be done :)
#27
Hi there Magician :)

I'm glad you're interested in the code for this... took me a bit to get it right. You said you already had the cycling working. I'm still going to include the code for they way I managed it here since it's closely linked to the assigning of inventory items. I created a few extra functions to go with this.

Code: ags

// First define some global variables.
int currentitemoffset = 0;
int invbutton1 = 0;
int invbutton2 = 0;
int invbutton3 = 0;
int invbutton4 = 0;

// I use the following function to update the buttonpics and the itemnumbers the
// buttons stand for.

function checkandsetinv (int offset) {
int counter=0;
int counter2=0;
int counter3=0;
string itemname;

 // First off, I see which item is the first one the player already has.

 while (character[EGO].inv[counter] == 0) {counter = counter + 1;}

 counter = counter + offset;Ã,  // The offset is added so I can flip through the inventory.
 
 // I run a check, which of the items in the game the player is already carrying. Then I 
 // set the buttonpics accordingly. The inventory buttons are 2,3,4 and 5. 
 // I currently have 6 inventory items
 
 while (counter3Ã,  <= 3 && counter+counter2 <= 6) {

Ã,  if (character[EGO].inv[counter+counter2] == 1)
Ã,  Ã, {SetButtonPic (INVENTORY, 2 + counter3, 1, GetInvGraphic (counter+counter2));
Ã,  Ã,  GetInvName(counter+counter2, itemname);

// The invbutton-variables carry the values of the items assigned to the buttons.

Ã,  Ã,  if (counter3 == 0) invbutton1 = counter+counter2;
Ã,  Ã,  if (counter3 == 1) invbutton2 = counter+counter2;
Ã,  Ã,  if (counter3 == 2) invbutton3 = counter+counter2;
Ã,  Ã,  if (counter3 == 3) invbutton4 = counter+counter2;
Ã,  Ã,  counter3++;}
Ã,  Ã,  else SetButtonPic (INVENTORY, 2 + counter3, 1, 87); // pic 87 is a blank
Ã,  counter2++;
 }
}

// In the following function I defined a custom inventory-popup.

function show_inventory_window () {
int positionx;
int positiony;
Ã,  
Ã,  if (game.num_inv_items != 0) checkandsetinv (currentitemoffset); <--- Here I call the defined function checkandsetinv
// The currentitemoffset-variable stores the offset so you don't have to cycle through the whole inventory all the time.

Ã,  if (mouse.x - 20 > 240) {positionx = mouse.x - 100;} else {positionx = mouse.x - 20;}
Ã,  if (mouse.y - 20 > 120) {positiony = mouse.y - 100;} else {positiony = mouse.y - 20;}
Ã,  SetGUIPosition (INVENTORY, positionx, positiony);
Ã,  GUIOn (INVENTORY);
Ã,  SetCursorMode (MODE_USE);

}



Ok, after that, insert the following code into the interface_click function:

Code: ags

if (interface == INVENTORY) {

Ã,  Ã,  // They clicked a button on the Inventory GUI.
Ã,  Ã,  // Ok, so, buttons 2 to 5 stand for the inventory. Through the invbutton variables I know what items
Ã,  Ã,  // they are assigned to. Now all I gotta do is set the active inventory to them, set the respective 
Ã,  Ã,  // graphic as the mouse button and change to the USEINV mode.
Ã,  Ã,  
Ã,  Ã,  if (button == 2) {SetActiveInventory (invbutton1);SetMouseCursor (GetInvGraphic(invbutton1));SetCursorMode (MODE_USEINV);}
Ã,  Ã,  if (button == 3) {SetActiveInventory (invbutton2);SetMouseCursor (GetInvGraphic(invbutton2));SetCursorMode (MODE_USEINV);}
Ã,  Ã,  if (button == 4) {SetActiveInventory (invbutton3);SetMouseCursor (GetInvGraphic(invbutton3));SetCursorMode (MODE_USEINV);}
Ã,  Ã,  if (button == 5) {SetActiveInventory (invbutton4);SetMouseCursor (GetInvGraphic(invbutton4));SetCursorMode (MODE_USEINV);}

// The buttons 0 and 1 stand for the arrow keys to change the offset. Now all I gotta do is update the
// inventory items with my checkandsetinv-function.
Ã,  Ã,  
Ã,  Ã,  if (game.num_inv_items != 0) {
Ã,  Ã,  Ã,  if ((button == 0) && (currentitemoffset < game.num_inv_items - 4)) 
Ã,  Ã,  Ã,  Ã,  Ã, {currentitemoffset++; checkandsetinv (currentitemoffset);}Ã,  Ã,  Ã,  Ã, 
Ã,  Ã,  Ã,  if ((button == 1) && (currentitemoffset > 0)) 
Ã,  Ã,  Ã,  Ã,  Ã, {currentitemoffset--; checkandsetinv (currentitemoffset);} 
Ã,  Ã,  Ã,  }
Ã,  }


Hope this is halfway understandable. Looking back now, I sometimes have to think again twice about how I coded all this :D

So long.
#28
Hi there,

I am currently researching for a cool interface. I don't know if I can create something really new, yet what I want is to make it as comfortable as I can. It's gonna be a regular interface with inventory and four mouse modes (as well as about 4 additional modes that will be available later in the game). Yet I want to keep the screen clear as much as I can, thus a static inventory is ruled out.

So, what I'd like to know from you all is: What cool interface functions do you like best? Which game's interface seemed the most perfect and comfortable to you?

Hope you have some cool ideas on your mind :)
thanks

EDIT: Corrected typo in thread title.
#29
Sure I can add some keyboard support.Ã,  How do you feel about assigning the up and down keys to mode cycling and reserve the keys 1,2,3,4 for quick selecting the modes?
Any more suggestions, like inventory-wise and the like?

EDIT:

Opened up a seperate thread for taking this further....
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=18903.0
#30
Hi

So if I understand you correctly you wanna change the player character to another character you click on? That shouldn't be too complicated to accomplish. You could easily do this with running a script when interacting with a character you set up. It would just require a SetPlayerCharacter command like in your script.

The problem with your script is probably that you increase i only if you click beside a character. Is that correct? If so, then you contradict your previous if-statement. Why don't you just set i to GetPlayerAt (mouse.x, mouse.y);  and then call SetPlayerCharacter(i); ?

That would be the easiest solution I can think of if I am understanding what you want to accomplish.

So long.
#31
That's a cool idea, Radiant, never thought of that...

I'm still working on how to set up the interface. I am thinking of something like in "Exile". Mouse options and inventory pop up at the same time. I know that some people don't like having to switch mouse modes like that but I definitely wanted the inventory to pop up with a right mouse click. That kind of disables the cycling of mouse modes since I can't just assign it to the left mouse button. It works but it virtually disables the walk mode since every click on a point that's not a hotspot, an object or a character will trigger a switch so that free walking is impossible. I can't think of a good workaround of this. A possible solution would be being able to switch mouse modes with the mouse wheel - if your mouse has one of course :)

EDIT:

I added a screenshot of a test-room I set up to try out the interface.



P.S.: The solution with the mouse wheels works perfect.
#32
Gee, I'm really sorry that I am not aware that the person who started this thread is now MIA. I should know, I usually always get an updated list of all MIAs and KIAs every day....

And since when does an old thread mean it has been abandoned? I came across it looking for information - maybe someone else, will, too.

#33
Hey Rui,

thanks for mentioning this. Apparently I just made this assumption based on the inventory system I use. I wanted all my inventory items to appear in a half circle. So I created a GUI with serveral buttons aligned that way and I am changing their ButtonPic when cycling through the inventory. (If anyone wants to see how I did the coding for this, reply to this thread and I'll post the script) Because of the way I have arranged this to be done, the items appear in the order of the list I set up in the editor.

Just one question: Since the order in the game does not reflect the order they are set up in the editor, is there maybe a variable I can access - like game.top_inv_item - which gives me the order the items appear in the inventory window?

Since I decided to set the additional options as new cursor modes I will have to do some more coding now but this seems like a much easier task to me :)
#34
Hey,

thanks for the quick reply.Ã,  ;D Fortunately, for the purpose I want, I don't have fiddle around with extra characters. AGS lists the items in the inventory in the order they are set up in the editor. That way I only have to set up the functions I want as the first items on my list and voilà  they'll always be the first items to be displayed.

Alternatively - and that's probably the way I will go - I will set up four new buttons in the inventory menu, which when clicked on will each trigger a new cursor mode I set up for the additional functions. I can make these buttons invisible while they're not yet available and control their function with a global variable which will be 0 as long as the new abilities are still disabled.

I could also change my code the way that cycling through the cursor modes skips these extra modes as long as the global variable is set to 0.Ã,  I prefer the other version though because always having to cycle through so many modes would probably irritate many players in the long run.

But thanks again for your input - i'll save this information in the back of my head, maybe I'll be able to use it for another problem :)
#35
Hello,

I have searched the forums, the BFAQ and the help files for any way to make an idea of mine work but i can't find any solution. I think it's a little more advanced problem. Sorry, if I am wrong about this.

I want - at a certain point of my game - add a few inventory objects to my character's inventory which represent certain special functions he can do then, like teleporting and the like. What I want to do then is reserve the first 4 or so inventory slots for these items, so they always appear there even if they are only added late in the game when the inventory already contains some items. I have been looking at the scripting functions for the inventory and the game overall but i couldn't find any function that would do this or help me with it.

If someone else has an idea or knows a thread which covers this, I'd be very thankful.  :)
#36
Just one question: Why don't you use 3D-Background-Graphics and hand-drawn characters? If they are done fairly well they will certainly fit in. Just a thought  :D
#37
I just wanted to post a little something I put together for my GUI as help for anyone who looks for something like this. I think this post is closest to what I scripted.

I wanted a status line right next to the mousepointer which displays the name of any hotspot, region, character and object. Additionally I wanted it to display any actions you could take interacting with them according to the current mousepointer mode. This way the whole thing would seem more intelligent since the actions you can take would depend on the current object your mouse is pointing at.

First I created a simply GUI called MOUSEDESCR with a width of 320x200. It should be normally visible and non-clickable. I created a text-tag field in this GUI (0).

Next I set up a property value I could use for all kinds of objects, characters etc. I called itÃ, UseInteract and set it as an integer value. Default value is 1. It may require setting up this property for each object according to what you could do with it. For example, I wanted the value 1 to correspond with "Pick up" for any object, thus the setting for everything you can pick up would be 1. The advantage is that you can easily adapt this system to your individual needs.

In the rep-ex part of the global script I scripted the following:

Code: ags

SetGUIObjectPosition(MOUSEDESCR, 0, mouse.x + 5,mouse.y + 5);Ã, 
if (GetCursorMode() == 1)
{
	StrCopy (label_text,"Look at ");

	StrCat (label_text,"@OVERHOTSPOT@");	
Ã,  Ã,  
	if (GetLocationType(mouse.x,mouse.y) != 0)
	{
		SetLabelText(2,0, label_text);
	}
	else 
	{
		SetLabelText(2,0, " ");
	}
}
else if (GetCursorMode() == 4)
{
	GetInvName (character[EGO].activeinv, inv_item);
	StrCopy (label_text,"Use ");
	StrCat (label_text,inv_item);
	StrCat (label_text," with @OVERHOTSPOT@");

	if (GetLocationType(mouse.x,mouse.y) != 0)
	{
		SetLabelText(2,0, label_text);
	}
	else
	{
		SetLabelText(2,0, " ");
	}
}
else if (GetCursorMode() == 2)
{
	if (GetLocationType(mouse.x,mouse.y) != 0)
	{
		if (GetLocationType(mouse.x,mouse.y) == 1)
		{
			currentlocation = GetHotspotAt (mouse.x, mouse.y);
			if (GetHotspotProperty(currentlocation, "UseInteract") == 4)
				InteractText ("Touch");
			if (GetHotspotProperty(currentlocation, "UseInteract") == 1)
				InteractText ("Use");
			if (GetHotspotProperty(currentlocation, "UseInteract") == 2)
				InteractText ("Open");
			if (GetHotspotProperty(currentlocation, "UseInteract") == 3)
				InteractText ("Move");
		}
		else if (GetLocationType(mouse.x,mouse.y) == 2)
		{
			currentlocation = GetCharacterAt (mouse.x, mouse.y);
			if (GetCharacterProperty(currentlocation, "UseInteract") == 1)
				InteractText ("Touch");
			if (GetCharacterProperty(currentlocation, "UseInteract") == 2)
				InteractText ("Push");
			if (GetCharacterProperty(currentlocation, "UseInteract") == 3)
				InteractText ("Pull");
		}
		else if (GetLocationType(mouse.x,mouse.y) == 3)
		{ 
			currentlocation = GetObjectAt (mouse.x, mouse.y);
			if (GetObjectProperty(currentlocation, "UseInteract") == 1)
				InteractText ("Pick up");
			if (GetObjectProperty(currentlocation, "UseInteract") == 2)
				InteractText ("Touch");
			if (GetObjectProperty(currentlocation, "UseInteract") == 3)
				InteractText ("Move");
		}

		SetLabelText(2,0, label_text); 
	}
	else 
	{
		SetLabelText(2,0, " ");
	}
}
else if (GetCursorMode() == 3)
{
	StrCopy (label_text,"Talk to @OVERHOTSPOT@");
	if (GetLocationType(mouse.x,mouse.y) != 0)
	{
		SetLabelText(2,0, label_text);
	}
	else
	{
		SetLabelText(2,0, " ");
	}
}
else
{
	SetLabelText(2,0, "@OVERHOTSPOT");
}


Additionally I had to define the function InteractText and some variables which I did in the global script body:

Code: ags

string inv_item;
string label_text;
int currentlocation;

function InteractText (string action) {
	StrCopy (label_text,action);
	StrCat (label_text, " @OVERHOTSPOT@");Ã, 
}


Hope it was ok to post this here. I'm glad if I could help someone with this!

[edit by scorpiorus to fix width]
SMF spam blocked by CleanTalk