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 - Mantra of Doom

#1
In the manual for RunAGSGame, it has the code of

Code: ags
RunAGSGame ("MyGame.exe", 0, 51);


Where the last number is the int data where I can pass an in to the new game.

What confuses me is what exactly does the int data come from? Do I make an int in the new game and pass that 51 into it at the start of the game? Where does 51 come from and where do I put it once I have it?

I think I'm confusing myself just a little. I'm not to the part where I have to code this, I'm still in the planning phase and trying to think ahead a bit as to how I'm going to do certain parts of the game.
#2
Hello all. I'm working on a text parser game where the player character is a remotely controlled robot. This little robot has the ability to do a general scan of the room and can easily find the objects and hotspots that it can interact with.

Here's an example, done in photoshop that demonstrates what I'd like to do:

Before scan effect


Scan effect last for a brief time and then shuts off


I'm just not sure where to start. I thought about swapping object images when the effect is on, but I don't think that'd really be the best way to do it. If anybody has any ideas on a direction for this, I'm willing to listen.

And, of course, I'll post my code in case anyone else might want it.

Thanks in advance!
#3
Beginners' Technical Questions / parser words
Thu 13/08/2009 14:57:03
Is there any way to export the text parser list into another game? I can't see any options for this at all, but I suppose it doesn't hurt to ask. I spent a lot of time typing out synonyms and accidentally put them into the wrong game... whoops...

It isn't a big deal, but something I was wondering about.
#4
General Discussion / A Linux Experiment
Fri 24/04/2009 17:55:11
Hello all,

Recently, my fiancee challenged me to use Linux for two weeks... and for those two weeks, my harddrive with all its windows and all my cool junk will be hidden and I have to start fresh with a clean install of Fedora.

Now I know I can't work on the actual scripting of my game during this time, but I can still do the graphics... so what I'm asking is what sort of pixel-friendly programs are out there for linux?

I know I could probably get photoshop running under wine, but that might be a bit complex on the first day. What about other programs that are useful? Something like outlook express/windows mail?

Any tips or suggestions you guys can give me would be appreciated... I hope this little challenge won't end up with someone crying... though it would either be me crying or my fiancee after I beat him up to get my windows back...
#5
Critics' Lounge / Shading and anatomy
Sat 11/04/2009 19:00:42
Hello all, I took a break from my game and now that I'm going back into it, I find that I really could improve the graphics with better shading and coloring. I'd like to get some opinions on my character and a background.. Any shading advice and coloring tips are appreciated. Also, feel free to chime in with anatomical or perspective tips as well. I haven't really been drawing in a while and I'm a bit rusty.

Some of you might remember me posting this character with different clothing. Well, this is the outfit she starts out in. A sweater with a hood (the dark parts on the elbows are patches, the dark bits on the front are pockets) and sort of flair legged jeans. Also, she's a vampire, but she's not a very good one.



This is just outside the vampire king's castle. When our hero above first gets here, there's a large thug standing in the doorway. Once the thug leaves, it becomes the entrance to the castle proper. I know it looks flat in some areas and kind of weird in others. The black parts are where the GUI goes. Any suggestions are welcome.

#6
In my game, I have a character that can turn "invisible". The sequence that should happen when a button is clicked is that a short animation should play and the character should quickly fade to be semi-transparent. The problem is though that I'm not quite sure how to fade the character to 50%. The code in the manual (below) just makes the character stand there for 3 seconds and then disappears. I'm not sure how to change this code to suit my needs when this doesn't really work.

Code: ags

int trans = cEgo.Transparency;
while (trans < 100) {
  trans++;
  cEgo.Transparency = trans;
  Wait(1);
}


I also even set the button's OnClick to
Code: ags

cEgo.Transparency=50;


But clicking on the button does nothing, though setting the value to 100 makes the character disappear. I know I'm missing something simple... but I can't work out what. Any help would be appreciated.
#7
Hello everyone. I've been working on a little hint system code, so that if a player chooses, they can get in-game help if they get stuck. I always liked the hint guide that came with Sam & Max Hit the Road... the first line gives you a clue, then it goes more specific.

