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

#1681
Here are a couple of things you could try if you haven't already done so. 

  • Use a head hunter to help get you to interviews.  He/she will help you refine your resume  and send them to people loking for people to hire.   

  • Try doing some independent gigs.  Here is a good place to find some  Dice.com.  Here is another place ut they don't pay as well http://www.rentacoder.com/RentACoder/default.asp.  There are others as well but this one is pretty much geared to IT.   

  • Have you spoken with consulting company or temp companys?  They earn their keep by supplying peole for specific projects. 

  • Volunteer for an open source project.  That should get you some points for experience and may even lead to a paying gig. 


    You have to remeber that in the software and tech industries things change fast and employers are interested in what you can do and not what school you attended or what degree you have.  That's all minimum requirements.    The advantage of not having much experience is that you are mallable, hardworking, and find grunt work interesting.  Get on a project that can use some of that stuff and you'll be on your way.  Of course if you are lazy, inflexible , and arrogant then you may be working at Fry's for a very long time ;).



#1682
Quote
(And it's actually illogical in mathematical sense to treat these conditions as FALSE, they're actually all TRUE ...
I believe that from a rigorous mathematical point of view, the result of operations on non-existent entities is undefined.    So when something like a divide by zero happens in a computer program an exception handler is invoked so that something can be done about it.  If the program was making scientific calculations to model the orbit of a space craft it would perhaps just stop and report what happened.  If it were on board the space craft and actually controling the orbit, instead of stopping, it would likely return a sensible value (likely a really big number)  and continue on.     

From a practical and logical point of view I don't see how a non-existent entity could ever be considerd to be equal to an existing entity of any value.  If it don't exist it can't have that value, whatever it is.  In the example you give "while (k[-1]=='a') {...}" the while loop would never execute because k[-1] is not equal to 'a', so I would think the programmer would realize the loop wasn't executing, and then go figure out why. 

IMHO, the best reason to not use my suggestion is that it may not mimick C as closely as one would desire and could therefore cause some confusion or that there is some unforseen, terrible side affect that's a show stopper.  Oh well, I think we should stop talking about this anyway.  CJ knows about the issue now and will most likely do something we all will be satisfied with as he always does. 

Thaks for the intersting converstion Gilbot, I sincerely enjoyed hashing this out with you.    :)

