Author Topic: an AGI/Web game  (Read 11906 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris Cromer

Re: an AGI/Web game
« Reply #15 on: January 30, 2002, 11:36:19 PM »
I need to make a decision on which way to go for user interface. Everybody please give me your opinions on this.

Should I use a parser, point and click, or a mixture of both?
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline Nick Sonneveld

Re: an AGI/Web game
« Reply #16 on: February 01, 2002, 08:52:05 PM »
I think if you're going to go to the trouble of recreating an AGI game, you should try and stick with the look and feel.  But I think you should do whatever you feel is easier and appropriate.

- Nick
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Chris Cromer

Re: an AGI/Web game
« Reply #17 on: February 02, 2002, 03:12:35 AM »
Point and click would be the easiest one to do because links are already built into web browsers. The paser would take me having to write a function to use a text box and have some sort of way to parse it. I think I would like parser to stick with the original AGI games but then only reason I asked is because I wanted to know what everyone else thinks about it.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline RaDIaT1oN

Re: an AGI/Web game
« Reply #18 on: February 02, 2002, 04:40:58 AM »
A text parser would be the better option.
IMHO "point and click" is for people who can't or are too lazy to type.

The implementation would be more complicated.  I really don't remember javascript at all, but I don't know how you would even load the dictionary without using a linked list of some form.  Writing the parser for AGIL had me scratching my head for days.  Another trick to it is when words have spaces in them, so you can't simply use spaces as word delimiters.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »

Offline Joel

Re: an AGI/Web game
« Reply #19 on: February 06, 2002, 11:53:25 AM »
technically, you're talking about writing a lexical analyzer that matches the longest possible string, not a parser.

as for loading the dictionary, I don't think it would be that difficult. A linked list probably would not be a good approach, because the dictionary probably would not be changing very much at run-time. An static array of sorted arrays would probably be a reasonable approach. I would definitely say put the declaration in a separate js file. You could also put a function declaration in that file that performed something like a binary search through each of the word groups. There might be a better way to do it than that, but it would probably be pretty complicated.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »

Offline Chris Cromer

Re: an AGI/Web game
« Reply #20 on: February 06, 2002, 12:45:37 PM »
I am thinking about making a mix between a sort of text paser and point and click. The point and click will be used for moving the character from room to room while the text parser will be used to do things in each of the rooms. What do yall think of this?
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline K.J.

Re: an AGI/Web game
« Reply #21 on: February 06, 2002, 10:02:11 PM »
Go for it and let us know your progress :).

BTW, I think that you will need to use CGI as it is far more powerful than JavaScript, and CGI programs can be written in C/C++, BASIC, PASCAL, etc...

Though I guess that you might be able to use Java.

K.J.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »

Offline Chris Cromer

Re: an AGI/Web game
« Reply #22 on: February 06, 2002, 10:12:12 PM »
There is a few problems with using CGI.

1. My server does not have a cgi bin.
2. I don't know anything about CGI.
3. Server side is also not my specialty.

So for now I am stuck with JavaScript and HTML.

As for a progress report:

I have made a function to make the cursor stay the hand at all times even when you are not over a link.

I have also made a function to disable right clicking so that you cannot look at my code/or cheat while playing the game.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline K.J.

Re: an AGI/Web game
« Reply #23 on: February 06, 2002, 10:24:59 PM »
I have made a function to make the cursor stay the hand at all times even when you are not over a link.

I have also made a function to disable right clicking so that you cannot look at my code/or cheat while playing the game.


Could you please send those my way?

K.J.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »

Offline Chris Cromer

Re: an AGI/Web game
« Reply #24 on: February 06, 2002, 10:31:48 PM »
This is the code for disableing the right click:

Code: [Select]
function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}


and this one is for making the mouse icon stay the hand:

Code: [Select]
function changecursor()
{
     document.write( '<body style="cursor:hand">' );
}
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline Joel

Re: an AGI/Web game
« Reply #25 on: February 07, 2002, 07:38:36 PM »
Although I don't really want to encourage it because I think this kind of activity is major abuse of JavaScripting, but does that JavaScript code block someone from using the Windows Context Menu key (or Shift-F10)? Have you disabled the menu bar for the game (making View->Source inaccessible for IE users)? If not, there's not much point in doing it, because anybody who really wants to cheat is going to find a way to do it anyway. Of course, even if it did block the context menu key, I'm sure it would be no problem to find a utility that downloads HTML files and displays the source rather than interpreting it.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »

Offline K.J.

Re: an AGI/Web game
« Reply #26 on: February 07, 2002, 08:50:17 PM »
I was just messing around with AGISCI's Javascript code and found out what Joel said. I think that what needs to happen is that the game needs to be started from a link that opens a browser window with no menu, address bar, or nav bar(like those anoying popup ads).

K.J.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »

Offline Chris Cromer

Re: an AGI/Web game
« Reply #27 on: February 07, 2002, 10:25:17 PM »
Quote
I think that what needs to happen is that the game needs to be started from a link that opens a browser window with no menu, address bar, or nav bar(like those anoying popup ads).


My game already does that.

Quote
Have you disabled the menu bar for the game (making View->Source inaccessible for IE users)? If not, there's not much point in doing it, because anybody who really wants to cheat is going to find a way to do it anyway. Of course, even if it did block the context menu key, I'm sure it would be no problem to find a utility that downloads HTML files and displays the source rather than interpreting it.


There is many possible ways to read the code and cheat. This just makes it harder for the user to do so. For instance your windows store web pages in a temporary directory. Now if I were to load the page then go to that directory I could open the file in a text editor and view the code. There is always some way to read its source.

Quote
Although I don't really want to encourage it because I think this kind of activity is major abuse of JavaScripting, but does that JavaScript code block someone from using the Windows Context Menu key (or Shift-F10)?


I am not sure if it does or not. I have not thoroughly tested it yet. The only thing I really tested was to see if I could disable right clicking.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline K.J.

Re: an AGI/Web game
« Reply #28 on: March 18, 2002, 07:28:13 PM »
So how is the game going?

K.J.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »

Offline Chris Cromer

Re: an AGI/Web game
« Reply #29 on: March 19, 2002, 01:06:09 AM »
I have been focusing mostly on V, but it is still coming along quite nicely. I am still having a few problems with saving to a cookie though. I don't know anything about cookies and how they work which is making it a little harder to impliment saving.
« Last Edit: December 31, 1969, 07:00:00 PM by 1018072800 »
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.15 seconds with 20 queries.