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 - Nine Toes

#1
@Crimson Wizard: Excellent. It works. Thank you.

Code: ags
function youCantTalkToThe(Hotspot* hotSpotRef)
{
  Display("You can't talk to the %s", hotSpotRef.Name);
}

// room script
function hHotspot3_Talk(Hotspot *theHotspot, CursorMode mode)
{
  youCantTalkToThe(theHotspot);
}

I have minimal understanding of C++; my background is mostly web languages. But by placing the asterisk immediately after the data type, I'm essentially saying "get the passed hotspot from the above function"?
#2
This didn't feel like a noobie question.

I'm scripting some simple interactions with hotspots in a room. I'm trying to figure out if there's a way I can dynamically grab some sort of reference to the hotspot in question.

I tried this...
Code: ags
function hHotspot3_Talk(Hotspot *theHotspot, CursorMode mode)
{
  Display("You can't talk to the %s", theHotspot.GetTextProperty("Description"));
}

And this...
Code: ags
function hHotspot3_Talk(Hotspot *theHotspot, CursorMode mode)
{
  Display("You can't talk to the %s", this.GetTextProperty("Description"));
}

Neither work.

And, even though this isn't what I was aiming for, I tried this...
Code: ags
function hHotspot3_Talk(Hotspot *theHotspot, CursorMode mode)
{
  Display("You can't talk to the %s", hHotspot3.GetTextProperty("Description"));
}

This sort of works, but I'm getting an error message that "Description" isn't a property of that hotspot?

I figured, instead of manually typing out in every "silly" interaction, "you can't look at/talk to/open/take the...", that I'd eliminate repeating code and make a couple global functions that I could plug the reference for the hotspot into, and it would deliver the message to the player. Like this:
Code: ags
function youCantTalkToThe(hotspotRef){
  Display("You can't talk to the %s", hotspotRef.GetTextProperty("Description"));
}

// In my room script
function hHotspot3_Talk(Hotspot *theHotspot, CursorMode mode)
{
  youCantTalkToThe(thisHotspotRef);
}

Which would output to the player:
QuoteYou can't talk to the porch.

So what am I doing wrong?
#3
Quote from: Danvzare on Tue 06/05/2025 12:16:08The games he's famous for, is 5 Days a Stranger and its sequels. I've not played them either.
I think he was also the one who made the first episode of Reality On The Norm, although I could be wrong about that.

5 Days a Stranger! I loved that game! I wasn't aware Yahtzee made sequels to it either. I had kind of wished for a sequel to that game for a while. You should really give 5 Days a play. I think it's about an hour long.

Quote from: Danvzare on Tue 06/05/2025 12:16:08I have no idea. I've never loaded up AGS at Christmas.  (laugh)

Yeah, me neither.  :grin:

I think that's one thing I really missed from this place. Cheeky British humor.

Quote from: Danvzare on Tue 06/05/2025 12:16:08I'm pretty sure it's Dave Gilbert. But don't quote me on that. I'm terrible at remembering names.
Also, there's quite a lot of commercially released games made with AGS now. We get a few every year from all sorts of people.  :-D

Okay, I remember him now. Quite the heavy hitter in the game community. I remember, someone - I think it was a guy named Boyd - had a banner, "Dave Gilbert Forever" in his signature.

I'll have to check out Wadjet Eye Games, and a few of these commercially available titles. I guess I never considered that people would still pay for indie adventure games like these. So does that mean some of these games are available on Steam, or even the Google play store? Have adventure games made the move to mobile devices?

Quote from: Danvzare on Tue 06/05/2025 12:16:08Huh, you're right. The manual isn't working. One of us should probably report that.
None the less, you should be able to read the manual that comes with the editor.

Quote from: Crimson Wizard on Tue 06/05/2025 15:41:19I cannot tell which exactly manual is not working, since you did not mention that, but the online manual is available here:
https://adventuregamestudio.github.io/ags-manual/

The manual that comes with the editor doesn't appear to be working. At least for me...