#1683
(Edit by strazer: Thread was split, don't be confused.)

Module Programming Conventions
I had a go at documenting the conclusions reached in the discussion below.  I will update these as the discussion progresses. 

  • Module Programming Guidlines
  • Module Script Template
  • Module Header Template



    Here are some questions that came to mind during development of the IniFile module.  Let me know your thoughts or perhaps you may have other questions.   

    Documentation
    I embedded tutorial and reference docuemnts in the header file because I thought that, that documentation should always stay with the module and a seperate/external file wouldn't be as tightly bound as  the header would be.  However, after finishing the documentation, it seems to me that it is too large to be embedded in the header and that this would probably be generally true for most all modules (unless of course the author neglected to produce any documentation).   Ok, so then where should the documentation reside, if not in the header file?  External txt file?   Should we ask CJ to add a text document to the module mechanism?  What other alternatives are there?   

    Programming Conventions
    What programming conventions do we need to recommend so that modules from multiple authors and times can be used together in the same game.  For example inIniFile the module name is used to define a struct (i.e. OO Object) and to prefix #define definitions to ensure these definitions would be unique and not interfere with other modules.   So if there is only one module named IniFile imported into the game there shouldn't be a problem. 
       struct IniFile {
          :
       }
    
       #define INIFILE_BUFSIZE 500
          :
    

    So what other, if any, conventions are necessary to avoid such incompatibilities?   

    Publishing, Licensing, etc
    I think we should recommend some publishing guidelines to make the module feature as useful as possible for as many people as possible.   Should it be native scm format or compressed into zip.  If the latter what other, if any, files should be included in the zip.  What kind of license should we recommend?   I used GPL for the time being for lack of better ideas.   Probably we could come up with something the is much briefer and serves the purpose of giving people permission to use the module in their games.   Any ideas?    I think also we should recommend which "permissions" should be enabled in the Module Manager.   These recommendations would of course be for module authors wishing to publish their work for use by the AGS community.  If someone had a reason to do something different they could elect to do so.   Such recommendations would be a common starting point for all and would encourage consistency.   What should be recommended?

    Announcing, Reviewing, Release Module List
    How should new modules be announced and reviewed?  Should this be done in the AGS forums, if so which one(s)?  Where can we keep a list of released modules - maybe a sticky or somewhere else?

    Edit 2006-04-27:

    A short summary of the guidelines can now be found here.
#1684
Quote
Firstly, yes this whole issue is because AGS does not do lazy evaluation on && and ||. (while it's called lazy, it's actually more complicated since the compiler would need to check the first side and generate JUMP instructions depending on the result).
Why not just make comparisons with a non-existent entities always return FALSE?  Well maybe there a couple exceptions but couldn't the bounds check do something like the following when encountered in a conditional expression?   If something doesn't exist it can never be equal to, greater than, etc to anything. 
  (buf[-1]==A)  =  FALSE   
  (buf[-1]!=A)  =  FALSE   
  (buf[-1]>A)   =  FALSE         
  (buf[-1]<A)   =  FALSE                       
  (buf[-1]>=A)  =  FALSE
  (buf[-1]<=A)  =  FALSE
  (buf[-1]&&A)  =  FALSE
  (buf[-1]||A)  =  FALSE

I don't know if this mimic's the behaviour of C in all cases but it may be easier to implement than doing all those partial evals and jumps?  It seems like this would work for the examples given thus far though.  Hmmm,  this would also, on ocassion , negate the need to check pointers for null as well?   For example:
instead of this....
   if ((ptr != null) && (ptr.ID > 0))

if (ptr.ID>0) evaluates to FALSE  when ptr==null, you could 
just do this... 
   if (ptr.ID > 0)


Quote
if you put a room file called "_blank.crm" in your game folder,...
Great!! Maybe one of these days you can get around to doing the same for modules.  Thanks...

Anyway CJ, thanks for taking the time to listen to us.   8)


#1685
SSH:  Hehe,  Ok.  How's this ...

Quote
When a sprite is imported, make part of its property box the name of the original import file (or "Clipboard"): this is becuase it is sometime hard to tell sprites apart!
This is a really great idea!  I would even go further and generate enum values from the file name so that individual sprites could be accessed by name rather than number. 

Quote
Parametrisable #define macros
This is also a good idea, I support it.   

Quote
Third-party preprocessor: before AGS runs its compiler, it could run an arbitrary 3rd party tool on a temporary text file containing all the scripts to allow full preprocessing.
This is the kind of crazy ideas I usually have and I usually don't talk about them because I don't want people to think I'm crazy  *** mad scientist laugh ***.   So I am uncertain if I should support this or not ;).    Having said that, I am crazy enough to use such a thing if it were available.   

SSH, Steve, Snarky:
[quote  author=SSH]
This kind of "only evaluate what you NEED to" is called lazy evaluation and almost every compiler I've seen does it.
Quote
[quote  author=SteveMcCrea]
It's entirely practical - a lot of C code relies on it.
Quote
I stand corrected.  This is probably the reason I expect to be able to itterate through a list using "while (conditional)"  whithout the need for extra machinations.   I think most programmers would have the same expectation regarding this. 

Gilbot:
I think we have a fundamental disagreement about "while ((i>=0)&&(buf==' '))".  I don't agree that there is an error in the conditional expression.  As the others point out , since in the case i=-1,  the the index i does not meet the first test, the second test is not necessary and so it need not access a non-existent array element.  As the others have said, this is the case in nearly every modern day compiler, so one would think that most programmers expect the above example to work.   As the others point out, these sitiuations will only become more frequent in AGS V2.7 and when the man says "pay me now or pay me later"  it's usually better to pay now, IMHO. 






{
   buf = 0;
   i--;
}

===========

Room and Module Templates
Here is one more suggestion.  If the files  exist in the Have the editor commands "New Room" and "New Module"  populate the newly created room or module with the contents of the corresponding template files template.crm, template scm.  The
files could be located in either the AGS install directory or in the game directory.   The game directory would be searched first and if a template was not found there it could then search the GAS directoy.  If a template file is not found then it would do what it does now.   This would allow people to automatically include header and other comments when making a new module or room. 

