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

Topics - Recluse

#1
I know this has been brought up before, but I'd like to bring it up again, because I don't see a viable work around.

In a game I'm working on, I need to be able to switch each room background between a total of _nine_ different images. Each one needs to be entirely different. Before anyone says anything, no, this isn't for an animation, I can't use objects, unless you suggest I use an object the size of the entire screen... Which is doable... Basically, there's a state-based system through which the room backgrounds need to be able to change, based on the value of a variable, which should be mutable at run-time.

The entire crux of my post is to ask Pumaman what purpose limiting the amount of backgrounds serves... I'm assuming it's a memory allocation issue, but it seems to me that it should have been made dynamic long ago.

Assuming that the 5 frame limit isn't going to be changed, I was curious as to any workarounds anyone might be able to suggest... I had thought of having more than one room per room.... but then things could easily get tricky. Please reply with any suggestions you may have. I had looked into the DynamicSprite functions, but I'm not up to date on their proper usage... can Dynamic Sprites be used to replace room backgrounds? If so, they may be a possible answer to my problem.
#2
I'm having algorithm issues.... I think... It's the only reason I didn't stick this in the beginner's board.

I'm trying to make a ticker on the dashboard to show the players "speed". It's entirely behind the scenes, but the number should gradually get higher as the player continues to walk... Here's what I have currently, it outputs to a GUI.

Code: ags
int WalkSpeed = 0;

function repeatedly_execute()
{
  if(player.Moving == true){
    while(IsTimerExpired(1) && WalkSpeed < 8)
    {
      WalkSpeed++;
      lblCurrSpeed.Text = String.Format("Current Speed: %d", WalkSpeed);
    }
    if(IsTimerExpired(1))
      SetTimer(1, 10);
  }
  else{
    while(IsTimerExpired(1) && WalkSpeed > 0)
    {
      WalkSpeed--;
      lblCurrSpeed.Text = String.Format("Current Speed: %d", WalkSpeed);
    }
    if(IsTimerExpired(1))
      SetTimer(1, 10);
  }
}
#3
I've defined a dynamic array in my global header, expecting it to be available everywhere. Instead, I seem to be having issues.

When I go to access the array from a global function (GameStart) it runs perfectly... my pointer works just as it should be. When I access the array from a room function, (a hotspot action) it tells me I'm accessing a null pointer. Could this be because the array is resetting itself each time the global header is run (and thus every time a new room is loaded)? If so, how could I go about declaring and initializing the dynamic array without resetting it each time I load my header?

I would include code, but it's scattered about 4-5 files... let me know if you need it.
#4
Alright, I've recently come across a new keyword "managed" in my dealings with AGS scripts. It's killing me.

I've tried two different sets of code, neither one will work. I know it's entirely possible to do this in other languages, and It's even mentioned in the AGS help files, so I know it's possible. I'm just doing something horribly horribly wrong.

Here's my code:

Code: ags
struct door{
  Object* DoorObject;
  int WalkToX;
  int WalkToY;
  int ToRoomID;
  int ToRoomX;
  int ToRoomY;
};

door Doors[25]; // array to store door objects in 
int TotalDoors = 0; // index for the array


function CreateDoor(this Object*, int WalkToX, int WalkToY, int ToRoomID, int ToRoomX, int ToRoomY)
{
  door Door;
  Doors[TotalDoors] = Door;
}


I get an error with the above code that tells me me that I can't assign a door struct to the Doors[] array.

That's all well and good, so I change the array to deal with pointers. Changes are highlighted in bold.

Code: ags
managed struct door{
  Object* DoorObject;
  int WalkToX;
  int WalkToY;
  int ToRoomID;
  int ToRoomX;
  int ToRoomY;
};

door* Doors[25]; // array to store door objects in 
int TotalDoors = 0; // index for the array

function CreateDoor(this Object*, int WalkToX, int WalkToY, int ToRoomID, int ToRoomX, int ToRoomY)
{
  door Door;
  Doors[TotalDoors] = &Door;
}
}


