Show Posts

You can view here all posts made by this member. Note that you can only see posts made in areas to which you currently have access.


Topics - tzachs

Pages: 1 [2]
21
Modules & Plugins / Plugin: C# Runner
« on: 16 Aug 2010, 20:27 »
This plugin will let you compile & run c# code from within ags (in runtime)!

It uses smiley's awesome AGS Plugin API for C#.

Why&how should I use it?
---------------------------------

Here's a simple scenario:
Suppose you have a string, and you want to get the last index of 'n' within the string.
You remember that AGS have an IndexOf function, but it doesn't have a LastIndexOf function.
But c#, on the other hand, does have this function.
So you can, with this plugin, compile the code on the spot and then run it whenever you feel like it.
To compile it:
Code: Adventure Game Studio
  1. //We choose CSCompileStringToInt because we want a function that gets a string
  2. //and returns an int.
  3. //The first argument to this is the c# code, the second argument is the name of the class.
  4. //The name of the class will also be used as the name of the created dll file.
  5. //The functions returns true if compilation succeeds or false if failed.
  6. if (CSCompileStringToInt("return value.LastIndexOf('n');", "GetLastIndexOf"))
  7. {
  8.    Display("Compiled successfully!");
  9. }
  10. else
  11. {
  12.    Display("Compilation failed!");
  13. }
  14.  

And then to run it:
Code: Adventure Game Studio
  1. //The first argument is the input value we give to the function we compiled earlier,
  2. //the second argument is the name of the class/dll to use.
  3. int lastIndex = CSRunStringToInt("An example string", "GetLastIndexOf");
  4.  

Basically this plugin has several compile functions and several run functions for different types of arguments and return values (all combinations of string,int,float,bool).

The compile functions will try to compile a dll with your code, and then you can use the run functions to run the code from this dll.
If compilation/run fails, the error will be written to a text file: CS Plugin Debug.txt, so you can view them.

Pre Compiled dlls
----------------------

If you want, you can compile your own dll with visual studio, place it in the appropriate folder (the _Debug folder while debugging, and the Compiled folder when deploying) and then you will be able able to use the Run functions to run functions from your dll.
This can be useful if you need to run some more complicated code, or if you are missing references.
In order for the plugin to recognise your functions, you need to use the same name for the dll, namespace and class, to name your functions "Execute" and make them public. The functions must be in one of the supported formats (I.E one paramter of type string/int/float/bool and return value of type string/int/float/bool).

The Demo
-------------



The demo is really a small compiler, it also shows what happens behind the scenes when you run the "Compile" function, when it actually wraps it in the code that you see on the screen.

Download
-------------
Download the plugin&demo from here.

The download has both the binaries and the source code.

Requirements
-----------------
- Windows
- Dot Net framework 3.5 installed
- VC++ 2010 redist installed, at http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en

Install
--------
In order to use the plugin in your game, here's what you need to do:
Go to the plugin binaries folder.
Copy the wrapper dll and the plugin dll to the AGS folder.

You can now use the plugin in your game,

Before distribution, I think that you need to copy the wrapper to the compiled folder as well...

22
Modules & Plugins / Plugin: AGS Text-To-Speech
« on: 12 Aug 2010, 21:08 »
So, I've played around with smiley's new awesome AGS Plugin API for C#
and I made this plugin.


This is simply a small wrapper to Microsoft speech API, which convert text to speech.

The functions available via this plugin are:
Code: Adventure Game Studio
  1. //This function will speak the chosen text, with the selected voice,
  2. //at the chosen speech rate and volume.
  3. //The voice index range is from 0 to the number of voices installed on the computer
  4. // (this can be queried with TTSGetVoicesCount)
  5. bool TTSSpeak(const string text, int voiceIndex, int speechRate, int volume);
  6.  
  7. //Returns the number of installed voices on the computer
  8. int TTSGetVoicesCount()
  9.  
  10. //Returns the name of a specific voice index, can be useful
  11. //if you are looking for a specific voice
  12. String TTSGetVoiceName(int voiceIndex)
  13.  

Requirements:
- Windows
- Dot Net framework installed
- VC++ 2010 redist installed, at http://www.microsoft.com/downloads/details.aspx?FamilyID=a7b7a05e-6de6-4d3a-a423-37bf0912db84&displaylang=en
- At least one voice installed (XP and above come with at least one default voice, not sure what happens before that)
- That's it as far as I'm aware

Install:
You can download the plugin here.

It comes with a demo game, both the plugin + demo have binaries and sources available.

In order to use the plugin in your game, here's what you need to do:
Go to the plugin binaries folder.
Copy the wrapper dll and the plugin dll to the AGS folder.
Copy the speech api dll to your game _Debug and Compiled folders.

