Testing Emaga6


With all of the changes we've made here, we're going to want to see it run. It's really fairly easy. Open a command shell in Windows, and change to the folder where you've built the code for this chapter's program. Then run the dedicated server by typing in this command: tge.exe -dedicated -map control/data/maps/book_ch6.mis.

After it displays lots of start-up information, it will eventually settle down and tell you in the console window that it has successfully loaded a mission. When you see these things, your dedicated server is running fine.

Tip

You may be wondering how to do this over the Internet. I've written a different version of this chapter that is available on the Internet as a supplement called "Internet Game Hosting". You can find it at http://cerdipity.no-ip.com/cerdipity and look for the 3DGPAI1 link on the left-hand side, near the top.

Next, double-click your tge.exe icon as you've done in the past to run the Emaga client. When the Menus screen appears, click the Connect To Server button. Look for the 3DGAPI1 server name (or whatever value you assigned to $Pref::Server::Name in the Control—Initialize module). Select that server entry, and then click Join. Watch the progress bars, and eventually you will find yourself deposited in the game. Send copies of this to your friends and get them to join in for some freewheeling havoc or reckless mayhem—whichever you prefer!

If you will recall, back at the beginning of the chapter, in the "Direct Messaging" section, we discussed the functions CommandToClient and CommandToServer. You might want to take this opportunity to test the code shown in that section. Put the SendMacro function in your C:\emagaCh6\control\client\misc\presetkeys.cs module, and then add the ServerCmdTellEveryone and TellAll functions to the end of your C:\emagaCh6\control\ server\server.cs module. You can go ahead and test it now, if you like.




3D Game Programming All in One
3D Game Programming All in One (Course Technology PTR Game Development Series)
ISBN: 159200136X
EAN: 2147483647
Year: 2006
Pages: 197

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net