![]() |
Player Messages - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51) +----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44) +----- Thread: Player Messages (/showthread.php?tid=2664) |
Player Messages - Jacob - 31-03-2009 http://web.miragesource.com/forums/viewtopic.php?f=120&t=3719&start=500#p60658 Rian mentioned a different way to do the messages that are sent to players, such as "This is a safe zone!" and so on. Instead of doing different modules for each of those, it would be better to load in an external file with the messages. Each message would have an ID associated with it so you know what message is which. For messages like player damage and npc damage, I've come up with a way to send just what you need to fill in the message. Pseudo Code: SendClientMessage(MessageID as long, Optional args as string) This would be client side Code: Private StringConst() As String Code: ' our function to replace strings Example of use: Code: Debug.Print ReplaceStr(2, "fucking,rock") Thoughts? Re: Player Messages - Egon - 31-03-2009 This is how most "big" game companies do things with messages, menus and errors. Re: Player Messages - Jacob - 01-04-2009 Any other thoughts? Think I should add it to MS4 so you guys know what I mean? Re: Player Messages - Tony - 01-04-2009 Sure, I'd like to see it. Re: Player Messages - Matt - 01-04-2009 Dugor would never do 1337 damage. Sorry. >.> Re: Player Messages - grimsk8ter11 - 01-04-2009 This is common practice and probably a good feature to have. It is actually called string tables to be formal, usually loaded from a file with a corresponding name or number to each so that once loaded into the table they can be easily referenced. You could implement bloom filters for visual basic as well and name them by strings like "AttackMessage1" or however felt necessary, bloom filters can filter thousands of hits a second. I have also been playing with bloom filters in Visual basic to use archives for large file sets. You can have over a thousand archives with thousands of files each in my C tests and still find if an archive has it and which one has it in under a few seconds. So it should handle a small group of strings very well, though hash tables may be more effective. Re: Player Messages - Tony - 02-04-2009 grimsk8ter11 Wrote:This is common practice and probably a good feature to have. It is actually called string tables to be formal, usually loaded from a file with a corresponding name or number to each so that once loaded into the table they can be easily referenced. What's bloom filters? Re: Player Messages - Dragoons Master - 02-04-2009 Very good idea. I WILL implement them asap. Re: Player Messages - Jacob - 02-04-2009 I'll probably add it to MS4 next week. Going on a vacation this weekend. Re: Player Messages - Nean - 02-04-2009 Dugor Wrote:I'll probably add it to MS4 next week. Going on a vacation this weekend. Awesome. You don't know how glad I am to hear, that MS4 will be making progress again. |