And that tells me that I can't "declare a local instance of a managed type".

I've tried inserting the "new" operator in the CreateDoor(params) function.

Code: ags
I replace:

door Door;

with:

door* Door = new door;


and it acts like it's never seen the new operator before.

Somebody help!  :'(
#5
Is there any particular reason why this won't work?

Code: ags

function (Object* object, String str){
this.Name = str; // EDIT, used to read object.Name = str;
}


It's telling me that it can't access object.Name since it's a private member variable.

What's the point of having extendable functions if we can't access private variables? I really don't want to hack around this one, since I would absolutely HATE to have to create code that's more complex than neccesary. Is there any way to access this member variable, or am I just doing it wrong?
#6
I've just finished this background and I'm having some issues with the way the couches look. I believe I managed to capture the general IDEA of a couch... but it's lacking substance...



I think this is mostly a perspective issue. Here's the ENTIRE couch, on it's own layer.



Feel free to do some paint overs. I'm aware the shading is odd, but this is the kind of style I'm attempting to include in my game.
#7
Alright, I've got some card locks in my game and I'd like to be able to have the game post a message if the player uses the wrong keycard. But I'm completely against having to go back in and change the room script every time I add a different keycard object.

Is it possible to declare an array of objects in AGS? I've noticed that "object" isn't a blue keyword, and that the help file does NOT define object as a data type. Is there a way around this limitation, and if not, is it in AGS 2.8?
#8
Alright... this one's bugging me.

I'm trying to declare two variables at the top of a room script... basically I see no reason to clutter up my Global Script when the Room is going to be the ONLY entity using the variable.

I really don't want to use GraphicalVariables... since those bother the heck out of me (Why use a function to get/set when there's perfectly good, simple code to use)

I've almost got it working... but for some reason the game hangs after the following script executes...

Code: ags

// room script file

bool terminalOn = true;
bool spectrometerOpen = false;

export terminalOn, spectrometerOpen;

#sectionstart room_b  // DO NOT EDIT OR REMOVE THIS LINE
function room_b() {
  // script for Room: Player enters room (before fadein)
	oTerminal.SetView(10);
	if(terminalOn == false)
		oTerminal.SetView(10, 1);
	
	oScreen.SetView(10, 3);
	oDock.SetView(10, 7);
	oDoor01.SetView(11, 0);
	
	if(day1VisitedMeetingRoom == true)
	{
	  if(day1HasKeycard == true)
			oKeycard.Visible = false;
		cEgo.FaceLocation(cEgo.x + 10, cEgo.y);
	}
	else
		cEgo.FaceLocation(cEgo.x,  cEgo.y - 10);

}
#sectionend room_b  // DO NOT EDIT OR REMOVE THIS LINE

#sectionstart room_a  // DO NOT EDIT OR REMOVE THIS LINE
function room_a() {
  // script for Room: First time player enters room  
  if(isChemist == true)
  {
		oTerminal.Animate(0, 10, eRepeat, eNoBlock);
		Wait(120);
		// *** Play the comlink sound ***
		String nameComeIn = ", come in.";
		cCaptain.SayAt(35, 90, 250, cEgo.Name.Append(nameComeIn));
		cEgo.FaceLocation(103, 173);
		cEgo.Say("Yes, Captain Jaggers?");
		cCaptain.SayAt(35, 90, 250, "What's your current status?");
		cEgo.Say("Good Captain, I'm just wrapping up my daily logs.");
		cCaptain.SayAt(35, 90, 250, "Good, meet me in the meeting room, I've got something important we need to discuss.");
		cEgo.Say("Yes sir.");
		cCaptain.SayAt(35, 90, 250, "I'll see you in five minutes.");
		cCaptain.SayAt(35, 90, 250, "Jaggers out.");
		Wait(20);
		cEgo.Say("I'm going to need to turn off my terminal and get my keycard from the desk before I head to the meeting room.");
	}  
}