Regardless, @Crimson Wizard, thank you for the links, and nice to meet you. And thank you for taking up the helm to keep AGS alive. Means a lot to an old nerd like me. :thumbs up:

Quote from: Danvzare on Tue 06/05/2025 12:16:08Also I'm surprised no one else has responded here yet.
Maybe they just thought my explanation was good enough.  (laugh)

Could be. Could be any number of reasons.

Part of me was a little worried it would have something to do with my history here. All the years I lurked around on this forum, I didn't really contribute or do anything memorable.

What's more, I was in my mid-twenties. I had a bad attitude, bad temper, and a really unsavory sense of humor. I said a lot of dicey, not-so-nice things to a few people on here, and made a lot of really cringe remarks.

I had started to clean up my act after I became a dad. I even had two games that I was finally making some serious progress on, but then I stopped coming here and unfortunately those projects have been collecting dust since then, being transferred from hard drive to hard drive over the years.

I'm hoping I can bring them out of limbo, is why I inquired about AGS technical developments.
#4
Heyo. Nice to meet you, @Danvzare.

  • I remember RON. Never played any of the games. Or Ben Jordan. Maybe I should finally.
  • Yahtzee... I remember him. He was never really around here much, if I remember correctly. Come to think of it, I don't remember what he was so famous for either... I might have played one of his games. Guess I'll have to check out his YouTube channel.
  • lol I remember the "Make Your Game" button. I hadn't noticed it was gone. Does AGS still have the Christmas Day easter egg at least?
  • As for CJ: I suppose, anyone could have guessed that he wouldn't want to maintain AGS until he was old and grey. For a couple years, I even wondered to myself if AGS was still around or if it had fizzled out into oblivion, considering the availability of other game engines like Unity. But I'm glad to see that he made it open source instead of abandoning it and letting it die. The work he put into AGS and the community it fostered would have been a terrible waste.
  • I never got to meet Icey, but I remember Jodo Kast, Phil Roberts, and a handful of other people that you just couldn't take seriously. (I may or may not have been one of those people myself, but I'm happy to say I'm not the same person I was back then anymore. Or at least I hope.)
  • Wadjet Eye Games... That rings a bell. I don't remember which member here was affiliated with that though. That's pretty cool that they're keeping adventure games alive. I saw an ad on Instagram the other day for a game company that produces old school, point-and-click adventure games "because they want to". I don't remember if it was the same company, but I think that's what made me come back here.

A couple years ago, I randomly came across an interview with a gal named Dragonrose who was a member of this forum. I guess she's some kind of game company director now?

I don't use Facebook anymore, but I was friends with a few people from here. I kept in touch with a guy named Ultimo who rage quit the forums back in the day, and then retaliated by launching a DDOS attack on it. He's doing good. He's married with children now. lol

I think I also remember reading about... Phil Reed, was his name? The creator of Larry Vales? I think I remember seeing him around here too.

I'm getting older and I should just accept that death is an eventual part of life for everyone, but... That was kind of a grim notion that just came to me as I was typing my last comment. I'm a little sentimental about this place, and the people I knew from here, even if I wasn't "friends" with them.

Anyway, I tried reading up on AGS's development over the years in the manual, but it looks like it's not working?... Or is that just me?
#5
Hello.

I used to frequent this forum back in the day; like, 20 years ago. Game dev, like most of my other interests and hobbies, fell to the wayside when I got married, had children, and started working my life away.

My son is an adult now and in his last month of high school. The war ended up never happening, so he never got to lead humanity in the resistance against the machines... (joke. you had to be there.)

So now that I'm going to soon have plenty of free time on my hands, I'm trying to reconnect with things I used to get into. I've still got a handful of unfinished games and ideas that I want to finish stashed away somewhere. I'm wondering if they'll even work on current AGS builds?

Was hoping someone would be kind enough to give me the low-down on everything that has happened with AGS in the last two decades? A link of some sort will do, if it exists. I've popped in here and there over the years, but I haven't kept up with goings-on at all. Another thing is that unfortunately I haven't kept up with technology as much as I would have liked either.