Here's my code so far. I'm using the score to keep track of the progress of the player's action. I know that I'm going about this the hard way. As of right now, the gui has text boxes that the strings populate. If the text is too long though, it will not wrap into the box and if the text is wider than the gui, it'll just not populate at all.

Any ideas how I can clean this up or at least add text wrapping?

Code: ags

//First Hint
function btnHint1_OnClick(GUIControl *control, MouseButton button)
{
  if (game.score==0) //vague hint
  {
    if (button != eMouseLeft) return;  // only react to left-clicks
  String hint1aString = txtHint1.Text;
  txtHint1.Text = String.Format("Vague Hint");
  }
 //other points follow with similar code for the first line of hints.
}
  
 //Second Hint
function btnHint2_OnClick(GUIControl *control, MouseButton button)
{
   if (game.score==0) //more specific
  {
    if (button != eMouseLeft) return;  // only react to left-clicks
  String hint2aString = txtHint2.Text;
  txtHint1.Text = String.Format("More specific");
  }
}
  
  //Third Hint
function btnHint3_OnClick(GUIControl *control, MouseButton button)
{
  if (game.score==0) //give the answer away
  {
    if (button != eMouseLeft) return;  // only react to left-clicks
  String hint3aString = txtHint3.Text;
  txtHint1.Text = String.Format("I'm just giving you the answer.");
  }
}
#8
Okay Guys, since I haven't heard anything bad from my beta testers this time around, I've decided to go ahead and release my game.

Murphy's Salvage

"Whatever can go wrong will go wrong, and at the worst possible time, in the worst possible way" - Murphy's Law

In a world where most of the human race has nearly been obliterated in a large and silly accident. The accident was, in fact, the invention of the “green” energy source... which prompted a fleet of angry aliens to attack the planet because the Substance 42 (low fat yogurt, used french fry oil and helium mixture) was a sacred sign for them to launch a fleet of land developers. The remaining humans and the Robot Nation have formed under the unified motto of “that really sucked”. Now the humans serve the robots in the Engineering Corps... doing most of the manual labor.

Several groups of Human Rights activists want to change the way things are... Humans will not be second class citizens forever! Though luckily some humans got out of the Corps and have turned to Scrapper Companies... junk collection services and garbage sellers. Some robots join with them during their “rebellious teen years”.

Murphy's Salvage is one of the largest mostly-human salvage operations in Earthspace. Murphy personally owns a fleet of ships with highly skilled crews... but we're not talking about them. Meet the crew of ship 0096632-B or as the crew calls it, the "But her".
Mission 01: Just My Luck

But enough background! This is about one day in the life of Wombat Rowe, a scrapper that just wants to get paid. Apparently that is just too much to ask when you're three weeks into a mission on a Screaming Metal Deathtrap out in the Middle of Nowthere Nebula. But Wombat is a resourceful girl... she can get through, right?

Get it Here!

EDIT: New version up.
*Fixed - The walking dead has been addressed. Please let me know if the rats give you any more issues
*Fixed - When an inventory item is active, right clicking will make the cursor go back to normal
*Fixed - "Eric" no longer appears as a hotspot underneath Del's console when you walk on the bridge.
*Fixed - The Suck button has been removed, as well as the cursor change when using the rat sucker.
*Fixed - You cannot use the RatSucker if you are not holding it. Logically this makes more sense.
*Fixed - You can keep the RatSucker until the end of the game, it no longer disappears from the inventory.
*Fixed - After the credits run, the game resets.

EDIT: I'd like to thank Leon and Brentimous for the final testing. Couldn't have done it without you!
*Fixed - The major suckiness of the Rat Sucking has been addressed and it works now.
*Fixed - Character interactions with inventory items actually work now.
*Fixed - Keyboard shortcut keys bring up the custom guis instead of the default ones.
*Fixed - F7 load screen will populate now.
*Fixed - The Hint system now syncs up with the game.
*Fixed - Other minor incidental things...