#1686
Quote
Isn't the real problem here that AGS evaluates the right-hand side of an "&&" conditional expression even when the left-hand side failed?
Yeah.  That occured to me as well but I don't think it's practical.  it seems to me that the entire expression needs to be evaluated before you can know for sure if the final result will be true or false.   Although in this case it doesn't seem all that complicated I don't think that's true for all possibilities.

Quote
Quote
The workaround requires additional code complexity to achieve the same functionality.
this can be easily worked around (not as complex as you mentioned)
Gilbot, your workaround adds an if-else structure and several lines of code.  Further, the index i is not preserved in your example.  If it's needed then an additinal variable is required  to break the loop.   At this point it's easy enough for me to live with but it is never the less annoying.   It will likely be troublesome to the uninitiated.  Although I can't say for certain, I suspect it's not difficult to disable the bounds check for while loop (or other) conditional expressions and that what is lacking is a clear definition of what should be done.  If so I think it is at least worth having a short discussion about it.

As far as access safety is concerned, is not the bounds check a relatively new feature?  I thouhgt it was added to aid in locating array index type bugs rather than preventing memory access exceptions?  If access saftey is indeed an issue then the bounds check could perhaps substitute a value in place of the invalid array element and then allow the evaluation to continue instead of aborting? 

SSH:  I'm sorry for hijacking your thread.  I didn't intend to take up so much space here; I thought this annoyance was worth a mention on your list.  I owe you one.  ;)


#1687
SSH, hope you don't mind me adding a suggestion to you list.  I've taken this liberty in light of your subject line and your previous suggestion post. 

The array bounds check is very helpful but is annoying when trying to impliment a while loop.   In the example below the while loop is should stop looping when variable i reaches a value of -1 as detected by the first part of the conditional expression.    In this case the second part of the conditional erpression and the value of buf are irrelevant .  However,  the bounds check creates a runtime error, when i reaches -1 because of the second part of the conditional expression.  The workaround requires additional code complexity to achieve the same functionality. 
while ((i>=0)&&(buf==' ')) {
   buf = 0;
   i--;
}

I know I brought something like this up recently and the answer I got was to make the code work better.   I have been working around, since but now with a better understanding of the issue and the experience working around, I am of the opinion that this is really annoying and that it is legitimate for an array index to exceed the bounds of the array in the context of a while conditional expression. 

Would it be reasonable to disable the bounds check on while loop conditional expressions or perhaps all conditional expressions?  Or is there some other way to achieve the same result? 


Quote
When a sprite is imported, make part of its property box the name of the original import file (or "Clipboard"): this is becuase it is sometime hard to tell sprites apart!
... or make the filename into an enum having the same numerical value as the sprite id number.

 
#1688
Advanced Technical Forum / Re: Roman NUmerals
Sat 29/01/2005 21:11:01
Quote
Is it possible to format the score show it displays in roman numerals?
Yes

Quote
I thought and thought and thought that someone here may be able to help me out.
Take SteveMcCrea's advice.  Here is on I've found for you but I haven't looked at it. 
http://www.programmersheaven.com/zone3/cat414/16170.htm

I've never written a Decimal2Roman converter before but I have done for other number systems.    Basically you start by dividing the the decimal number by the highest posible power of the number system you are converting to.  The result is then converted to the character(s) representing the highest order digint in the conversion.  The remainder is then divided by the next highest power of the number system, etc...   

My explanation is brief but it should help you get through an actual c code example.  let us know if you take this on.  Cheers


#1689
Quote
QuoteOuch, I was hoping to use this.  Are you talking about a peformance hit because of what the user script may be doing or because of internal overhead accessing stuff in a module?

Yeah it's to do with the internal overhead, however I have some ideas on how to streamline it, so this may not be an issue.
Thanks for the effort, I hope you are able to find a suitable solution.   For whatever it's worth,  if the performance penalty is incurred only when rep_ex() is included then it is perhaps tolerable.  It would just need to be noted in t he module description or header that this is the case.   I don't mean to disuade you from  attempting to eliminate the problem, but rather, to assure you that  I/we are willing to work around it if need be.   

QuoteThe option to modularise entire #sections would be great. It would effectively remove the need for a global script, but it would be a lot easier to keep track, especially now GUI scripts have changed the way they have.

Well, if you mean putting every single function in its own module then it would be possible, but the overhead of having 300 script modules would probably outweigh the benefits.
Quote
I don't know exactly what AGA had in mind in his original question but it made me  think along the lines of having seperate modules for character interactions inventory interactions, etc.  So I guess there would be something similar to one module for each character, one module for the inventory, one module for GUIs, etc.      rather than one module for each interaction function.

The automatically inserted/deleted interaction functions, IMHO, can get a bit untidy/unmaganeable as a game grows in size.   Perhaps another approach would be to use #section directives to manage the groups I describe above and maintain the global script as is.  The editor could then have some additional bookmarks and perhaps edit buttons in the inventory and character editor tabs.   
#1690
Quote
... I'm a bit concerned about performance if repeatedly_execute is done so I"ll have to consider that ...
Ouch, I was hoping to use this.  Are you talking about a peformance hit because of what the user script may be doing or because of internal overhead accessing stuff in a module?   If it is the former case you are concerned about then perhaps a "caveat emptor" disclaimer is all that is necessary.   If it is the latter case I can only plead ignorance and leave it up to your good judgement.   
#1691
Quote
... AGS doesn't have a concept of a "const string" parameter, so it can't really know whether the parameter will be written to or not. ...  it's non-trivial.
Yeah, I thought that may be the case so that's why I used the  "possible or practical" terminology.   Now that I know what's causing it I can stop doing it. 
#1692
Modules, Plugins & Tools / MODULE: IniFile
Thu 27/01/2005 18:24:15
AGS v2.7+ has a new feature allowing script modules to be created and used in a fashion similar to plug-ins.  So I took the liberty of making a module that provides support for reading INI configuration files, similar to the acsetup.cfg file AGS uses.  This was brought up a couple of months ago in a thread by Radiant.

Here is a link to the module.  I have included my test game for convenience.  Just unzip it to a game folder and open it with the AGS editor and do a Game->Test.  Have a look and let me know what you think.  Also please also comment on coding, documenting,  and publishing modules and in general.

Download here
Mirror

Are any other features needed or desired?  If so what?  Any bugs or incorrect operation?   Any incorrect or confusing documentation?   Current documentation is a bit redundant.  I prefer not to write about the same things in multiple places because it is nearly impossible to keep everything upto date. Any ideas about how to clean this up?
#1693
I did a bone head thing that took me a couple of days to figure out.  The story goes something like this.  I made a function called Delete(string section, string option) that deletes a single option value pair from an ini type configuration file.  If option is a blank string it deletes the entire section.   Delete calls nextopt(string option, value) functions which finds the next option in the file and copies the option name to OPTION and the value string to VALUE.  Ok, so far so good.   Now I make a test and call Delete("mysec", ""), so when nextopt() copies the option name to its parameter OPTION it actually is being copied to "".   After this really bizzare things start to happen making it difficult to find out what is actually going on. 

So I am wondering if it would be possible or practical for the compiler to check for someone writting to constant strings that are automatically created by AGS (i.e. "", "constant string created by AGS", etc).   So that if you did a StrCopy("", "#hit happens") there would be an error message telling that you can't write to a constant string.   

Late last night I began composing a bug report but decided not to post it when I wrote "I'll probably regret posting this in the morning...".    Were I in a different state of mind (no I don't mean inebriated  := but this problem did make me wish I was ...) or  had less programming experience I am certain I would have pressed the post button. 

Although this suggestion doesn't seem, to me, to be a high priority item, it could potentially save future headaches for all concerned.  I thought I would share my expreience and make this suggestion for whatever it is worth.     

#1694
Did you rebuild the vox file (i.e. Game=>Rebuild VOX file)?   MP3,  OGG, and voice are stored in the VOX file and WAV is stored in game files.   So perhaps this is the problem you are having.  If not then are you able to play other mp3s in AGS or just this one in particular? 
#1695
Quote
QuoteIs there anything that you guys is particularly important that should be added before 2.7 goes Final?

I think being able to have repeatedly_execute, game_start, on_event, on_key_press, etc. in modules is pretty important. It would make their inclusion more user-friendly.

I agree with Strazer.Ã,  It would make more complete/useful, etc...
#1696
Quote
Suppose, we have three module scripts added in the following order:

Module #1
Module #2
Module #3

Thus, the 2nd module can use the 1st one, while the 3rd module can use
both the 1st and the 2nd ones. ...
Tis raises a couple of issues I've been thinking about since modules became possible, programming conventions and dependency management. 

Programming Conventions
If multiple modules from multiple sources are to be used together then there needs to be a means of avoiding naming conflicts.   For example suppose Scorp and Rui each make really cool modules and I want to use one from each author and suppose Scrop in one module header there is "#define TRUE 42" and in the other module header there is "#define TRUE -1".  In this case there aren't many options (modify one of the modles or not using one of them). 

So how can programming conventions help?   One of the programming conventions may be that for published modules #define names begin with the module name.  So in the above example you would have "#define MODULE1_TRUE 42" and #define MODULE2_TRUE -1".   

I'm sure if we put our minds to it we could come up with a minimal set of rules that we could recommend to would-be module authors.   Of course would still be up to the individual authors to follow the rules but at least they would have some guidance.   

Dependancy Management
Scrop's previous post also points out the need for some kind of dependancy management.  I'm am not certain what form this should take but here are some ideas of what I am thinking about. 

At minimum there needs to be a way, in a given module, to list other modules that are required for it to work.   The list could be displayed in the module manager dialog or it could be in the module header as directive (i.e. #dependancy MyModule).   The list could also be in the header comments or the module manager description field but this depends upon the discipline of the module author(s) and good programming conventions. 

If the dependancy list were in the module manager or header then warnings could be generated by compiler or module manager indicating that this or that moduole is required.  This would indicate not only which modules need to be included but would also be helpful in getting them in the right order. 
----------

I'm thrilled with the new module stuff :)     



#1697
The 2.7 beta version now allows you to assign inventory windows to characters.  So you could create a dummy/invisible character to hold those four inventory items.  Then put the an extra inventory window assigned to your character in your gui.   

#1698
Quote
In fact, if I changed the script compiler to stop you doing that, would anyone have any complaints?
I put a variable and a tiny function in the script header once to achieve my purpose.   It was a long time ago so I can't off the top of my head remember more details but it seemed to be necessary at the time.  I think it had something to do with global functions not being able to access arrays declared in the room script or something similar.  So instead of a global function I just made an actual copy in each room.   Probably the new OO stuff would provide a better solution but I appreciate the flexibility.   How about giving us a directive (perhaps #norestrictions or similar)  to enable such things if we so desire and disallowing them otherwise..   

Anyway thanks for the module manager.  I am refining the IniFile thing and making it into a module.   I'll have some comments shortly about my experience  :=.
#1699
Quote
The header script does not apply to the global script, it apply to rooms only, so putting something in it won't let the global script use its content. ...
This is not quite correct.  Althought it is true that this is the primary purpose of the header it is also true that the header is prepended to both room and global scripts before compilation.  I think it would be more accurate to say this about import statements contained within the header rather than the header itself.  This was perhaps, Gilbot's intended meaning; thought I would just add some clarification.
#1700
Quote
... which, In both versions, 2.62 and 2.7b12 does not work at all, at least I didn't get it to work. Not on text windows! Most likely transparency function doesn't affect text window only, yet it works fine with other guis.
Can't a text window have an invisible backgorund color (i.e. color #0)?  If so then you could probably use two gui's on as the text window and the other as the translucent background the same a LSL7 template.

Quote
And... even if it worked? would text be transparent too?
If you have been following the beta thread, I believe one of the issues discussed was the desireability of making the GUI background translucent without affecting buttons, etc.  I can't rememember how or if that was resolved.   


*** Edit
Just noticed the word SUGGESTION in your topic, I thought you were asking for ideas for a work around.   What you describe sounds like a sensible suggestion; it's intuitive to me and seems what people would expect.  Didn't mean to poo poo your suggestion, I was trying to give you some different ideas you may not have tried. 

Cheers
SMF spam blocked by CleanTalk