It appears that AGS is now open source? Is that right? lol If so, I remember that being a big April Fool's joke once upon a time.

I was also kind of hoping to find out if anybody from back then is still around? I see AGA, Darth Mandarb, and Gilbot are still here. Looking at the member list, it looks like quite a few people I used to see around have been on in the last couple years at least.

...and it just occurred to me, some of those people may very well have passed away by now...
#6
Ack. My mistake. But I'll look into the wrapper thing. Thanks for trying to help anyhow.
#7
I see there's some recent activity regarding this. I came back to the forums after a very long hiatus, and my issue is that I no longer own a Windows machine, so I'm very interested in the status of this.

What's the long and short of it? Is there a version of the editor that I can use on Yosemite currently?
#8
Thank you, all of you, for your input and advice.

It took me a while, but I finally figured it out.  Khris' advice was what I was looking for.  The equation now looks like this:
Code: ags

MapX = Round(((MouseY - OffsetY) - TileH / 2) / TileH) - ((MouseX - OffsetX) - TileW / 2)) / TileW));
MapY = Round(((MouseY - OffsetY) - TileH / 2) / TileH) + ((MouseX - OffsetX) - TileW / 2)) / TileW));

I swore I had tried countless combinations with the offset coordinates added/subtracted, but I finally found something that worked.

http://www.geiertech.com/etc/isometric/phase_3/index.php It's purty, isn't it? :D

And, Increator:  Yeah, I think I probably did somewhere, now that you mention it.  I've been looking but I haven't found where just yet.
#9
I haven't been back here in a while.  I've been working on this little toy of mine off and on for a few months, and I've finally become kind of frustrated with it.  So, I've returned hoping I could get some more good advice from my old, favorite forum.

I've built an isometric field of tiles using HTML5's canvas.  I won't say I built it all by myself, I had to take some hints from a few different sources - namely, some of the calculation algorithms.  The whole project is a mixture of nostalgia and a desire to understand how isometric games work.

http://www.geiertech.com/etc/isometric/phase_3/

So far, it's working just fine (albeit, a little choppy or sluggish).  The only problem I'm having with it is the translation of the mouse coordinates to map coordinates.  The mouse cursor is drawn on the map, and it does move with the mouse.  But if you click the link and look, you'll see (and mind you, you'll have to keep the mouse arrow over towards the left half of the screen so you can see the tile cursor being drawn on the map) that there is a large gap between the mouse arrow and the tile cursor.

The value missing, I'm positive, is the offset value of the map:
Code: ags

var $Map = {
	offset: [0,0]
}


This value is being set as the distance from the 0,0 coordinates of the canvas to the 0,0 coordinates of the map.

Now, you have the mouse coordinates, which are taken directly from the browser, and any borders, margins, or padding of the page or canvas are subtracted.  Below are the calculations I'm currently using to calculate the map coordinates, in psuedocode:
Code: ags

MapX = Round(((MouseY - (TileH / 2)) / TileH) - ((MouseX - (TileW / 2)) / TileW));
MapY = Round(((MouseY - (TileH / 2)) / TileH) + ((MouseX - (TileW / 2)) / TileW));


I've tried adding/subtracting the offset values in various combinations to the above equations, but it always seems to end up throwing the tile cursor position way off in the Delta Quadrant.

If you need to for whatever reason, here are some key controls:
PgUp = zoom in
PgDn = zoom out
Home = reset zoom to default
X = toggle wireframe mode
Arrow keys = move the map in whichever direction by 1px

You can move the map by left-clicking and dragging.  Click the mouse wheel to center again.

I thought I could get this to work on my own, but I'm ready for some suggestions.  So, any ideas about how to make both cursors line up?
#10
Would it be more efficient to:
A) Have my PHP script draw information from a database every time a user views the web page, or
B) Set up a cron job to run a PHP script that generates an XML document with the appropriate database information every so often, so that the web page can draw it's information from it instead, or
C) There is no difference.