#9
I think I need some expert help here. I'm using AGS 3.0 and I'm trying to queue up some music to start during a cutscene. The song that starts in the cutscene is called Music5.mid. It should play once and then go back into the normal music called Music4.mid which will play until an action sequence later in the game.

It seems like I'm doing this right, and this works flawlessly in an earlier part of the game, but in this bit, as soon as the cutscene starts, Music5 is skipped and it goes back to Music4.

Code: ags

    StopMusic(); //stops current music
    PlayMusic(5); //starts's the Date Theme
    SetMusicRepeat(1); //loop the Explore music
    PlayMusicQueued(4); //plays the Explore music


I've tried several variations, and the only way I got this to work is to comment out the playing the explore music... but that would leave silence if the player didn't know where they were supposed to go and didn't get to the next part before the song ended.

Any ideas?
#10
Critics' Lounge / Random Character Design
Fri 17/10/2008 02:37:19
I started toying with some ideas for my next game and thought that I might try to toy with a higher res such as 800 by 600. Now, this isn't my final decision, but I just want to see how well I can do bigger characters with a pixel style.

I know she's insanely pale, but that's because she's a vampire. And yes, I do realize that I somehow only draw redheads, but color of hair can change later if I decide to continue on with this type of style.




Anyway, let me know what you think!
#11
I have this interaction code to almost work... and I've been beating my head against a wall for a week trying to straightening this out. I've cut it down to basic elements and it still doesn't seem to work exactly right. I was just wondering if somebody could tell me how to clean it up... or just tell me what I'm doing wrong.

