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

#841
Just to expand upon what Gilbet is saying ...

To determine if a character  is numeric you could create a function such as this.

Code: ags

// Function definition
bool IsNumber(char c) {
   if (c>='0')&&(c<='9') return true;
   else return false;
}

// Example usage
char somechar = '2';
if (IsNumber(somechar)) Display("It's a number");
else Display("It's not a number");


A char variable is actually a 1-byte integer, so say if you have a char variable called blah, you can do all kind of things like:
Code:

if (blah<100 and blah>12) blablabla...;


This applies to the elements of the Chars[] array of a String, so:
Code:

if (somestring.Chars<100 and somestring.Chars>12) blablabla...;


   Report to moderator   Logged
Pages: [1]    
#842
Perhaps String extensions should be in their own module?
#843
Quote
Well yes, it's not SO hard to make BUT I would need to have some sort of a source code or manual for making AGS plugins (if it supports them anyway). I need to know what kind of input it requires Smiley
In addition to what SSH said the API is expanded as needs arise.

I should also point out that there is currently an AGS inport/export file format for characters .CHA and perhaps this would make a better starting point for the "spx" file than MNG. 
#844
I was wondering if there will still be a limit on the number of simultaneously playing sounds?  If so then perhaps there could be a sound channel array that would work similar to the way the character array works.  When a sound is played it would automatically be assigned to an available channel or alternatively played on a specific channel specified by an optional parameter.

#845
Quote
Writing a couple pages of back story for major characters (that your audience may never see in any way) always helps create a richer story in screenwriting, and I would assume it does the same in creating adventure games.
I agree.  Don't be shy about writing character background, back story or whatever that may not be used directly in the game.   It's all helpful and you'll never know whatr your'e going to need.
#846
Quote
This sounds fun. I like the idea of beeing able to create an "AGS Project" or just a blank canvas. The project would be organized with the rooms, sprites and stuff... (I might not be able to integrate it with ags as I'm not sure if there's a possibility to write an import plugin for it) you would just "add room" where you would have areas layers and your drawing layers etc etc...Nice idea... really nice
Just to clarify,  what  I meant by "project support"  is that a project would be contained in a sub-directory tree.   The root could contain user defined categories such as room, character, etc.  Each of these categories would manifest as sub-directories in the root directory.  When the user selects "new" from the menu he would first have to specify what kind of entity to create by selecting a category from a drop down list then then entering a new room name.  A directory is created in project->rooms->new_room_name for the new room and is populated with project specific room template files.  Here is an example of what a project space may look like.

project
     rooms
          intro  
               intro-00.sps (spw=SpacePaw source file)
               intro-01.sps
               intro-01.spx (spx=Spacepaw export file)
               intro-01.png
               intro-00.txt
     characters
     gui
     inventory



Quote
(I might not be able to integrate it with ags as I'm not sure if there's a possibility to write an import plugin for it) you would just "add room" where you would have areas layers and your drawing layers etc etc...Nice idea... really nice
So far this is non-AGS or game engine specific.   The game engine doesn't necessarily need to know the anything about directory structure with regard to integration.  Integration would come about through an open source file format and api (i.e. .spx in the above example) for an export file containing the information required for a game engine to import  the entities which it contains.

So in AGS an editor plugin would be required. to import  the spx file.  You say that you are skilled in .NET and CJ is usually very willing to provide functionality required by plugin writers so I would be very surprised if this couldn't be done.

Quote
Nice idea... really nice
Glad you liked them   ;D

[edit]
The MNG file format may be a candidate for your spx file.  It's the PNG equivalent of a GIF I suppose.  Anyway here is the link.
http://www.libpng.org/pub/mng/spec/
#847
I think you are looking for the String.StartsWith, String.EndsWith and String.IndexOf functions.

http://www.adventuregamestudio.co.uk/manual/String.EndsWith.htm

[edit]
and of course String.Replace and String.Append.
#848
I would also focus on the characters.  Develop them, their history, personality, etc.  I have found that if I can invent really good characters and if I get to know and care about them the story writes itself.   