Both the database and the XML document will be stored on the server, along with the PHP script (where it will also be run, before the actual page is delivered to the user), so I'm almost thinking that there is no difference.  But, I'm also trying to keep in mind security (trying to eliminate SQL injection), and for whatever reason, it just seems like bad practice to have a web page query a database every time a user wants to view it, especially if that information only changes once a week.

Thoughts? Ideas?
#11
General Discussion / Re: CSS: "float" issues.
Sun 31/10/2010 18:37:19
Sorry it took me so long to respond.

I see what you mean, I do believe that I came across something online telling me to do that.  I haven't had a chance to implement it yet - I'm actually not looking forward to that, I will have to change that on EVERY single page - but I'll give it a try.

That "float" selector is so funny, you know?  I've used the "overflow:auto;" trick before, and as far as I know, it works great.  Here is another website I did where I used floating images and columns within a DIV set as "overflow:auto;": http://deptcis7.fvtc.edu/120520318/assignments/portfolio/index.htm

See, that works in both IE and Firefox.  No problems with floating elements spilling out onto other DIVs.  I'm trying to figure out what it is that I may be doing differently with my employer's new website.

Quote from: Peder Johnsen on Sat 30/10/2010 02:53:44
Offcourse using a CSS class will probably be better :)

Is this what you mean?:
CSS stylesheet:
Code: ags

.clearer  {clear:both;}

HTML document:
Code: ags

<div id="midcontain">
 <div id="nav">
 ......
 </div>
 
 <div id="content">
 ......
 </div>

 <div class="clearer"></div>  <----- This?
</div>


While I'm at it, I may even be open to trying things differently - a way to do this without the use of floating content.  So far, floats have been nothing but a pain in the rear.  I've got a few ideas, but I'd like to hear if anyone else has any input.
#12
General Discussion / CSS: "float" issues.
Sat 30/10/2010 00:34:44
I'm building the following website for my employer. Something to put in my portfolio: http://www.jgeier-it.com/semester_project/week09/home.php  ...oh yeah, it's also a semester project for two of my classes.

If you view this page in the most current version of Firefox, it looks just fine - minus all of the things I haven't finished working on.

If you view it in Internet Explorer, it doesn't work properly - no big surprise there... You will see that the navigation on the left side of the screen spills over into the footer of the page.

Just to save you some thinking power, I'll explain what's going on behind the scenes on this page: the middle section of the page is a DIV, which contains 2 more DIVs, one for the navigation, which is an element that floats on the left, and the other being the content of the page.

Now, to get the middle section to resize itself to contain all of the floating navigation, or all of the content, should it exceed the height of the navigation, I've tried using the "clear" selector on all three of these elements, but I don't recall it having any effect.  Then I found something online, telling me to use "overflow:auto;" on the middle container itself.  That worked like a charm, and I could have swore I had it working perfectly in IE and FF, but I changed a few things, and somehow I must have cut something important, and now I don't remember what I changed.  :-\ ...yeah, I know... dummy!  Obviously, you can look at the source of the page, and the stylesheet itself for more info.

I'd like to know if anybody else has any ideas to solve the problem?  I'm not gonna go picking anything apart or changing anything until I figure out what I screwed up.
#13
I'm trying to translate this script (ActionScript 2) to ActionScript 3 - which, it seems, is quite a mental workout, especially if you don't know much ActionScript to begin with.

Here is what I have so far (slightly modified):
Code: ags

