+ Reply to Thread
Page 1 of 2
1 2 LastLast
Results 1 to 10 of 13

Thread: JChat Chat System (Exp2)

  1. #1
    Inactive Eirath245 is on a distinguished road Eirath245's Avatar
    Join Date
    Feb 2008
    Location
    England
    Posts
    167

    Post JChat Chat System (Exp2)

    JChat Version: 0.9



    ANYTHING IN RED IS NOT ACTUALLY CODED YET BUT IS ON MY TO-DO LIST!

    Will Record a Video at some point



    Introduction

    After seeing This, I took the much needed inspiration and made an OS. However, D3C and I decided to make a chat system. Although we never really got anywhere with it, I decided yesterday to try and make another one. So, I ended up with this. At some point, I hope to integrate it into my OS.
    Since I have only worked on this for ~3 hours (not constantly), it is definitely not finished, but this is the first version I have produced and it has all the basic features of a chat program, so I decided to post it here.

    Before I release it, I'd like to implement a few more commands and perhaps tweak and optimize some of the Client-->Server-->Client stuff.



    Description
    The Chat System consists of a Server, and multiple Clients. Each client communitcates with the Server, which then deals with the Client's request or message. The Server can also be directly controlled, and can be used to send commands to users or manage various features on the System. When a Client sends a message, the message is processed by the server and sent to each client. (Although not implemented yet, this could also be used to send commands and requests to the server). When a Client executes a command, if the command is Clientside, no information is sent and information stored on the Client's machine is displayed. If the command is Serverside (e.g. sending a special message), a request is send to the server, which then deals with the request and sends information back. When the Server is used to send information to a client, a command is sent which is run on the Client.




    Future Plans (To-Do)
    1. ADD MORE COMMANDS! At the moment, there are not very many features on the system, but I really need some inspiration to think of what else to code into it! (Suggestions welcome!)
    2. Special Messages - Shouting, Announcing, Whispering to another Client, whatever other stuff I (or you) can come up with.
    3. Client --> Server requests. At the moment, information requested by the Client can only be displayed if it is on the Client's E2. The facility is there to send information from the Server, but I haven't got round to coding it yet.
    4. Games? - It might be cool to allow users to play some kind of game over the Network. However, this will probably come later, since there's more basic stuff that could be in there first.
    5. Some fun stuff Viruses, and suchthelike
    6. Code a couple of E2 commands to make writing the code a LOT easier!
    7. More stuff that hopefully other people will suggest. For now, I've run out of inspiration.




    How it works

    Client
    To each client is connected a Console Screen, via Wirelink, and a Keyboard. It also has two inputs from the server, an input for text from the Server, from other clients, and one for commands to be run on it by the server. It outputs only text sent by the Client. It also stores the Client's nickname and the ClientID. The ClientID is set via Global Variable at the start.

    When the user presses enter, the system checks to see if the first character of the Client's message is "!" (the command prefix character). If it is, it checks to see if the command that the user entered is a valid command. If so, it executes this command, and if not, it tells the Client that their command was not valid. If the first character was not "!", the Client sends it's message to the server, which then sends it to the other clients.

    When a client receives a message, it prints it to the screen.

    When a client recieves a command from the server, it first checks to see if the command is valid. If the command is not valid, it sends a message back to the server, checking the version of the Chip (that command might not have been added yet), and telling the server that the command could not be run. If the command is found, it runs the command.



    Server
    To the server is connected a Console Screen, via Wirelink, and a Keyboard. It has an input from each Client. It outputs a String to each client, and a Command string, which is used to send commands to Clients for their machines to run.

    Currently, a server supports four clients.

    A server can execute commands on Clients. This either takes the form of setting a Variable on a Client's Machine (e.g. Mute, stopping the user from speaking), or physically Running a command on the Client's Machine. In the former case, the command is sent through the command output, and is received by the Client. It then processes the Servers request and sets the required Variable.
    In the latter case, the command is run as if the Client had typed it. It works similar to the !cexec ULX command, and is useful for managing Clients.



    Client Commands

    Code:
    !clear - Clears the Client's Screen !help - Displays the Client Help !me - Shows the Client's Name and ID !name <string> - Sets the Client's Nickname to the String !say <string> - Mainly used for !exec Server commands, this is un-needed by the Client


    Server Commands

    Code:
    !clear - Clears the Server's Screen !help - Displays the Server Help !mute <num> - Mutes the ClientID <number> !exec <num> <string> - Executes the Command <string> on the Client <number>


    Pictures

    Full Gallery Here



    The Client Machine. Screen, Processor and Keyboard.



    Basic Commands.



    Sending and receiving messages and muting.



    Remote execution from the Server


    Check out the gallery for the rest



    Special Thanks
    d3cr1pt0r - Thanks for the inspiration
    Black Phoenix - The Documentation for the devices was veeeery helpful
    The Wire Team - THANK YOU SO MUCH!
    Last edited by Eirath245; 01-20-2009 at 01:20 PM. Reason: Added Pictures :D
    [URL="http://www.sloganizer.net/en/"][IMG]http://www.sloganizer.net/en/image,Wire,lblue,blue.png[/IMG][/URL]

  2. #2
    Expressionism 2.0

    Syranide has disabled reputation Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,179

    Default Re: JChat Chat System (Exp2)

    Sounds nice and very complicated for being a chat

    JChat sounds like it would be made in Java

    Anyway, one thing you could consider would be to throw away the server and use the new "global vars" instead to transfer messages, would allow for creating channels easily and talking to people without physically connecting them. (A server could still be used, but you wouldn't specifically connect to it)

    It'll be interesting so see how it pans out.

  3. #3
    Inactive Eirath245 is on a distinguished road Eirath245's Avatar
    Join Date
    Feb 2008
    Location
    England
    Posts
    167

    Default Re: JChat Chat System (Exp2)

    It's a good idea, and at some point I will probably rewrite it to work like that, but for the moment it's easier just to have a server with good old conventional wiring :P

    J for Jonny, since my name is Jonny :P

    And I make it sound more complicated than it is, but that's a good thing... right? :P
    Last edited by Eirath245; 01-20-2009 at 12:46 PM.
    [URL="http://www.sloganizer.net/en/"][IMG]http://www.sloganizer.net/en/image,Wire,lblue,blue.png[/IMG][/URL]

  4. #4
    Inactive Eirath245 is on a distinguished road Eirath245's Avatar
    Join Date
    Feb 2008
    Location
    England
    Posts
    167

    Default Re: JChat Chat System (Exp2)

    Bump for pictures :P
    [URL="http://www.sloganizer.net/en/"][IMG]http://www.sloganizer.net/en/image,Wire,lblue,blue.png[/IMG][/URL]

  5. #5
    Wirererer Riddler is on a distinguished road Riddler's Avatar
    Join Date
    Nov 2007
    Location
    Rapture
    Posts
    159

    Default Re: JChat Chat System (Exp2)

    Nice, verry nice.

    /me wnats to see the code for accepting commands hehe

    Following up on syranide's suggestion depending on how you actualy go about it it may even be esayer to do than with a wire link server (but it may lower speed).

    @Syranide Diden't I read somewhere that global vereables have a big memory footprint though?
    Last edited by Riddler; 01-28-2009 at 12:49 AM.

  6. #6
    GUN
    GUN is offline
    Wire Sofaking GUN is on a distinguished road GUN's Avatar
    Join Date
    Jan 2008
    Location
    California
    Posts
    477

    Default Re: JChat Chat System (Exp2)

    you should use radios for all the hookups to the server from the clients, so you can just spawn a chat computer and it auto links up to the server and is ready to start chatting, you could also make chat rooms, so you can type !join or !create (room name) to have some privacy :P you could even have !moveto(player name,room name), kick, and ban :P

  7. #7
    Success: An illusion
    turck3 will become famous soon enough turck3's Avatar
    Join Date
    Jun 2007
    Location
    USA
    Posts
    1,170

    Default Re: JChat Chat System (Exp2)

    Quote Originally Posted by Riddler View Post
    Nice, verry nice.

    /me wnats to see the code for accepting commands hehe

    Following up on syranide's suggestion depending on how you actualy go about it it may even be esayer to do than with a wire link server (but it may lower speed).

    @Syranide Diden't I read somewhere that global vereables have a big memory footprint though?
    The issue with using wire links is that as soon as you send one piece of data over it, you have to wait for the next, and while that's all well and good for most things, for sending and receiving this kind of data, it will either get in the way or just make things more difficult. I've tried when I used my OS, after switching to globals, it's efficiency improved immensely, and then nobody had to lag.

    Quote Originally Posted by GUN View Post
    you should use radios for all the hookups to the server from the clients, so you can just spawn a chat computer and it auto links up to the server and is ready to start chatting, you could also make chat rooms, so you can type !join or !create (room name) to have some privacy :P you could even have !moveto(player name,room name), kick, and ban :P
    While radios would work (with a lot of extra work), the issue becomes:
    1. Radios are set upon creation, and what channel they're on cannot be changed (unless they added an input for that recently) thus there can be no chat room that is secure, because anyone can tap in.
    2. Radios can only send a certain amount of data per second, not fun
    3. Can radios send string data in string format? I don't think so, but correct me if I'm wrong.

    All those ideas can, however, be implemented with globals. Take a look at the networking on operating system post, you set your group based on the network name (or rather, it does that for you) and then you can send large amounts of data per execution of the E2; much more efficient. Oh, and rather than having !join and !create, no need, just !connect, like I did will work just fine, it all leads to the same goal.

  8. #8
    Expressionism 2.0

    Syranide has disabled reputation Syranide's Avatar
    Join Date
    Mar 2007
    Location
    Sweden
    Posts
    4,179

    Default Re: JChat Chat System (Exp2)

    Quote Originally Posted by Riddler View Post
    @Syranide Diden't I read somewhere that global vereables have a big memory footprint though?
    Relatively yes, because you have to store the string-key AND the value (if you use the string-method). But, that is negligable unless you use global variables or tables for storing something like maps or similar.

    You can safely store 10 000 variables, so of course you should use them, but it is important to not make a high resolution 3D holomap and try to store it in a table or with global variables.

    .

    Althought just a change for what I said above, I forgot that global variables are private, so it wouldn't be possible the way I described it.

  9. #9
    Wirererer Riddler is on a distinguished road Riddler's Avatar
    Join Date
    Nov 2007
    Location
    Rapture
    Posts
    159

    Default Re: JChat Chat System (Exp2)

    Oh, cool. In that case I have some changed to make to some of my expressions .

    Also. turck I actualy bileve (normal radios) can change it I recall seeing an inpout for "frequency" havent used it in a long while though may have been removed due to buggyness or something

  10. #10
    Success: An illusion
    turck3 will become famous soon enough turck3's Avatar
    Join Date
    Jun 2007
    Location
    USA
    Posts
    1,170

    Default Re: JChat Chat System (Exp2)

    @syranide private? agh! Well what if the two people in the same group were in the same prop protection group??? Or is there some way that it could be set so that they could be shared???

+ Reply to Thread
Page 1 of 2
1 2 LastLast

Similar Threads

  1. Where I have a mistake? [Exp2]
    By Klask in forum Help & Support
    Replies: 4
    Last Post: 02-21-2009, 04:58 PM
  2. need some help with EXP2
    By KustoM in forum Help & Support
    Replies: 3
    Last Post: 12-10-2008, 06:19 PM
  3. Wirelinks in exp2
    By Hitman271 in forum Help & Support
    Replies: 5
    Last Post: 11-23-2008, 10:11 AM
  4. Questions about Exp2 (Functionality)
    By Pyro-Fire in forum Help & Support
    Replies: 1
    Last Post: 11-09-2008, 01:18 PM
  5. CPU Chat System Help
    By Zachar543 in forum CPU & GPU Tutorials & Programs
    Replies: 5
    Last Post: 08-08-2008, 12:02 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts