Asuma Posted June 29, 2006 Report Share Posted June 29, 2006 How would you goabout making a console? Or a chatbox as in online games. Below is a double post that has been automagically merged into the original. This is in MMF by the way. Link to comment Share on other sites More sharing options...
Serephim Posted June 29, 2006 Report Share Posted June 29, 2006 Thats about the only thing i CANT tell you how to do. Its going to involve alot of Text objects, and obviously require events to recgonize certian strings. Link to comment Share on other sites More sharing options...
Asuma Posted June 29, 2006 Author Report Share Posted June 29, 2006 I figure it would. I at least want it to start a new line. Link to comment Share on other sites More sharing options...
FredrikTheEvil Posted June 29, 2006 Report Share Posted June 29, 2006 Should it support commands or just some builtin ones, or? Be alittle bit more specific Link to comment Share on other sites More sharing options...
Asuma Posted June 29, 2006 Author Report Share Posted June 29, 2006 Okay, you know in a online when you cheat. yo see about the five lines. When you type, you line pops up at the bottom, while the top line disappears. Like this CooGuy:He's a cheater! Hitbabe: Yeah, I saw him! Redman55: I aint cheat! n00b: ye he aint cheat! You: I saw both them cheat! Hitbabe: Yeah, I saw him! Redman55: I aint cheat! n00b: ye he aint cheat! You: I saw both them cheat! *Admin has kicked Redman55 Redman55: I aint cheat! n00b: ye he aint cheat! You: I saw both them cheat! *Admin has kicked Redman55 *Admin has kicked n00b Like that. Link to comment Share on other sites More sharing options...
FredrikTheEvil Posted June 29, 2006 Report Share Posted June 29, 2006 Happy Link™ Requires the text blitter extension. Link to comment Share on other sites More sharing options...
Asuma Posted June 29, 2006 Author Report Share Posted June 29, 2006 This what I need, but you limit to like 5 or 3? Edit: Nevermind, just shorten it. Will this work with color and such? Link to comment Share on other sites More sharing options...
hRook Posted June 30, 2006 Report Share Posted June 30, 2006 Ok, here's some pseudocode (Meaning I'll show you the logic, but you'll have to apply it yourself). The objects: CLIENTTEXTBOX = The text box the client (you) types your message into CHATBOX = A text area that displays 3 lines and automatically scrolls down when content is added Variables: CLIENT = The client user CLIENTNAME = The client's username CLIENTMESSAGE = The message the client sends SERVER = The server controller SENDERNAME = Name of the message sender SENDERMESSAGE = Message the server relays to the other users Client-Server Model ===Clientside:===//This handles sending the message to the server//Note: "\n" is a line breakCLIENTTEXTBOX is in focus, CLIENT presses Enter:+CLIENTMESSAGE = CLIENTTEXTBOX.Text+Send CLIENTNAME to SERVER+Send CLIENTMESSAGE to SERVER+Set CHATBOX.Text to (CHATBOX.Text + "\n" + CLIENTNAME + ": " + CLIENTMESSAGE)+Clear CLIENTTEXTBOX//This handles recieveing the message and displaying itCLIENT recieves message:+Set CHATBOX.Text to (CHATBOX.Text + "\n" + SENDERNAME + ": " + SENDERMESSAGE)===Serverside:===//Recieves a message, sends it out to all other usersSERVER recieves message:+SENDERNAME = CLIENTNAME+SENDERMESSAGE = CLIENTMESSAGE+Loop through all users, excluding the sender { Send SENDERNAME to CLIENTs; Send SENDERMESSAGE to CLIENTs; }[/CODE]Client-Client-Client-... Model (i.e. DirectPlay)[CODE]CLIENTTEXTBOX is in focus, CLIENT presses Enter:+CLIENTMESSAGE = CLIENTTEXTBOX.Text+Loop through all other users {Send CLIENTNAME to SERVER; Send CLIENTMESSAGE to SERVER}+Set CHATBOX.Text to (CHATBOX.Text + "\n" + CLIENTNAME + ": " + CLIENTMESSAGE)+Clear CLIENTTEXTBOX//This handles recieveing the message and displaying itCLIENT recieves message:+Set CHATBOX.Text to (CHATBOX.Text + "\n" + SENDERNAME + ": " + SENDERMESSAGE)[/CODE]As you can see, the only difference with the client-server model is that the client sending the message handles what the server does. Ask me if you need any more help. Link to comment Share on other sites More sharing options...
Asuma Posted June 30, 2006 Author Report Share Posted June 30, 2006 ....I wasn't making an online game. Thanks though, maybe I can use this. Link to comment Share on other sites More sharing options...
Andrew Posted July 1, 2006 Report Share Posted July 1, 2006 Thats about the only thing i CANT tell you how to do. Yeah. OK. Mmhmm. Link to comment Share on other sites More sharing options...
FredrikTheEvil Posted July 1, 2006 Report Share Posted July 1, 2006 You can change font and color in the text blitter setup dialog ( Options tab->Generate). Since its a bitmap font blitter, you can import bitmap fonts, which can have multiple colors, and use that too. Its also possible to swap colors via events. And if you want, you can use it as a sprite engine too Its absolutely one of the better extensions out there. Very flexible, very easy, and very very useful Link to comment Share on other sites More sharing options...
Asuma Posted July 2, 2006 Author Report Share Posted July 2, 2006 Can this work with MMF2? Using the string object? It's what I'm using now... Link to comment Share on other sites More sharing options...
hRook Posted July 3, 2006 Report Share Posted July 3, 2006 Can you tell me what you're doing if it's not an online game? Link to comment Share on other sites More sharing options...
Asuma Posted July 3, 2006 Author Report Share Posted July 3, 2006 Is basically a debug console for my game. You can use the Edit boxes object to input commands which will give you the effect. I.E Kill yourself XD. Link to comment Share on other sites More sharing options...
Recommended Posts