Could someone help me out here? If I can't do this and I should just place them in the Global Script... can you tell me why?
#9
I'm curious, because I've just signed up a team member for my project. How do the rest of you collaborate with your team members? I'm currently using a PBWiki/Chat interface, but this doesn't allow many members to actually work on the same game files. I'm looking for suggestions as to how the rest of you work on the same game, do you host all the game files on a server, and download and edit them. Or do you piece up the game and have someone put it all together?

It's a little difficult to get things like this done over the internet, I know that some of you communicate in person. But unfortunately no one I know is terribly interested in my project.

Any suggestions or stories about what you've done in the past would be welcome.
#10
AGS Games in Production / The Mars Initiative
Sat 28/07/2007 20:12:08
CURRENT PROGRESS:

Version Number - ALPHA v0.06


  • Graphics - 80%
  • Storyboarding - 70%
  • Scripting - 20%
  • Music/Sound - 5%
  • Programming - 10%
STORYLINE:

"The Earth is dying, and we don't know why. We speculate that the decay of the moon's orbit, combined with the cooling of the Earth's core has caused the recent catastrophes. Daily Earthquakes rock cities along the Pacific; Hurricanes pummel the coast of the Atlantic. A gigantic volcanic mountain range has risen up in the Pacific Ocean. Sea levels are rising, sending most of Earth's coastal population toward higher land, where tornadoes wreak havoc. At this point in history, there are two major world alliances. The Elected Imperium and The World's Union. Within the last fifty years both have poured all their resources into constructing biodomes on Mars for Earth's remaining population. In a massive international effort called “The Mars Initiative” both have created and maintained a space station designed for monitoring the construction of the biodomes. By 2524, the biodome capacity is two billion, only a fifth of the population of Earth. Lotteries are held on Earth to determine who will be able to populate a habitable Mars."

You are an Imperial scientist on board the International Space Station "Hope" working on The Mars Initiative. Tensions between The Elected Imperium and The World's Union have come to a head. The Elected Imperium has declared war on The World's Union. Caught in a moral conflict, the Imperials are expected to cope with the suspicious death of their captain while caring for the victim of a near-fatal radioactive accident involving one of their supposed enemies.

CURRENT FEATURES:


  • Four playable avatars!
  • Choose your character's occupation and attributes to affect the way you play!
  • Explore a twenty-sixth century space station!
  • Interact with stimulating characters!
  • Uncover Conspiracies!
  • Play through many possible endings!
SCREENSHOTS:


Opening Splash Screen for the Demo.


The Chem Lab. (With NEW shading by Cinfa)


The Meeting Room, during a riveting scene.


The Engineering Station, with pretty colors and lights.


CURRENT PROJECT MEMBERS:

Recluse - Project Manager, Lead Programmer, Lead Writer, Musician
ShadeJackrabbit - Programmer, Writer, Lead Sound Effects
Cinfa - Lead Artist


DEV JOURNAL:

August 6th 2007
As of right now The Mars Initiative is in Alpha. We are currently working on completing all necessary backgrounds and character animations to release a working demo. Programming is coming along smoothly, and we expect that the demo will be released some time in after September, barring any serious problems.


August 13th 2007
We are almost through with all the backgrounds (Only 1 Left!). The character animations are also completed to the point that all the characters can be created and displayed walking around. Now all that's left is to finish the programming (hard part) and get this demo ready to go!

August 19th 2007
Decided to go back in and work on some of the backgrounds some more, fixing perspective, that sort of thing. One of the first encounters is completed, about six more (along with a few cut scenes) and day 1 will be completed. After day 1 and the first part of day 2 are complete the demo should be ready. I'm on vacation this week, so I should be able to get a LOT of stuff done for the game.

September 7th 2007
We are currently looking for a talented Artist who would enjoy working on this project. WE ARE looking for someone with experience, though their style doesn't necessarily have to be complex or realistic. We are looking to keep the graphics for this game relatively simple and "old" looking. Any applicants need to be willing to take this project all the way through to completion, and enjoy doing it.