The scenario: The player has to use a vacuum to get a rodent out of a hole in the wall (yes, I know, cliche but it works for what I need it for). The vacuum is an inventory item (once the item is collected the view will change with the character holding the thing, but that's a different code that does work.) and the hole is a hotspot. When the item is clicked on the hotspot, the little rat appears, gets sucked into the vacuum and disappears and a bag that the character is holding contains 1 rat. This is done three times, but I want the player to have a choice in what hole you can start on.

Right now, any inventory item triggers the item specific action wether or not the variables are changed. This is getting a bit irritating.

Global Ints start out as 0 and are changed when inventory items are picked up. Is this right? Maybe that's where I'm going wrong.

Code: ags
function hvent2_Interact() //Regular Left Click on Hotspot
{
player.Say("I can't get in there.");
}

function hvent2_UseInv() //Inventory Item on Hotspot
{
if (player.ActiveInventory ==iSuck3)  // used item is the vacuum
{
  if (GetGlobalInt(3) ==0)//Don't have inventory item Bag with String
{
   player.Say("I don't have anything to put the critter in.");
}
 if (GetGlobalInt(3) ==1) //Have one or the other item to combine
{
   player.Say("I think I might have an idea. Just need something else.");
}
if (GetGlobalInt(3) ==2) //Have all items necissary to get third thing.
{
  player.Say("I'll get it out.");  // vacuum was used
    player.Walk(109, 153, eBlock);
    player.Say("Gotcha stupid rat!");
    oRat1.Visible=true;
    oRat1.Move(111, 70, 3, eBlock, eAnywhere);
    oRat1.Visible=false;
 if (GetGlobalInt(2) ==0) //if player doesn't have any rats
{
   player.LoseInventory(iBag0); //empty bag
  player.AddInventory(iBag1); //bag with 1 rat
  SetGlobalInt(2, 1);
}

if (GetGlobalInt(2) ==1) //if player has one rat
{
  player.LoseInventory(iBag1); //bag with 1 rat
  player.AddInventory(iBag2); //bag with 2 rats
 SetGlobalInt(2, 2); 
}

if (GetGlobalInt(2) ==2) //if player has 2 rats
{
  player.LoseInventory(iBag2); //bag with 2 rats
 player.AddInventory(iBag3); //bag with 3 rats
  SetGlobalInt(2, 3);
}
}
}
}


Again, I'm sure it's something simple that I either missed, or maybe it's my new Left/Right click code. Which is posted below for reference. I know it's a bit of a mess... but it works most of the time.

Code: ags
// next line above rep_ex function
bool mhboi; // mouse has been over inventory
function repeatedly_execute() {
// following code inside rep_ex:
  if (GUI.GetAtScreenXY(mouse.x, mouse.y)) mhboi = true;
  else if (gInventory.Visible && mhboi) {
    gInventory.Visible = false;
    mhboi = false;
  }
//--------------------------------------REPEADEDLEY EXECUTE------------------------------------

  int x = mouse.x;
  int y = mouse.y;
  
  if (IsGamePaused() == 1) return;

  int mm = mouse.Mode;
  int nm;     // new mode
  Hotspot*h;
  Object*o;
  InventoryItem*i;
  int lt = GetLocationType(x, y);   // what's under the cursor?

  GUI*g = GUI.GetAtScreenXY(x, y);
  
  if (mm != eModeUseinv) {
    if (g == gInventory) {
      if (mm != eModeUseinv) nm = eModePointer;
    }
    else {
      if (lt == eLocationNothing) nm = eModeWalkto;
      if (lt == eLocationHotspot) {
        h = Hotspot.GetAtScreenXY(x, y);
        nm = h.GetProperty("def_curs");
      }
      if (lt == eLocationObject) {
        o = Object.GetAtScreenXY(x, y);
        nm = o.GetProperty("def_curs");
      }
      if (lt == eLocationCharacter) {
        nm = eModeTalkto;
      }
    }
    if (nm != mm) mouse.Mode = nm;  // only change if necessary
  }
}

//--------------------------------------ON_MOUSE_CLICK-----------------------------------------

function on_mouse_click(MouseButton button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
  if (IsGamePaused() == 1) {
    // Game is paused, so do nothing (ie. don't allow mouse click)
  }
  else if (button == eMouseLeft) {
   if(GetLocationType(mouse.x, mouse.y) == eLocationNothing) {
      ProcessClick(mouse.x,mouse.y, eModeWalkto);
    }
   if (mouse.Mode == eModeUseinv) {
     mouse.Mode = eModeInteract; // kick off inventory
    }
else if(GetLocationType(mouse.x, mouse.y) != eLocationNothing) {
      ProcessClick(mouse.x,mouse.y, eModeInteract);
      mouse.Mode = eModeInteract;
   }
  }
else if (button == eMouseRight){
    // right-click
    if (mouse.Mode == eModeUseinv) mouse.Mode = eModeWalkto;   // loose inv item
    else ProcessClick(mouse.x, mouse.y, eModeLookat);             // or look at ...
  }

  else if (button == eMouseLeftInv) {
    if (mouse.Mode == eModeUseinv) inventory[game.inv_activated].RunInteraction(eModeUseinv);
    else {
     player.ActiveInventory = inventory[game.inv_activated];

    }
  }
  else if (button == eMouseRightInv) {
    if (mouse.Mode == eModeUseinv) mouse.Mode = eModePointer;
    else inventory[game.inv_activated].RunInteraction(eModeLookat);
  }
}


function show_inventory_window () {
  gInventory.Visible = true;
  mouse.Mode = eModeInteract;

}


Thanks for all the help you guys have given me so far. I know looking at a lot of strange code in one post can be annoying, so thanks for putting up with me.
 
#12
I've read over the manual and the BFAQ and have a couple of questions about tweaking my own inventory. And "Handle Inventory Clicks in script" is set to False.

1.) I have a couple of items that the user has to combine to create a new item. The  items combine nicely, but the problem is that I can only do one at a time.. Item A is used on Item B to make Item C... but I can't use Item C on Item D unless I close the inventory window and reopen it. It makes the whole process a little bit frustrating if
you get stuck.

2.) Is it possible to code the item so that a click with the item not on a hotspot the
cursor changes back to the pointer and the item is reset?

3.) One more thing before I go, is it possible to set coordinates in such a way that if
the mouse goes outside of the inventory window, the window disappears? Like