var tileMap001:Array = new Array();
tileMap001 = [
	[  0,   0,   0,   0,   0,   0,   0,   0,   0,  0],
	[  0, 101, 101, 101, 101, 101, 101, 101, 101,  0],
   	[  0, 101, 101, 101, 101, 101, 101, 101, 101,  0],
	[  0, 101, 101,   0, 101, 101, 101, 101, 101,  0],
	[  0, 101, 101, 101, 101, 101, 101, 101, 101,  0],
	[  0, 101, 101, 101, 101, 101, 101, 101, 101,  0],
	[  0, 101, 101, 101, 101, 101,   0, 101, 101,  0],
	[  0, 101, 101, 101, 101, 101, 101, 101, 101,  0],
	[  0, 101, 101, 101, 101, 101, 101, 101, 101,  0],
	[  0,   0,   0,   0,   0,   0,   0,   0,   0,  0]
	];

var game = {tileW:32, tileH:32};
game.Tile1 = function(){};
game.Tile1.prototype.walkable = false;
game.Tile1.prototype.frame = 1;
game.Tile101 = function(){};
game.Tile101.prototype.walkable = true;
game.Tile101.prototype.frame = 101;

var tileSet001:mcTileSet001 = new mcTileSet001();

function buildMap(map:Array, tileSet:MovieClip){
	var emptyField:mcEmptyField = new mcEmptyField();
	this.addChild(emptyField);
	game.clip = this.emptyField;
	var mapWidth:Number = map[0].length;
	var mapHeight:Number = map.length;
	for (var i = 0; i < mapHeight; ++i){
		for (var j = 0; j < mapWidth; ++j){
			var tileID:String = new String();
			tileID = "tile_" + i.toString() + "_" + j.toString();
			trace("TileID '" + tileID + "' created."); //for debugging purposes
			
			// ...I've narrowed the problem down to the next 5 lines of code... 
                        // ...everything else works just fine until you remove the comment block from the next line only...
			/*game[tileID] = new game["Tile"+map[i][j]];
			game.clip.addChild(tileSet);
			game.clip[tileID].x = (j * game.tileW);
			game.clip[tileID].y = (i * game.tileH);
			game.clip[tileID].gotoAndStop(game[tileID].frame);*/
		}
	}
}

buildMap(tileMap001, tileSet001);
stop();


If I uncomment just the first line of that block of code, I get an error in the output:
TileID 'tile_0_0' created.
TypeError: Error #1007: Instantiation attempted on a non-constructor.
   at flashisogame_fla::MainTimeline/buildMap()
   at flashisogame_fla::MainTimeline/frame2()
   at flash.display::MovieClip/gotoAndStop()
   at flashisogame_fla::MainTimeline/startGame()


Most of what I've translated, I learned all on my own through research and trial and error.  It's just that one little block; I wouldn't even know what to search for.  I know it works perfectly in AS2, but I'm learning, and I'm trying to keep it current.  The ActionScript part of my Flash class only covers the basics.

I'm pretty sure I shouldn't be using "game" or "game.clip" like an array... but I just don't know why, or how it can be fixed.

So, I was wondering if someone could kind of explain to me what is going on there, and toss me a few hints as to how it should be scripted?
#14
Hey, I saw that guitar video once before; I thought it was pretty bad ass, even though he's acting like a complete doofus.

As for the other video, maybe it gets a lot of hits because he's "purty".
#15
Quote from: Mr Matti on Fri 26/06/2009 04:00:52
Hm.. are you guys okay?  ... it seems you've some kinda problem with idolizing random people and with mourning too... no offense.

For starters, Michael Jackson was not just some random person.  He was a huge celebrity.  So what if no one here knew him personally.  He wrote a lot of great music that many of us grew up with.  The things he acheived with his music are things that most musicians can only dream of accomplishing.  He wrote chart-topping albums, one of which, Thriller, remained the number one selling album of all time for quite a while, and nearly every song on that album was a number one hit.  Can you really blame people for idolizing him?

Second, I don't know if you've actually been following the purpose of this thread, but HE'S DEAD.  People mourn when somebody dies.  Right?...
#16
I was kind of shocked to hear this.  This morning the buzz at school was Farrah Fawcet (sp?), then later on, I saw something on the tv at school.  I could only read the news banner, but it said he was hospitalized.  I didn't know he actually died until a few minutes ago.