You can now use the plugin in your game,

Before distribution, I think that you need to copy the wrapper to the compiled folder as well...

23
I've become a bit paranoid, after my last choice of theme was apparently the worst ever with no entries  :'(

Since I don't want to make that mistake again, and since it went well the last time dualnames did it, I've got some suggestions for the next theme, please pick the one which you like best and are more likely to enter.

The options are:
1. Playing the bad guy - not necessarily evil, can also be a hero with low morals (like Trilby for instance)
2. Solving a mystery
3. First person narrative- can be changed to Film Noir if we want to be more specific
4. A game with a message - a game that gives more than pure entertainment value (like Eternally Us)
5. Something completely different (if you don't like any of the other options, suggest something)

Thank you!

24
Completed Game Announcements / Robolution
« on: 06 Aug 2010, 11:27 »
Robolution(!)

The human race was destroyed by robots, because the robots were sick of the humans having them work for unreasonable hours (inspired by a "Flight of the Conchords" song).
The new robot race is divided into two camps, split by the two major human companies that built the robots.

The two camps are at constant war, and you play as a low rank robot, which is supposed to help with the war effort, but soon discovers that if drastic measures are not taken, you will lose...


Screenshots:


 

Used modules:
Tween Module (by Edmundito).
Particles System Module (by jerakeen).
StarWars Scroller Module (by SSH).

25
Hints & Tips / Hard Space
« on: 08 May 2010, 16:29 »
So, did anyone manage to get past the transputter puzzle?
I tried to follow ProgZMax's instructions from the MAGS post, but I still don't get it...

In the image he posted (http://485.photobucket.com/albums/rr218/ProgZmax/x-circuit.gif), there should be the valid settings to only connect x.
However that gives the number 7 on the axis, but my default number for x is 8, which makes this incorrect if I understand correctly, no?

Also, if I take the same posted image and just switch the right-most bottom tile with the one of top of that, x is still connected to all the stuff it was connected to in the first image, and y and z are sill disconnected, but it gives a totally different value...

Help, please?

26
AGS Games in Production / AGS Footballer
« on: 17 Apr 2010, 18:01 »
Play some football!!!

Features:

* Play as the whole team or a single footballer!
* One/Two players supported.
* If playing in team mode, select between manual/auto switching mode.
* If playing in footballer mode, select in which position you want to play!
  Play in offense or in defense, it's your choice!

Screenshots:





Progress:

Story: 100%  ;D
Graphics: 20%
Scripting: 10%
Sound: 0%

The numbers may seem low, but that's because I have many many plans for the final game. I'm currently concentrating on having a playable game with simple AI and controls, and I believe I am not far from that goal (pun not intended).

Tech Demo:

Demo is now available!
Get it here: AGS Footballer Tech Demo
Or in the mirror.

Older version (just in case) can be found here.

Controls
Player1: arrow keys to move, shift to pass, ctrl to shoot.
Player2: w,s,a,d to move, 2 to pass, 1 to shoot.
Escape to pause the game.

Tech Demo was tested by:
bicliotti
Dualnames
Ethan D
dkh
Jim Reed

27
Critics' Lounge / Small Footballers
« on: 01 Apr 2010, 09:43 »
What can I do to improve these guys?
I was mostly worried about the face of the front guy, it looks too lego for me... now that I put them in line I'm not so sure about the side view too...
Also the skin tone..

Consider that they are going to be fully animated, so I didn't do any shading, at least for now...



x2

28
Adventure Related Talk & Chat / A remake to MI2?
« on: 07 Mar 2010, 20:37 »
I've just seen this and wanted to share...

Basically they're saying MI2 remake will be announced really soon, maybe even next week!

29
The Quest For The Holy Salsa

There is an on-going blood feud between the humans and the abominations.
You play as Eldritch, a young abomination, who is chosen by the 'High One' to infiltrate
the human camp, and fetch what the legend describes as their sacred item which is also the source to their power:
The Holy Chunky Salsa!

In your quest, according to the legend (written in the book of the ancient war), you will have to overcome three obstacles:
The mighty guard, The angry farmers and the Test Of the Beards Of Different Sizes.
You will also discover the true power of love.

Backgrounds were made by the amazing Jakerpot.





Download (17.5MB)


30
I was inspired by SteveMcCrea's AGSketch (view it
here
) and so I wrote a plugin for Paint .net (a free paint program which I love) which draws perspective lines on the selection you make...
It has the possibility of 1 or 2 vanishing points which you can then drag to your favorite location.

Download it from this paint .net forum thread.
Just put it in you paint .net effects folder (it's located in c:/Program Files/Paint .net/Effects on my computer) and then start the program. You will find the perspective lines under Render.

31
Did this ever happen to you?
You're playing a game where dialog lines can be skipped with mouse clicks but also after some time (most of the games have this configuration).
Character1 is talking, you read it's dialog and click to go to the next line after you've finished reading. Unfortunately, a split second before that the time for the line was out and the line switched to the next one. Your click will then be misinterpreted for the new line and it will be skipped without you being able to read it, perhaps missing on some important clue or a nice joke...

Now, I think this can be avoided with some engine scripting if we'll accept the following logic as true:

If
The current line is being skipped by user click AND
The previous line was not skipped (**) AND
The time between when the previous line was finished and the user click was less than a split second(***) AND
This is the first user click skip for the current line

Then
Ignore the user click and don't skip the line

(**) Need this condition for a scenario of a user who has already read this dialog and is clicking like crazy to skip all lines...
(***) Need to test for a valid value, probably ~200ms...

Do you see any flaws in that?

32
This is an entry for the Oct 09 MAGS competiton.

Story
-------

The year: 1902.
England and France are at war.
An ugly war, a war you can't even remember why it started.
Both sides show equal strengths, so it's hard to tell when it will end.
That's where the 'energizer' comes into play.
The English has developed it, and it can do wonders.
With this machine, the English will have the advantage and will win the war in a matter of months.
However, the English are afraid...
They're afraid that the French will steal it...
They put it in a desolated, unknown place, but that was not enough.
A few months ago, they received some information that the French intend to steal it. So they called me to service.
That is why I'm here, in this station, in charge of the safety of the 'energizer'.
So far, I've been here for nothing. Nothing has hapenned. I am out of work for 4 months.
Until this night. I was asleep in my bed when all of a sudden...

Screenshots
----------------




Features
-----------

4 different endings, depending on your actions.
A hero in his pajamas.
A bagpipe.
A unique interrogation mode (see third screenshot)

Changes Log
----------------
Version 1.0 - First version
Version 1.1 - Increased walk speed
Version 1.2 - Fix bug (using items when notebook is visible)
Version 1.3 (11/1/10) - Improved GUIs, fix some bad logic

Almost forgot to say thanks to
--------------------------------------

Chris Jones, for the AGS engine.
SSH and StevenMcrea, for the walkcycle generator.

Download the game here.

A link to the old version 1.2 can be found here.

And a side note
--------------------

I wanted to share the story of one of the characters in the game.
My sister, who now lives in Scotland, bought me a doll of a "haggis". It was a very cute doll and we named it "Mclassen". Soon after arrival, Mclassen began to speak and develop a personality, and have several popular catch phrases.
The "Mclassen" character in the game is inspired by this doll: it's looks, personality and talking style...
Here is a side-by-side view of the "Mclassens"...



Well, that's it, I'm done sharing, enjoy the game...  :)

If you've got the time, please play this and the other MAGS games (there's a lot to play and not a lot of time), and then vote away...

33
Really, officer, it was combined of two completely different things!
How did it look?
Well, for some unknown reason, all I can remember now is this:



Oh, and there's a chance it was rotated or scaled...

34
This game was originally created for the MAGS August 09 entry (about writing a game which is also a first episode of a series). I just wanted to fix some bugs and add some hints and other improvements before releasing it.

The Story
------------

This series is based on a book I am writing, where each game will be based on a single chapter of the book.
This game is based on the first chapter, and you will be able to read the chapter after completing the game.

Without revealing too much about the book itself, the story begins when we learn about a group of people who are being kept captive and forced to complete challenges that require wisdom, stamina, agility, strength and a variety of other skills.

You may ask, why? They ask this question every day. The answer will be revealed, although not in this chapter...

Screenshots
----------------





Download
-------------

You can download the game here (120MB).

35
Hi, I have two suggestions that revolve around the same concept: not having to write x,y coordinates inside the code.

1. Entry points
Basically, I suggest that each edge in the designer will have a marker for an entry point.
Here's an illustration:

The arrows in the image stand for the markers and can be dragged from the designer to decide on the entry positions. Then we will be able to use those from code (with an overload to the ChangeRoom function):
Code: Adventure Game Studio
  1. cEgo.ChangeRoom(15, eLeft);
If we will decide to move the edge later on, the markers will move along with the edges. That will guarantee that the characters will always enter the room and will be placed in the correct side of the edge.

2. Walk to points
Here I suggest that the menu for walkable areas, walk-behinds etc will also have walk-tos, here's another illustration:

Then we will be able to write an overload for the Walk function and write (in that room):
Code: Adventure Game Studio
  1. cEgo.Walk(wRoomCenter);
  2. cDoctorEvil.Walk(wElevator);
  3.  
And from other rooms we will be able to write (with another overload for ChangeRoom):
Code: Adventure Game Studio
  1. cEgo.ChangeRoom(15, "Elevator");
  2.  
Although I agree that using strings is not optimal, I think it is better then specifying x,y coordinates.

What do you think?

36
Hi, I am using version 3.1.2 SP1, and I think I've found two bugs in SetDigitalMasterVolume...
The only sound I have is an mp3 that plays on loading the room. I call the SetDigitalMasterVolume on the on_Load function of the room.

Bug #1
--------
If I write:

Code: Adventure Game Studio
  1. SetDigitalMasterVolume(100);
  2.  

or:

Code: Adventure Game Studio
  1. SetDigitalMasterVolume(1);
  2. SetDigitalMasterVolume(100);
  3.  

Then everything works fine, I can hear the mp3. However, if I write:

Code: Adventure Game Studio
  1. SetDigitalMasterVolume(0);
  2. SetDigitalMasterVolume(100);
  3.  
Then I don't hear anything... It seems that if I turn the volume to 0, I can't turn it back on  ???

Bug #2 (probably related to #1)
--------
If I write:

Code: Adventure Game Studio
  1. int i=50;
  2.   while (i<100)
  3.   {
  4.     SetDigitalMasterVolume(i);    
  5.     i++;
  6.   }
  7.  
Then I hear the mp3 at volume 100, as expected. Also, if I write:

Code: Adventure Game Studio
  1. int i=100;
  2.   while (i>50)
  3.   {
  4.     SetDigitalMasterVolume(i);    
  5.     i--;
  6.   }
  7.  
or

Code: Adventure Game Studio
  1. int i=50;
  2.   while (i<100)
  3.   {
  4.     SetDigitalMasterVolume(i);    
  5.     i++;
  6.   }
  7. while (i>50)
  8.   {
  9.     SetDigitalMasterVolume(i);    
  10.     i--;
  11.   }
  12.  

Then I hear the mp3 at volume 50, as expected. However, if I write:

Code: Adventure Game Studio
  1. int i = 100;
  2. while (i>50)
  3.   {
  4.     SetDigitalMasterVolume(i);    
  5.     i--;
  6.   }
  7. while (i<100)
  8.   {
  9.     SetDigitalMasterVolume(i);    
  10.     i++;
  11.   }
  12.  
then I hear the mp3 at volume 50, a weird behaviour  :-\....

Any thoughts?



37
AGS Games in Production / A twist at the end
« on: 25 Jun 2009, 20:38 »
Hello to all!
This is my first game with AGS, and as an adventure game lover, it is needless to say that I am pretty excited about this game :D
I feel that this game is now mature enough for the production thread to start, so let's begin with...

Story

You play as Chad Montgomery Twist, the wealthy owner of the 'Blue Cup Inn', the fanciest hotel in town.

Well, that's what Chad claims, but it's not entirely accurate...
When he says 'wealthy' he actually means poor, when he says 'owner' he actually means janitor,
and when he says 'the fanciest hotel in town', he actually means- well, it is the fanciest hotel in town, but only because it's the only hotel in town (it's a very small town...).

