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

#1
Indeed! Agree with Monkey. I actually hadn't ever thought about putting the Character in the struct (silly me), but especially on line 4 above, it shouldn't be Character *enemy, just any other name, like Character *tempDude, or whatever.

I also realize that this may seem like a lot of setup work, but it allows you to run checks against every character you want with a loop instead of calling up character names individually.

But regarding the other aspects of your script, you could have multiple bad guys around, too.

Code: AGS
int i = 0;
int closestEnemy = -1;
int maxRange = 20500;
int xDiff; int yDiff; int enemyDistance; // If not defined elsewhere.

while(i < 100){
  Character *cTempDude = character[enemy[i].characterLink]; // Or Character *cTempDude = enemy[i].agsCharacter;

  if(cTempDude.Room == cEgo.Room){  // Check to see if the character is in the room.
    xDiff = cRoy.x - cTempDude.x;
    yDiff = cRoy.y - cTempDude.y;
    enemyDistance = xDiff*xDiff + yDiff*yDiff;   // Calculates the distance between EACH enemy and Roy.

    if(enemyDistance < maxRange){   // If an enemy is close enough to hit you, they are marked as the closest
      closestEnemy = i;             // enemy and their distance is now the "range" to check the next enemy by.
      maxRange = enemyDistance;
    }
  }
  i++;
}

if(closestEnemy == -1){
  Display("Not close enough!");  // If no one was in range...
}

else{
  int i = closestEnemy;   // If there was an enemy in range, we pick him.
  Character *cTempDude = character[enemy[i].characterLink]; // Or Character *cTempDude = enemy[i].agsCharacter;
  damageDone = Random(10);
  enemy[i].health -= damageDone;
  if(enemy[i].health < 0){
    cTempDude.ChangeView(8);   // The magic of this method is that you can edit the variables (like health) and the actual character functions at the same time. You could also use cTempDude.Walk, cTempDude.Animate, cTempDude.ChangeRoom, etc. And the one script will work with any enemy character that you throw against the user!
  }
}