One other advice that I got from here many years ago and has served me well is to first create the world in which the story takes place so that all the rooms have walkable areas and so that the main character can walk from one room to the other with outh respect to plot, puzzles, etc. Next animate doors and make other elements of the game world functional.  As Mods says the plot and puzzles are subject to change and refinement and may do so radically over the course of a project.

Anyway best of luck... 
#849
@KhrisMUC - I think that's what he is after but it won't work that  way because on_call() isn't called right away.  It is queued to run the next time the room script runs and so the global script will never see the return value.

Something like the following would work and is perhaps what bspeers is looking for:

Code: ags

// Room Script

int on_call(int p) {
  if (ThingLooked=="house") Display("The house looks enormous.");
  else if (ThingLooked=="front door") Display("The front door is red and pretty huge.");
  else if ....
  else GiveDefaultResponse(ThingLooked);  // no output yet, print generic response 
}


Code: ags

// Global Script

// Global variable 
String ThingLooked;
Export ThingLooked;

// Global function for default responses
function GiveDefaultResponse(String thing) {
    Display ("Looking at the '%s' won't help", thinglooked);
}

// Example
ThingLooked = "garden";
if (Parser.Said ("look %s", ThingLooked)) {
   if (Parser.FindWordId!=-1) CallRoomScript(1);
   else Display ("The '%s' doesn't exist", ThingLooked);
}

#850
Quote
C++ in QT IDE+Compiler - cross platform and self dependant but I have no idea how to use it yet
C++ is a good thing for a programmer to know  ;D.  QT is easy to learn and  results in clean and efficient code.  It includes 3d, 2d, and svg graphics libraries.  It also includes support for network and web (webkit used in many popular browsers), plus support for script, plugins, and other llibraries as well.  I humbly suggest you take  a test drive.

Quote
I like the suggestion about it beeing designed especially for low-res game developers, what ideas do you all have concerning this? What functions (not talking about graphics now) would help you with developing the game then..
First of all I think that "2d game developers" rather than "low-res game developers" better describes the need.

Secondly to answer your question you need to think about the process of creating graphical elements, importing them into a game, revising, reimporting, etc, and how this process can be made more efficient.  Here are some of the things I would be considering were I in your place:

Revision Control/Automation
Consider what would be required to change an animated sprite.   Ideally one would open the graphics source file (many  people don't even bother to preserve graphic source) make the desired changes, save under a different (i.e. MyGraphic-V01.pdd => MyGraphic-V02.pdd), then export each frame.  In photoshop for example each frame could be on a different layer or collection of layers, so to export a frame the appropriate layer(s) would be made visible graphic exported to a file of the form MyGraphic-V02-LLFF.png (LL=loop number, FF=frame number).  The process would then be repeated for each frame.

It would be great if this whole process could be done with a single mouse click, or perhaps two at most.   There could be a configuration dialog where the user could control the process.  This would only need to be done once.

Gale, as well as some other programs, does a better job of exporting frames but it still requires multiple clicks and some data entry each time an export is made or a new version of source is saved.   

Integration with AGS and other engines
Now that we have exported our animation to separate sprite files we need to import them into AGS and then create animation loops and select a sprite for each frame.  But inside the graphics editor we already knew which graphic went with which frame.   

What if it were possible export the source file to a single output file that contained not only the graphics but also the animation loops and frames.  AGS could then make use of this file directly and automatically import sprites, define animation loops and frames, etc, thus eliminating the need  to do all this manually. 

For backgrounds the concept of area masks could be added to the export file format.  This would mean that the masks and background image would always be coupled and that AGS could import the whole shebang in one click instead of doing it a piece at a time.

Of course all this AGS integration talk makes .NET an attractive choice, one that perhaps should be reconsidered if your project takes shape in this direction.   If a more general game integration is the goal then it would seem like self contained C++ with a Game Engine Integration API ought to be the choice.  Just my opinion of course.  :=

Grids, Guidelines and Perspective lines/tools
I noticed you are getting a lot of commentary about grids.  Take a look at Visio and how it handles grids.  As you zoom in the grid becomes finer eliminating the need to change grid spacing to achieve a more accurate placement of points.  One only need to zoom to an appropriate level an viola the grid you need is the grid you have.  Implement this kind of scheme and you will  have addressed 99% of grid issues.

The other thing to consider having different styles such as an isometric grid or a perspective grid (i.e. grid lines would be equally spaced with regard to a horizon line and vanishing point), etc. 

Guidelines are of course those horizontal and vertical lines that can be drug from the margins of the drawing surface.  They are helpful in placing graphical elements in relation to existing elements.  It would be nice if this concept could be extended to support perspective drawing.    A simple implementation would allow the user to drag/draw a guideline from one point to another point in the drawing and would allow an endpoints to be moved so that line would rotate around the other endpoint.   Perhaps there could be an ability to define a vanishing point from two or more such lines of perspective.       

Other perspective tools would also be useful.  The equal distance fence post ruler thing comes to mind but I am sure there are other things that would be useful in making perspective drawings.

Project Support
It would be nice if there could be project wide settings, project specific templates and a project root directory.   If we are going to be specific for games then the project should contain categories of graphical elements such as rooms, characters, GUI, etc.  Perhaps these categories are configurable so the user can have as many or as few (even zero) as desired.  The root would then contain a sub-directory for each category of elements.  This would be done to provide easy navigation through the project.  When the user clicked he would first select the category and then the element or directory to open.  He could also elect to navigate the file system as one wwould normally expect.   
#851
General Discussion / Re: PixelArt editor
Wed 04/03/2009 21:41:52
Spacepaw, cudows for taking on such a challenge.  Is it your goal to make a paint program designed for the creation of game resources?   Since you are posting here I'll assume this is your idea and if it isn't may I suggest that perhaps such a goal would differentiate your project from all the other paint programs  and that it would be worth considering.       

Development Platform
If your project is going to be open source and you wish it to work on multiple platforms then I would suggest that you consider Qt.  Windows, Linux, and Mac OSX are supported.  Their development tools are also multi-platform and the resulting applications are fast, self-contained and not dependent on bloated runtime package.  It was recently acquired by Nokia who appear to have big plans and a commitgment to open source with regard to QT.

Animation Frames
Please make a convenient, automatic method of exporting animation frames to individual png files.  I really like how graphics gale does this and have found this to be the most accurate, reliable, and efficient means of importing sprites into AGS. 

Grids
Make your grid system automatically adjust to the zoom level.  Visio does this and now I can't live without it.   Having an iso-metric and other grid options would also be pretty  cool.

Guides
The paint programs I am familiar with have very limited or no support for creating guidelines.   Consequently I will use Visio ot sketch out a background, export the drawing to a PNG and then use Photoshop or whatever to paint in the details. 

I would like to suggest several different types of guides that would be useful. The first type is the normal horizontal and vertical guidelines that many programs allow you to drag on to the screen from screen rulers.   They are not part of the drawing and have behavior similar to the grid.  It possible to snap to a guide line the same as  snapping to a grid line.   It should be possible to reposition a guideline just by dragging it,

The second type of guide lines would be used for perspective.  It would be cool if you could create one or more points of perspective and drag lines from those points to the edge of the screen or to some location in the drawing.   These lines would be connected to the perspective points so if the such a point were moved (by dragging it) to another screen location  then all of  it's line would remain connected in the new location.   I suppose it would also be useful to create a non-connected perspective lines so that a photo or other image could be imported as a model and perspective lines drawn between or along references in the image. 

Both kinds of guidelines behave similar to the grid and can be setuo for snap-tooperation.  It would probably be a good idea to differentiate them from the grid  and each other by using different (configurable) colors. 

Vector Graphics
The third kind of guide I use is a vetor graphic sketch.  As I said before I use Visio to create a vector sketch of a background, export it to a png file, and then import it into a layer in Photoshop or other paint program.  From there I can place individual objects on specific layers by duping the vector layer and erasing the unwanted objects.   Detail can then be painted into the new layer using pixel art  techniques.   The process is repeated until the image detail is complete.

It would be cool if simple vector graphic elements (shapes) could be created and then later converted to pixels, perhaps via a context menu.  Another intriguing alternative  would be to maintain the individual vector objects as drawing surfaces.  So then you would sketch the background using vector elements (simple geometric shapes or collections/groups there of ).   Details would then be painted onto the object using pixel painting tools.    The objects could then be moved around, scaled/skewed to fit perspective, etc.   Each object could even have it's own set of layers.  It would be pretty  cool  ;D

Shared/Community Resources
A while back one of our members, Mari, came up with an interesting way of quickly creating backgrounds.  It was discussed in this thread.

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=33765.0

Basically there  would be one or more models for a background.  The model would dictate such things as scale,perspective, etc.   There would be a library of layers that could be selectively applied to the model to create a background image.

This is similar to the way Charas works to create character sprites for RPG games.   You can checkout Charas at their website here:

http://charas-project.net/charas2/index.php

Anyway I was thinking that it would be pretty cool if your editor was web/ftp enabled and was able to assign a file to a layer so that,  in addition to pixels and/or vectors,  a drawing could also consist of links to external files.   For example and object or layer would contain a file name instead pixels and vectors.   

If this sounds interesting we could certainly discuss  it in more detail.  Obviously the above explanation is not detailed enough to implement code.

==============

I have some other  ideas and can expand upon some of the above if you are interested.  I hope my comments are in some way helpful or inspirational.
#852
I would also add that the AGS script language documentation very useful, complete and kept up to date on a continual basis.   It is also well supported by a syntax high lighting, auto-completion, scintilla based editor and a very active community.   ;D   
#853
Quote
sExplosion.Play(optional channelID);
sExplosion.Stop();
sExplosion.SetVolume(60);
It would seem like this approach would offer more possibilities and would be my preference.   Prersummably there would be a an Explosion.wav or Explosion.mp3 file in the a Sound directory.

Quote
Important to me is the ability to play speech sounds from custom scripting, and not just from the Say command, as its something I come across alot when writing modules. Also, the whole task of creating a voice pack for a game is very onerous, simply in the admin of matching huge numbers of speech files to text in the game. Perhaps another option is some kind of matching system that uses MP3 tags or filenames to match against speech lines semi-automatically. Or even word-based speech files.
If the above sound object approach was used then instead of tryiung to match dialog text to voice files the sound object itself could also contain the dialog text.

   sExplosion.Text = "Get down there's going to be an explosion!";
   Display(sExplostion.Text);

Actually MP3 tags and other sound file attributes could also be exposed in this manner as well. 

Quote
However, I do think that there should just be a Audio namespace (accompanied by an Audio folder in the Game directory), rather than Music, Sound, and Speech. However, I think it would be nice to have subfolders within the Audio folder, so that you can seperate them that way for yourself (optional too).
I would agree with ther need for subfolders as well.


Quote
If something like this :

channel[1].PlaySpeechFile(cEgo,1);

can be placed, it would be really really cool.
I would prefer something like:   

sSound1.Play(eChannel-1);

or

cEgo.Say(sSound1, eChannel-1);

In the latter case if the sound object contained text then the text would be displayed and the sound played.

#854
A thought about promotion ...

How about gearing some of the contests and activities towards the RoN universe so that additional resources may be generated.    If all submissions were made with a suitable CC license and then archived somewhere then there would be an ever increasing supply of reasources.  The ones deemed of suitable quality could be included categorized as "RoN" and the others as "Non-RoN"
#855
Quote
My first thought after reading this was 'But if you want to introduce them to programming, why aren't you showing them an actual programming language with compiled examples?' ...
IMHO, with AGS it is quick and easy to make progress and accomplish something. Students are able to get a "quick fix" that will encourage them to continue.  In an "actual programming language" it is nrecessary to learn a whole bunch of boring "junk"  before getting any kind of gratification (except of course for the hardcy and truly geeky individuals...).  So I think AGS is a good choice for an intorduction to programming.

Quote
I beleive thats an importrant technical question. So far backwards compatability between versions has been an impossibility. I think we should start exploring ways to address future versions with backwards compatibility such as Glenn has expressed. It would be nice to clear the bridge between versions for small and large projects with a revised editor version.
One could begin to address this issue by simply displaying the AGS editor version the game file is compatible with instead of just saying that it was created with some earlier version of the editor.   At least then you would know which version of editor is needed.

The next step would be to devise a standard method of installing multiple versions of the AGS editor on the same machine.   If an older version game file was opened with some future version of the AGS editor a dialog could popup stating which version of editor the game file is compatible with and give the user the option of upgrading or of launching the appropriate version of editor.   Just some thoughts...
#856
Thanks for the link. 

Over the years people have started and then either finished or abandoned countless projects.  Should anyone which to resurrect an abandoned project, update or make a sequel to a finished project then having a list of previous key versions would be very useful.   

I also think it's important to preserve our history here.  Not only past versions of the editor need to be preserved but also the projects produced with it.  How many games in the game database have broken links and/or have completely disappeared off the internet completely?   This is prehaps a little off topic but perhaps we should have a discussion as to what best practices a game developer should follow in releasing a freeware game so as to ensure it's prepetual availability.  For example here are a couple of ideas off the top of my head. 

- establish an offline AGS repository or AGS vault (i.e. no server limitation on space etc.)
- release source to an AGS vault to make future upgrades possible 
- mirror games on archive.org, AGS server, AGS vault, etc, etc
- recommend file naming conventions
- ???

If there is interest in this discussion I suppose it would be best to move this thread to the AdventureGameChat or GenGen forum.  Please feel free to do so.
#857
Question:  May I have a link to the last AGS editor to run in Win98.  I would like to upgrade my AGS sandbox on my mom's old computer at her house.  Thanks.  ;D

Suggestion: My above question got me thinking about the AGS download page.  I was thinking  that it would perhaps be a good idea if there were links to previous key versions of the  editor.    We could discuss which versions are key but they would include the last versions before major features such as dos support, interaction editor, script language changes, etc, were added or dropped.  Perhaps also, versions required to upgrade an existing game project would also be on this or another list.

If there is a concern about server bandwidth / space the perhaps these versions could be made available via archive.com.  Actually it would perhaps be worth considering making all previous verions available there and just keeping a list (with links) of key releases on the website.

Anyway thanks for the listen and  please remember to leave linky to last Win98 supported version.  Thanks.
#858
Quote
I think the answer is pretty obvious. A promise by the colonial powers to take Palestinian land and give to Zionist settlers that was only partially fulfilled would hardly strengthen you case.
I think you are missing the fact that at that point in time England owned of the whole area.  As the legitimate sovereigns they could do with that land whatever they wanted and eventually they partitioned off a piece of it and created the country of Israel.  This is pretty much the way Iraq, Jordan, and a number of other countries in the area came into being.     

Quote
That said, do you honestly think that the misery and dysfunction of the Palestinian territories has nothing to do with the restrictions on travel, the security fence, the blockade, the demolitions, the targeting by the Israelis of Palestinian political leaders, police and security forces, and all the other things listed above? Foreign aid, even billions of dollars in foreign aid, cannot make you prosperous. Only a functioning economy can do that. And I cannot imagine how you could build a functioning economy under such conditions.
Yes I do!  The Palestinians practice a flawed philosophy of death and violence.  All the things you listed above are the result of 50+ years of violence and war directed at Israel.   Has Israel ever launched an unprovoked attack on anyone?
#859
Quote
Are you unaware of or unable to understand that Israel is making sure Gaza gets neither humanitarian aid nor even electricity?
Well there is a war on isn't there?  And cutting off the enemy's supplies is a legitimate tactic isn't it?  And as nacho says, Hamas's violent actions towards Israel enjoy popular support by a majority of the people, so what's going on now is an unfortunate consequence of their own deeds.   Apparently the conditions are not bad enough to make them see the error of their ways. 

[edit]
Why are you not also condemning Egypt?  Are we to believe that Israel has the ability to control the Egyptian government?   

Quote
They are surrounded on three sides by friendly Arab countries.  Over the years they have received billions and billions of dollars of foreign aid from both the West and other Arab countries.   They have had every opportunity to create a modern and prosperous country just as Israel has done but they have chosen another path.   Instead of building a future for their children they spent all that money on hating Jews.   Now they have only themselves to blame for their current situation.
You quoted this from my earlier post but apparently haven't read it.   Your response doesn't seem to be at all releated??
#860
Quote
Actually, Hamas's stated goal is to destroy the state of Israel and drive the Jews away to somewhere else (probably Europe or the US). They don't say they want to kill them all. (I'm sure some Hamas members have said it, but it's not their official policy.)
Where did you get the "probably the US or Europe" thing; I think the "somewhere else" the Palestinians have in mind is the sea.

Quote
So if you responded by beating him up so severely that he ended up in the hospital with serious injuries, that would be OK? (Not to forget that he started hassling you because you took his house and locked him in your yard, by the way.)
From Wikipedia
With the break-up of the Ottoman Empire at the end of World War I, the League of Nations and the occupying powers were required to redraw the borders of the Middle East. The ensuing decisions, most notably the Sykesâ€"Picot Agreement gave birth to the French Mandate of Syria and British Mandate of Palestine. More than 70% of the British Mandate of Palestine was east of the Jordan river and was known as "Transjordan". Until 1921, the land was supposed to be part of the Jewish National Homeland, the land designated by the League of Nations to be the future Jewish State of Israel. In 1921, the British gave semi-autonomous control of Transjordan to the future King Abdullah I of Jordan, of the Hashemite family, after his failed attempt to take control of Syria when his brother King Faisal I became king of Iraq. This partitian was in breach of the British Empire's undertaking to make Palestine a Jewish state as was required under the terms of the mandate, and as such outraged the Jewish population, but pressure from the Arabs caused the British to acquiesce to the Hashemites' demands.

So now who took whoose home from whom?

Quote
You have to remember that Hamas and Gaza are in a desperate situation. Gaza has been almost completely blockaded by Israel (and Egypt),
If this is the issue then why isn't Hamas firing rockets into Egypt as well as Israel?  Could it possibly be that the Egyptians aren't Jewish?

Quote
Actually, Hamas has for a long time provided schools, hospitals and other public services to people in the Palestinian territories, even before they took power in Gaza. Their popularity rests to a large extent on the fact that they were more effective than the Fatah-led government in providing such services and necessities.
The charitable portion of Hamas is used to foster dependence and loyalty, it's used to to indoctrinate the young into their philosophy, fund terrorist attacks, and to payoff families of suicide bombers.  

Quote
Palestine people live in misery with bad social and health conditions. Only a few can reach knowledge as we understand as normal. The place is filthy and unhealthy. A few meters away you can find a totally different country, a rich and modern country.
They are surrounded on three sides by friendly Arab countries.  Over the years they have received billions and billions of dollars of foreign aid from both the West and other Arab countries.   They have had every opportunity to create a modern and prosperous country just as Israel has done but they have chosen another path.   Instead of building a future for their children they spent all that money on hating Jews.   Now they have only themselves to blame for their current situation.

Quote
No, because the terrorists didn't and don't value life the same way. They wanted as many innocent people killed, because to them, there are no civilians. Everyone of us is evil and needs to be destroyed.
Quote

You know Mills, I found your arguments for Israel to be quite moderate until I read this, and it says much about your way of thinking.  You don't actually think that terrorists label an entire people as evil, do you?  
From Wikipedia
"A study by the NGO Freedom House found Wahhabi publications in a number of mosques in the United States preaching that Muslims should not only "always oppose" infidels "in every way", but "hate them for their religion ... for Allah's sake","

Quote
I don't get it.

Why shoot rockets into Israel? Did REALLY any of Hamas/insurgents/whatevertheyrecalled think that it will do any good?
Well let's see, what will Hamas get out of this?  

- International sympathy and attention
- Huge cash donations from wealthy Arab countries
- A more dependent and therfore compliant population
- More public support for their philosophy (i.e. jews == bad)
- International criticism of Israel



SMF spam blocked by CleanTalk