if Mouse.X (coordinates){gInventory.Visible=false;}
I haven't been able to find which command I want to use for that yet, but I'm sure
that I missed something important.

Thanks for putting up with my questions... if the answer exists in a wiki or previous
post that I haven't come across yet, just point me in that direction.
#13
As I work on all the guis, hotspots, cursors, walkable areas to put off making that last pesky walk cycle, I came across the customized text window feature.

The problem is, that I can't seem to find a way to move the gui anywhere except smack in the middle of the screen. I've tried gText.Y=200 and a few other things that seemed to make sense (it's a bit late now and I can't remember what all gave me an error.

Is there a way that I can manually set the coordinates of this gui?

#14
I know those of you in the Crit Lounge have seen a couple of these before. I just now feel that I have a fairly good handle on this and am slowly filling in the code to my first game...

Murphy's Salvage

The game follows the crew of the salvage ship Buther... the oldest ship in Murphy's fleet. The main character is Wombat Rowe, and she's the person that actually goes outside the ship to cut up and collect the salvage. That being said, she's the lowest crew member on the totem pole and does many menial tasks around the ship. She's also never been to Earth as it was accidentally terraformed into a parking lot before she was born.

This is Wombat in her orderly room, checking out her posters. It also shows the inventory and setting button.


Down in the cargo bay with Ted the robot. Yes, I realize Ted looks like a locker, but that's his back.


The bunk of the only other full human onboard. I plan to add a few more floating objects to the mix... things that move more when you click them once they stop.


Updated Progress:

Backgrounds 100%
Characters 100%
Animation 100% - Just need to finish up some special animations for certain rooms.
Story 100% - Now that everything is set up, I'm going to go back and rewrite things to flow better.
Scripting 40% - Slow going, but its a learning experience.
Sound/Music 2% - I found a few sound effects that I can use. Not sure about music though.
#15
I'm making a game set on a rather old and low-tech space ship and I'm thinking about parts of the ship not having gravity... or the ship not having gravity at all.

On one hand, walk cycles would be a bit more interesting as the characters will be floating about instead of walking.

But on the other hand... would it really help the game at all? Objects the character has to interact with would either have to float, or be in containers... attached to things...

Has anyone else pondered or tackled this issue?
#16
Critics' Lounge / Two sprites and a background
Tue 02/09/2008 19:24:51
Hello everyone... it's been a while since I've decided to work on a game and since an overly ambitious project and real life stalled out my last game idea, I've decided to try something a little simpler.

So far, this little game, consisting of four rooms, is set on a salvage space ship.. the crew is a bit crazy, I'm thinking early Red Dwarf as inspiration... small cast, limited setting, lots of humor.

This is the main character, she's the one that actually goes to collect the scrap.. so she's the one that does all the work. She sort of has an attitude, but is just mostly annoyed at how strange the rest of the crew is.



This is one of the crew, his name is Eric and he's a bit insane... he's also the engineer and is usually floating around the engine room.



Here's a rough version of the hallway that connects the parts of the ship.



Also, a question, since this is a spaceship, what would be the best way to animate in a low to no gravity setting? I'm thinking maybe the main character has magnet boots, but the rest of the cast sort of floats around. Just an idea...

Thanks in advanced for all your help!
#17
Critics' Lounge / Little Girl Sprite
Sat 22/09/2007 21:34:43
Hello everyone,

I just recently ran across this website and forum and I decided to try my hand at making a simple game. But it's been a long time since I've done any pixel-jockey work and I think I need a bit of constructive criticism and advice on shading.

This little girl is 6 years old. Her name is Wombat. I can't decide if I like her as a redhead or a blond. The green shirt she is wearing is one she stole from her older brother, it has a pocket on the inside and is how she carries around her inventory.

I know her head is oddly-shaped, but I want to keep a cartoon-ish style, but I can't quite make her hands look any better without redrawing her head.
Here she is with a transparent background.



Here she is on a test background. I know this background will be changed quite a bit as well.

I appreciate any help you guys can give!  :)
SMF spam blocked by CleanTalk