I hope this addresses some of the other things that you were trying to accomplish, as well.
#2
This may or may not be the easiest answer, but will allow you to have a lot of flexibility later on. First, you keep all the functions in a separate script (mine's called "Combat.asc") so you can call them from any room. Now, in the Combat.ash file, you have a definition of what a bad guy is, and all the variables that you want different bad guys to have. The .ash code should look something like this:

Code: AGS

struct badguy {

  String name;
  int characterLink;

  int health;
  int strength;
  // int anything-else-you-want-to-keep-track-of.
}


Now in the combat.asc script, in the top and outside of any functions, create an array of bad guys.

Code: AGS
badguy enemy[100];


What this does is creates a bunch of easy-to-access data that holds all sorts of information about up to 100 bad guys. Now the trick is to link this data to actual characters in the game. Create a function that you only call once, and put something like this:

Code: AGS
enemy[0].characterLink = cBobby.ID;
enemy[1].characterLink = cDave.ID;
enemy[2].characterLink = cRoger.ID;

(Obviously, you'll be filling these with names of actual characters in your game.)

What this does is it means is that each enemy in the array of 100 is now specifically linked to a character in your game. Then you can set up loops to check each of the 100 characters quickly to see if they're close enough to hit.

Code: AGS
int i = 0;
while(i < 100){  // Could be a a bug here... Only go up to the number of characters you've actually defined.

  Character *enemy = character[enemy[i].characterLink];  // Creates a dummy character for just a second using the characterLink and ID.

  if(enemy.Room == cEgo.Room){ // If the bad guy is in the room...

    // Check distance, do whatever.
  }
  i++;
}


Hope this is helpful as a different approach!
#3
I'm the cheapest person around, and have WANTED to play Resonance and Gemini Rue for a while now, but could never quite fork over the money.

Just bought them. And they are AWESOME!

At GOG.com, for their "Black Friday" week sale, they are offering 5 indie games for $10!!! I got Gemini Rue, Resonance, the Blackwell Bundle (all 4 games!!!), as well as a couple other interesting-looking ones. If you haven't already, you will never ever beat this price without being a nasty software pirate! Go and play them NOW!
#4
Gracious sakes. Sorry for taking your time. Yes, that worked perfectly. Thanks, Khris!

My stupid mistake was changing DynamicSprite *rotatedMissile to DynamicSprite *rotatedMissile[7] WITHOUT changing other parts of the code. The game kept shooting back an error that I couldn't "assign value to entire array" and I thought the problem was that I couldn't MAKE an array of those. Nay, not so. It's just that I couldn't say rotatedMissile = DynamicSprite.CreateFromExistingSprite(5513, true) once I had turned it into an array.

For anyone out there reading this, this would is a sweet way to rotate larger things, like walkcycles. Now I'm waiting for someone to make "Inception: The Game."
#5
I realize that this is a lot like WHAM's post about Dynamic sprites, because that's how I got to the point that I'm at now, where I'm stuck.

Here's my problem. I'm trying to take an entire series of animated sprites (in this case, a fireball), and rotate them so the player can cast the fireball in any direction, instead of just the 8 standard ones. It's not too hard to get this to work with one sprite, but I can't use iterative code to do all seven animation frames.

The following code works (I've got rotatedMissile defined globally)...
Code: AGS

ViewFrame *oldFrame = Game.GetViewFrame(VBOLTFLY, 8, 0);
rotatedMissile = DynamicSprite.CreateFromExistingSprite(5513, true);
rotatedMissile.Rotate(30);
oldFrame.Graphic = rotatedMissile.Graphic;


But when I try to do stuff like this, it rotates the final sprite and fills the rest with cups...
Code: AGS

int rotateFrame = 0;
while(rotateFrame < 7){
  rotatedMissile = DynamicSprite.CreateFromExistingSprite(5513 + rotateFrame, true);
  rotatedMissile.Rotate(30);
  ViewFrame *oldFrame = Game.GetViewFrame(VBOLTFLY, 8, rotateFrame);
  oldFrame.Graphic = rotatedMissile.Graphic;
  rotateFrame++;
}


Having not used Dynamic Sprites much, I get the feeling that the problem is that I've got one sprite, and I can't possibly use that same sprite for seven different frames. However, I can't bear the thought of creating 7 different global dynamic sprites and assigning them manually. Especially because there are a lot of other things that are supposed to fly through the air at a rotated angle while animating (enemy spells), possibly at the same time. And then I'd need a whole bunch more, all of which would have to be manually assigned.

Is there any way around this? Can I get an array of Dynamic sprites, for instance? I tried "DynamicSprite *rotatedMissile[7]" and it crashed. =) Or can I get the Dynamic Sprites to save to the frame more permanently, so I can reuse the Dynamic Sprite without it clearing the graphic in the loop?
#6
I'm all for the idea. The example that comes to mind for me is an old Sierra educational title called "Pepper's Adventures in Time." The player gets to play a girl named Pepper, with standard interactions (look, interact, talk, and inventory), but at certain points in the game, it switches to her dog, which can smell, bite, and something else like bark.  As it was a kid's game, the puzzles were fairly linear, as I recall, where the game switched characters for you at definite spots. I always thought it would be more fun if you could switch characters whenever you wanted to, like Day of the Tentacle.

Not to discourage you because the idea isn't new, but just to reinforce what others have said: do it if it makes sense. If you have genuinely different characters, this is a great way to make the player rethink puzzles in a different way.
#7
I just read yesterday that Arden's Vale was voted Best Short Game for 2011! Yay!

I've got to say that I was surprised and gratified that so many voted for it, especially considering how awesome Chance of the Dead and Draculator II are. I still haven't played Submerged or The Unfolding Spider, but I'm sure that they are equally impressive labors of love.

Thanks to all! It made my day!

#8
I apologize for going AWOL this last week. There were all sorts of things happening in real life that kept me from any free time until tonight. That said, I'm so glad so many new votes came in, which at least make me feel a little better about it.  And the winners are:


1st Place: Bottle + Gasoline = Molotov by Darius: (selmiak, Kimbra, DrWhite, Armageddon, Matti)


Tie for 2nd Place:
Pac-Mans and Power Pellet by selmiak: (Tabata, Bogdan, Deu2000)
Birth, Life, and Death by Tabata: (NickyNyce, Bulbapuck, Stupot+)

And because I'm the boss, I declare that we can have two 2nds AND a third.  ;D


3rd Place:
Waiting for a Local Train at an East-Bavarian Train Station br DrWhite: (Darius)

Darius, you are by far the winner, along with a bonus gold star from me for additional AWESOME entries. Congratulations!
#9
So far it seems like we have a winner, but we've got a tie for second. I'll leave the voting up for a few more days, and see if someone else want to throw their two cents in.

      

Maybe that will give me time to come up with cooler trophies...   :P
#10
I was raised on King's Quest and Quest for Glory, all of which I have beaten, and all of which I enjoyed, probably because I didn't know any better at the time. I just figured all computer games were fiendishly hard. Before all the Sierra goodness, I played text-only adventures (which I can't remember EVER beating), and some old 5.25 disk game called "Demon's Forge," where my only memory is throwing a blanket on an assassin before he shoots you.

My embarrassing confession is that the ONLY LucasArts games I have ever played were Out of This World (that's LucasArts, right?), Day of the Tentacle, and The Dig. I've never been to Monkey Island, hit the road with Sam and Max, gone anywhere Full Throttle, been trained to use the Loom, and I've never entered Maniac Mansion, not even with a remake. I don't even remember hearing about Grim Fandango until I started hanging out in the forums here.

But even being one of the Sierra faithful, I've never played Police Quest or Leisure Suit Larry, either. Not that I regret missing out on either of those. My Sierra favorites were QfG3, KQ6, and Gabriel Knight 1.
#11
In the grand tradition of indie games, I'm a day late or so in posting this. But without any further adieu, LET THE VOTING COMMENCE!

#1 Birth, Life, and Death by Tabata



#2 Bottle + Gasoline = Molotov by Darius



#3 Pac-Mans and Power Pellet by selmiak



#4 Waiting for a Local Train at an East-Bavarian Train Station by DrWhite




Thanks for all the great entries, especially from over-achiever Darius.  ;D  I personally really liked the "Civilization" one, but decided to go with one entry per person for the contest.  Voting will go until March 28 or afterwards if I'm late again.  :-\
#12
Fantastic entries so far!  We've only got about 24 hours left, so last call for entries!  Can't wait for Victor6 to get his act together as well.   ;D

We'll see how voting goes... Do they typically allow more than one entry per person? I think if any contest allows three entries, it should be this one. Interesting if Darius makes a clean sweep of it... Does anyone see why we shouldn't allow multiples? Should Darius pick his favorite to submit for voting? Or can each be voted for individually, but he'll just get the highest single trophy? Any ideas? I just don't know how I should run this when voting starts in a couple days...
#13
Triptych

A triptych is a work of art that is divided into three sections. Traditionally, this form was used a great deal in the middle ages for religious art like altarpieces and stained glass windows. The idea was that the three images side by side would tell a story or more fully illustrate some sort of principle, with the center of the idea in the center panel.

With that in mind, here's the shape to fill:



Some ideas to get you going:

- Three characters, or three aspects of a character (like fighter, magic user, thief)
- Connect something using the past, present, and future
- See no evil, hear no evil, speak no evil
- The three most important or useful items in an adventure
- Icons representing the three best games of all time

Remember, the best things in life are three!

Submissions: Feb. 26 - Mar. 12
Voting: Mar. 13 - Mar. 20
Awards: Mar. 21

Edited Timetable
Scratch Our Heads During the Forum Blackout: Feb. 26 - Mar. 4
Submissions: Mar. 5 - Mar. 20
Voting: Mar. 21 - Mar. 28
Awards: Mar. 29
#14
Thanks so much for the votes and the fun contest! Cleanic, Tabata, and Selmiak are now on the "nice" list and will accordingly receive more candy this Christmas.  ;D

I'll get a new ball started in the next week or so.  Stay posted!
#15
The command that you're looking for is SetViewport(x, y), where x and y are the top-left coordinates of where you want the screen to be.  For example, if your screen resolution is 320 x 200, but your background is "too big," you could use

SetViewport(0, 79);

Note that this command "locks" the camera (or viewport) in place.  So if you want the camera to follow the character around once they start walking, you'll need to use

ReleaseViewport();

command.  Hope this works out for you!
#16
For best use of the goofy shape and sticking with the movie theme, I've got to vote for BillyCoen's Stretch.
#17
I'll turn him into a flea, a harmless little flea! And then, I'll put that flea in a box. And then I'll put that box inside another box, and then mail that box to myself. And when it arrives...




I'LL SMASH IT WITH A HAMMER!!! IT'S BRILLIANT, BRILLIANT, BRILLIANT, I TELL YOU!!!

Yzma is my hero.  :D
#18
Quote from: LetterAfterZ on Sat 04/02/2012 06:13:50

I thought a good starting point would be to begin fleshing out the rooms, etc with placeholders and then doing the graphics and audio as the final stage.

What are your thoughts on this, is this a good way to go ahead? Any thoughts on how I should layout my story, and what's the best way to approach introducing puzzles to the game?

Several years ago, I bought the Civilization Collector's Edition (Civ I-IV + bonus stuff). The best part of it was a long and extended interview with game designers on how they did it. Their philosophy was pretty much what you've written above. Make the game cheap, with lame graphics, and work on gameplay, gameplay, gameplay. Have people play it and test it and work and rework the plot. Then, once you're convinced you have things just the way you want them, work on all the art once and only once.

Their main objective is making a great game for cheap. If you've got a core crew of half a dozen designers and programmers, it doesn't cost much to produce and rework things. You can hire two dozen artists for a few months at the end of production to make it pretty.

That's more or less how I did Arden's Vale.  If you're familiar with the game, you can check out a shameful early version of the project with the first few rooms worked out with awful placeholder graphics. You'll notice that the puzzle for the first room has been much improved since then. After having some testers play through the rooms, it was voted down as a lame puzzle, and without too much waste, was easy enough to change.

As for creating puzzles, put in way too many and let people play. A lot of puzzles that seem obvious to you will probably be way too obtuse for players. My biggest changes after testers were improving in-game feedback. You need others' feedback in making responses of "You can't do that, BUT..." without being too obvious or too vague.
#19
Quote from: Ehkber on Sat 04/02/2012 12:56:26
Righto, well it soundsa a to me like £4.99 for 6 alone's a good ol' deal! Thanks guys!

Absolutely! However, be warned, there is a rather obtuse set of puzzles in KQVI...

I got the following from www.sierragamers.com, which is Ken and Roberta Williams' site to help people playing the old games:

The (Il)Logic Cliffs

Getting to the top of the Isle of the Sacred Mountain requires you to climb the Logic Cliffs, a series of puzzles that double as CP checks. Much of the information needed to solve the riddles of the cliff is found in wonderfully-cryptic clues contained in the game manual (which are reproduced below).

The first challenge: Only those pure of heart will be able to RISE the cliffs of logic.

The second challenge: A master of languages will SOAR.

The third challenge:
Four men standing in a row,
Third from the left, and down you go.
The rest, in order, move you on,
The Youngest, the Oldest, and the Second Son.

The fourth challenge: The Sacred Four of the Ancient One's philosophy were the emotion 'tranquility', the color 'azure', the creature 'caterpillar', and the element 'air'.

The fifth challenge: Only those of the highest order may ASCEND the cliffs of logic.

In addition to the above riddles, you will need to be able to decipher the ancient alphabet of the Sacred Ones, found here: http://sierragamers.com/aspx/m/634055 (scroll down just a bit)

Good luck!
#20
Quote from: Ehkber on Sat 04/02/2012 02:06:29
Is Kings Quest 4/5/6 worth getting?
I'm interested because of Jane Jenson and prettiness and content that hasn't been fan-remade yet but my tolerance for Walking Dead stuff is very, very low. How much of that kind of thing am I likely to encounter in these?

If you've never played them, this is a great deal! King's Quest IV and V are both a lot of fun, although they feature a lot of old-school-Sierra death-at-every-turn and ridiculous-dead-end scenarios (particularly V). But I personally consider VI to be the best game Sierra ever produced. A fabulous story (thanks to Jane Jensen) with almost-always-logical puzzles, beautiful scenery, and memorable characters (if this includes voice pack, you get Robby Benson as Alexander, which is AWESOME). Adventure game gold.
SMF spam blocked by CleanTalk