It's really a pity.  He was an amazing musician, but he was also the butt of so many jokes.  It's like they say, it's the oddballs that are really the most brilliant.
#17
Snarky; I plugged your script into mine, and it works fantastic.  Thank you very much.  I haven't experienced any slowdown at all (the array isn't actually that big... yet).  At first, I was going to make one array for the men, and one for the women to keep everything simple, however the reason why I didn't decide to go that route is because... well, there's a possibility that some of the men could turn into women. (Don't ask. :p)

KhrisMUC; I didn't try your script because I didn't understand it - in the first line, is "int pick_gender();" supposed to "function pick_gender();"?  Also, instead of changing the struct member from ".gender" to ".male", I just did this:
Code: ags

#define MALE 1
#define FEMALE 0

people[cJohn.ID].gender = MALE;
people[cMary.ID].gender = FEMALE;
#18
I'm looking for some help with how to script something - I've looked through the manual, but I'm not even sure AGS has a command for something like this.  I'm not even sure how to properly explain what I'm trying to do, but...

I've got a struct+array of variables.  Like this, for example:
Code: ags

struct Characteristics {
  bool gender; //"0" or "false" for female, "1" or "true" for male
  //etc... (the rest of the variables aren't important)
};

Characteristics people[100];


Then I use this struct+array in conjunction with all of the characters in the game:
Code: ags

function game start {
people[cJohn.ID].gender = true;
people[cMary.ID].gender = false;
people[cJennifer.ID].gender = false;
people[cMathew.ID].gender = true;
people[cDavid.ID].gender = true;
// etc...
}

You get the idea, right?

Now, I'm trying to script a function that will cycle through all of those variables, and pick out only one that meets a certain condition, something like this:
Code: ags

function pick_a_female (int random_character) {
  if (people[random_character].gender != false) {
    random_character = Random(99);
  }
}


Then I would use the function like this:
Code: ags

Character[pick_a_female(Random(99))].changeroom(2, 200, 200);

So, as you see, if the function doesn't at first pick a "female" character, then it will cycle through it again once more to try and find another character that is "female".

I'm pretty sure this script would work for the most part.  However, what if (by luck of the draw) the function picks a  "male"? (Lets say that out of the 100 characters in the game, only 25 of them are female.)  I could pop a few more "if" statements into the function to avoid that, but I'm looking for a way to keep the script to a minimum, in addition to looking for a definitive way to pick out the right variable.  I've had a quite long break from AGS, so my scripting skills have atrophied some - If anyone has a better idea how to do this, I'd like to hear it.

Any ideas?
#19
I tried drawing a background in MSPaint, 5760px x 5760px*.  It really bogged my computer down.  I was wondering what is the limit as to what dimensions a room's background can be?

I did a little bit of digging, and I found this old thread.

Also, I came across this as well:
Quote from: AGS Wiki: Tidbits and Snippets
CJ: The maximum room height is 1400 pixels (at 320x200 resolution - you could have a 2800-tall 640x400 room).

    I asked CJ for clarification:

CJ: The pathfinder uses an 1400-sized array for storing potential routes, and there's one row for each line.

    That means in 320x200 and 320x240 the maximum room background height is 1400 pixels, in 640x400, 640x480 and 800x600 it's 2800 pixels. In theory, there's no width limit.

However, the reason why I bring up this question, is because it's been quite a few years since that thread was posted, and AGS has gone through several upgrades since then, notably, the implementation of native coordinates.

Has this changed since AGS~2003, or is the background height limit still 1400px for 320x200 res (2800px for 640x400 res)?

*Just so you know: I don't actually need a background that big, I was just experimenting, and would like to know what my limits are.
#20
Quote from: Pumaman on Sun 10/05/2009 22:46:07
You can't use Room.GetDrawingSurfaceForBackground() in game_start, because no room is loaded so there is no background to draw onto.

*laughs*  Yeah, I suppose.  Wow, I'm a dummy. :P

I will try KhrisMUC's solution.
SMF spam blocked by CleanTalk