Our story, like a lot of good (and bad) stories, begins with a beatiful woman...
When Chad sees her and her father checking in, he immediately falls for her, and being the romantic guy that he is, he sends them to the best room in the hotel.

What makes it the best room, you may ask?
Well, simply put, this room has a little hole in the wall that only Chad knows about and it's obviously not the first time he sent girls to that specific room...
But when Chad looks into the hole, hoping to see some skin, he sees a note being slipped underneath her door.
When the girl reads the note, she screams and runs out of the room in panic, leaving a shocked (and disappointed) Chad...

The plot thickens when the hotel owner (the real one) calls Chad to say that the girl is missing and that her father suspects that she was kidnapped from the room.

Chad obviously knows it's not true, but he can't say anything about it...
And so he starts his investigation which will lead him into unknown territories where he will have to show bravery for the first time in his life, stare evil in the eyes without blinking, and, of course, reveal the largest secret of all:

                                                                      Is there a twist at the end of this game?

Screenshots (Click to enlarge)

   

   

   

Features

  • Intriguing and twisted plot (pun intended)...
  • Original soundtrack
  • Classic DOTT style gui (using proskitos' template)
  • Dialog system the combines classic selection based conversation together with parser based questions (hard to explain, you'll understand when you'll play it)
  • Conditional puzzles based on your selections in the game
  • This will not be one of the easiest games to play, some of the puzzles won't be solved using the 'everything on everything' approach and you will have to use your brain...
  • Several different endings...

Progress

-Story  70%
-Puzzles 46.5%
-Scripting 30%
-Graphics 30%
-Music&Sound 20%
-Voice Acting 0%

Ok, that's about it, so what do you think?
Comments of any kind are welcomed (at least by me)...

Pages: 1 [2]