In other news, production is coming along smoothly, we may not make the September release date, but that's okay, because I would like for the demo to be as complete a picture of the way the finished product will look as possible.

September 19th 2007
We've got our artist, Cinfa. So we now officially have an Italian, a Texan, and a Canadian working on this game. (Sounds like a bad joke, right?). Cinfa is proving to be amazing, he's already completed several full 3d animations for cutscenes, which will DEFINITELY make it into the final product. I'm absolutely thrilled with his involvement. Right now we're working on finishing the graphics stage of production, after which we'll plow right into the programming stage. I've got the storyboard almost completely done, all that's left is some minor details on the very last scene. Other than that, things are working out beautifully.

And a demo won't probably be ready until sometime next year. But this is turning out to be a high quality game, and I plan on keeping it that way. School is bogging all of us down, but that's expected, pretty much all of our free time is devoted to the project, so rest assured, we're going as fast as we can.

#11
I'm currently working on a function that will clean up my cut scene scripts tremendously. However I'm running into a problem.

In it's simplest form, I want my function to look like this:

Code: ags

function sayHeadLeft(String str) {
	  this.FaceLocation(this.x - 10,  this.y, eBlock);
	  this.Say("%s", str);
	  this.LockViewFrame(this.View, 4, 0);
	}


I want this function to be able to be called BY a character. Like so:

Code: ags

cEgo.sayHeadLeft("Hello, I am speaking to you as my head turns to the left while my body faces forward.");


However, AGS doesn't seem to recognize the "this" keyword. In the script it turns up blue... but when I go to compile, I get an error saying that "this" is an undefined token.

Does this function need to be defined from within a struct? And if so, how do I stick it inside the character struct?

P.S. Doing a search for "this" is generally useless  :-\
#12
Critics' Lounge / Making Baldy Look Bald
Thu 26/07/2007 23:29:44
I'm having a difficult time getting my bald African-American character to look anything like a bald man.

Here's what I've got so far...



I'm having troubles with the head, as you can see... What I have currently is an alternative to the single-shade head, which simply looks like way too much space.

Does anyone have any suggestions on how I could get a really smashing looking bald head in the very very small amount of pixels I have?
#13
Somehow I'm having an issue with the color of my character's text color.

I'm currently running the current script:

Code: ags

function object1_a() {
  // script for Object 1 (Screen): Look at object
  cEgo.Walk(206, 156, eBlock);
  cEgo.FaceLocation(cEgo.x, cEgo.y + 10, eBlock);
  if(Properties.GetPropertyAsBoolean(eProperties_Character, 0, "isChemist") == true)
		cEgo.Say("It's the display for the Spectrometer.");
	else
		cEgo.Say("It's the display for something that's beyond my field of expertise.");
}


Whenever the text "expertise" displays over my characters head. A portion of it will appear to be transparent like so:



This is also happening with a different script when my character says the word "expertise". So far this hasn't happened on any other character.Say commands I've been using.

For the life of me I can't figure out WHY this is happening. I'm rather new to AGS scripting, but not to coding in general, so lay it on me in all it's glory. ;D

This isn't exactly a humongous issue at this stage in development... I just thought I'd post it here so I could get a response now rather than later.


PS: I wasn't sure whether this belonged in Beginners Technical Questions or Technical Issues. Since it seemed to be strictly AGS-related and not a complex coding question I figured I'd post it here.
#14
General Discussion / Free Project Hosting
Wed 04/07/2007 18:19:04
I'm wondering whether anyone knows of a good solid, free Project Hosting site that I could use. I'm not looking for Open Source since I'm using AGS, but I still require internet space with which to collaborate with a friend. I've already looked into SourceForge and decided they're not for me. I've got something on GoogleCode, but I'm wondering how well it works.

For the moment, a friend and I are collaborating via e-mail, however it's difficult to edit the same document via e-mail... so I'm basically wondering if there's a way I could find a place that'd host my files, possibly in a Wiki format, along with pertinent images and such.

If there's password protection or something of the sort, that'd be great too...
SMF spam blocked by CleanTalk