设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 13585|回复: 32
打印 上一主题 下一主题

[转载] [制作工具]制作网络游戏不是梦

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
69
在线时间
17 小时
注册时间
2005-11-13
帖子
61
跳转到指定楼层
1
发表于 2008-1-31 20:35:15 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
Netplay Plus 2.0 Client and Ruby Server
以下地址复制到IE上,在进入网站后点击Free按钮下载,
直接复制到下载工具上,下载会失败
http://rapidshare.com/files/43139697/Netplay_2.0_Server_And_Client.zip

压缩包内包含范例,似乎支持2人同时游戏

看上去要下个ruby,mysql数据库服务器,PHPMyAdmin

不懂英文的可以尝试下架设:XAMPP,配合上Ruby

XAMPP是Apache+MySQL+PHP+PERL 在windows下的集成包,至于Wamp好像是在linux下的偶们用不到



以下是英文,大家可以参考架设.

  1. You have to have Ruby, if not here is the download


  2. Http://www.ruby-lang.org/en/downloads/
  3. Do the One-click installer

  4. Netplay and Xxamp or Wamp
  5. Netplay plus 2.0 (for the second link is the top if you download a little down scrollt) =
  6. http://rapidshare.com/files/43139697/Netplay_2.0_Server_And_Client.zip

  7. http://www.rmxp.org/ forums / showthread.php? t = 24968 & highlight = netplay + update
  8. Xampp = http://www.apachefriends.org/en/xampp.html
  9. Wamp = http://sourceforge.net/project/downloading.php?groupname=wampserver&filename=WampServer2.0a.exe&use_mirror=dfn

  10. All set! The server

  11. Let's start with a download from Wamp of xampp and Netplay Plus you install it and then go to the folder where you have geinstaleert. If you are a bit down scrolls you see (at least I) xxamp-control or wampmanager click on it and make sure you Mysql and Apache impetus Now go to the admin of Apache you see your localhost site, and there is left a bar with everything you can use it, click PHPMyAdmin,. Users of Wamp should click on the taskbar and then show them a iglootje click it and then PHPmyadmin now you get a new site open. There is also a new database or create new Create Database that you can create a new database to create a new database using the name to you taste. If it says that it can not be another name and setting. Open your database and select import that apparently top of the page, there is now a new page click to browse or browse it and go to your Netplay folder, click Server and click sqlfile, then simply start or go. Well done you have the files on the server geimporteert! Now go to the start and close the site. Go to the Netplay files and go to the folder where you first called Server was. Open the "Config" file it says Attention! The brackets should continue this ", the brackets
  12. Code:
  13. Host = "152.105.166.15" This is your host that can be found at www.whatismyip.com

  14. Port = 50000 This is your port should be the same in the scripts of your game otherwise he may not contact

  15. ServerName = "Netplay Plus Server" So is your server that you can figure out yourself
  16. ServerVersion = "3.0 This is the version of the server (it's best not change)
  17. GameCode = "918302475" This is the password from the server if it is the same in the scripts of your game all the details of it to your server gestuurt

  18. WebServer = "localhost / www / Netplay" The server of your web?
  19. SMTPServer = "localhost" ...
  20. AdminEmail = "[email protected]" Your email

  21. DB_server = "localhost" The server of your database. Note that must remain!
  22. DB_user = "trebor777" This should be root
  23. DB_password = "D4d1co0l" This should be nothing
  24. DB_name = "netplay_p_db" This should be the name of the database that you have mentioned

  25. Message = "Entering the Official Netplay Plus Server ..." This is the text which will start the server if you

  26. If you have anything you set this step beyond

  27. You scripts of Netplay change

  28. First you open the Netplay game and copy all your scripts of the Netplay game to a new game and overschrijf you with the Main Main of the Netplay game and copy the folder you to the graphics to the game ... So now you have the graphics and scripts of the Netplay game. Put all folders and files in the directory of your new game except for the Data folder, which puts you there are not going to copy you. Open the Data folder of the Netplay game and copy it to the folder Scripts Dates of your new game, test your game.
  29. If it fails to sign the error and let the piece of script. Now go to the script editor and locate line 45 in the Network Library. Now you see 3 texts Ip, Port, Gamecode, put the numbers beside them what you have set the config file so you move your IP address late in the first half in the port that you have set in the config on the server and third is the gamecode which you have set in the config on the server. If you think you can trust everything that steps in your game moves (Please be sure in advance a backup of scripts.rxdata maybe you can scripts override)


  30. Hee I can not register!


  31. Here you learn register for the Netplay game.
  32. Go to your database (you can see how you going in chapter 1)
  33. Users Find the table and if you have done that you have to explore or browse print that is placed in the vicinity of imports. Now click on Insert or insert that is also the top, then you get a whole list of questions that you should introduce the ID here is the first question you have to the number of the ID so you are entering the third account then you 3 filling as that fails 4, the second question is Login this is the username when you log in, now you get the question password but also a bar, but here you need to click on that bar alongside password and function of function and MD5 in implement now you can enter the password you want to log in, now you have a question which states that Email is simply your email, now you get a question which states reg_dat that your registration data one must simply fill out a few figures to view it later to search, now you get the question log_dat same as reg_dat, now you get the permission question that is the grade you have admin is the allerbest moderator below standard and below it, now you get the question guild that knows I am not just 1 introduced and that same money for the next question, now that you have to have on the box of ignoring or ignore pressing than you do not have a time to fill in, and then click on Start. If you can do as well in other news, if you 1 of the others do not understand you can send it here. Now you can return to the home gaanen the bunch. Go to the directory server and go to Lib and you see a ruby program (. Rb) with the name Server open him with wordpad or notebook (Warning! Do not you standart openmaker of) and change it with this:
  34. Code:
  35. # If do not find the default library, the load provided one
  36. Require '. / LIB / gserver' # if! Require 'gserver'
  37. Require '. / LIB / mysql "
  38. Require '. / LIB / functions.rb'
  39. Require '. / LIB / email'
  40. Require '. / LIB / client'
  41. Require 'digest/md5 "

  42. Load '. / Config.ini "

  43. For file in Dir [ ". / LIB / Game_Class /*.*"]
  44. Print "loading" + file +"... \ n "
  45. Require file
  46. End

  47. Class NetplayServer Attr_reader state
  48. #------------------------------------------------- -------------------------------------------------- --
  49. # Initialize the server
  50. #------------------------------------------------- -------------------------------------------------- --
  51. Final initialize (local)
  52. Beginning
  53. @ State = true
  54. Ip = (local? Host: DEFAULT_HOST)
  55. Time = Time.new.strftime ( "[% m-% d-% Y] _% Hh%% Mm Ss)
  56. # Erase all previous errors at each server creation.
  57. @ @ = Error_log ". / LOGS / Error / # () time. Txt"
  58. File = File.open (@ @ error_log, "w")
  59. File.close
  60. # Create a new log file, at each server creation
  61. @ @ Log = File.new ( ". / LOGS / Server_log_ # () time. Txt", "w")
  62. # @ @ Log.flush
  63. # Create the server
  64. Super (Port, ip, 500, @ @ log, true, true)
  65. # Creating SQL Server connection
  66. @ @ _ Mysql = Mysql.new (DB_server, DB_user, DB_password, DB_name)
  67. # Set up the database
  68. Print "Setting up Database ... \ n \ r"
  69. # Print "Step 1 ... \ n"
  70. # @ @ _ Mysql.query ( "TRUNCATE TABLE online_users;")
  71. # Print "Step 2 ... \ n"
  72. # @ @ _ Mysql.query ( "TRUNCATE TABLE users;)
  73. # Print "Step 3 ... \ n"
  74. # @ @ _ Mysql.query ( "TRUNCATE TABLE characters;")
  75. # Print "Step 4 ... Create user 'test' pass' test '\ n"
  76. # @ @ _ Mysql.query ( "INSERT INTO users (id, login, password, email, reg_dat, validation) VALUES ('', 'test', MD5 ( 'test'), '[email protected]', UNIX_TIMESTAMP ( ), 1); ")
  77. # Print "Step 5 ... Create user 'test2' pass' test2 '\ n"
  78. # @ @ _ Mysql.query ( "INSERT INTO users (id, login, password, email, reg_dat, validation) VALUES ('', 'test2', MD5 ( 'test2'), '[email protected]', UNIX_TIMESTAMP ( ), 1); ")
  79. # Print "Step 6 ... \ n"
  80. # @ @ _ Mysql.query ( "INSERT INTO characters VALUES (2, 2, 0, 0,'1 ',' Alice ', 16, 9, 3, 0, 2,'002 - Fighter02', 'offline', 2 , 5, 0, 0, 0, 1000, 1000, 0, 1, 1,'102, 97 ', 1164649497, 0); ")
  81. # Print "Step 7 ... \ n"
  82. # @ @ _ Mysql.query ( "INSERT INTO characters VALUES (3, 1, 0, 0,'1 ',' Paul ', 11, 6, 3, 0, 8,'001 - Fighter01', 'offline', 2 , 5, 0, 0, 0, 1000, 1000, 0, 1, 1,'102, 97 ', 1164649434, 0); ")
  83. Print "Setup Success ... \ n"
  84. #------------------------------------------------- -----
  85. @ @ = (Clients)
  86. Rescue Exception
  87. Print $!
  88. Store_error ( "Server Error ",$!)
  89. @ @ _ Mysql.close
  90. @ @ Log.close
  91. @ State = false
  92. End
  93. End
  94. #------------------------------------------------- -------------------------------------------------- --
  95. # Return Server's Connection Mysql
  96. #------------------------------------------------- -------------------------------------------------- --
  97. Final mysql
  98. Return @ @ _mysql
  99. End
  100. Final clients
  101. Return @ @ clients
  102. End
  103. Final game_variables
  104. Return @ @ game_variables
  105. End
  106. Final game_switches
  107. Return @ @ game_switches
  108. End

  109. Final setup
  110. Beginning
  111. Print "------------------------------------------------ -- \ n \ r "
  112. Print "game loading data ... \ n \ r"

  113. @ @ Game_variables = Game_Variables.new
  114. @ @ Game_switches = Game_Switches.new
  115. Maps @ @ = []
  116. For f in Dir [ ". / DATA / Map [0-9] * rxdata"]
  117. @ @ Maps.push (Game_Map.new (f))
  118. End
  119. Raise "No map to load \ n" if @ @ maps.size == 0
  120. @ Map_thread = Thread.new (
  121. Beginning
  122. Do loop
  123. For map in @ @ maps
  124. Map.update
  125. End
  126. Sleep (1/35.to_f)
  127. End
  128. Rescue Exception
  129. Print "M: Exception occurred! #{$!} \ N"
  130. Store_error ( "Map Update Server Error ",$!)
  131. End
  132. )
  133. Rescue Exception
  134. Print $!
  135. Store_error ( "Server Error ",$!)
  136. @ @ _ Mysql.close
  137. @ @ Log.close
  138. @ State = false
  139. End
  140. End
  141. #------------------------------------------------- -------------------------------------------------- --
  142. # Answer to the client.
  143. #------------------------------------------------- -------------------------------------------------- --
  144. Final serve (io)
  145. While io.gets
  146. Break if process (io, $ _)
  147. End
  148. Disconnecting (io.peeraddr [1], io) if! Io.closed?
  149. End
  150. #------------------------------------------------- -------------------------------------------------- --
  151. # Server Stopping message stored in the log file, and close the log file Stream
  152. #------------------------------------------------- -------------------------------------------------- --
  153. Final stopping ()
  154. Log ( "# (self.class.to_s) (# @ host }:#{port stop)")
  155. @ @ Log.close
  156. End
  157. #------------------------------------------------- -------------------------------------------------- --
  158. Error # Store in the error log
  159. #------------------------------------------------- -------------------------------------------------- --
  160. Final error (detail)
  161. Store_error ( "Server internal error", detail)
  162. End
  163. #------------------------------------------------- -------------------------------------------------- --
  164. # * Load data from a file. (Exclusive to RMXP data file.
  165. #------------------------------------------------- -------------------------------------------------- --
  166. Final load_data (filename)
  167. F = File.open (filename, "rb")
  168. Return Marshal.load (f)
  169. End
  170. #------------------------------------------------- -------------------------------------------------- --
  171. # * Store error in a log file.
  172. #------------------------------------------------- -------------------------------------------------- --
  173. Final store_error (ori, exception)
  174. Trace = exception.backtrace.join ( "\ n")
  175. File = File.open (@ @ error_log, "a +")
  176. File.write ( "# (Time.new.to_s) # () ori: # exception () \ n \ r")
  177. File.write ( "# (route) \ n \ r")
  178. File.close ()
  179. End
  180. #------------------------------------------------- -------------------------------------------------- --
  181. # * Client Connection process
  182. #------------------------------------------------- -------------------------------------------------- --
  183. Final connecting (client)
  184. Addr = client.peeraddr
  185. Log ( "# (self.class.to_s) (# @ host }:#{port client) # (addr [1]) +
  186. "# (Addr [2 ]}<#{ addr [3])> connect")

  187. @ @ Clients [client] = NClient.new (client)
  188. True
  189. End
  190. #------------------------------------------------- -------------------------------------------------- --
  191. # * DisConnect the client
  192. #------------------------------------------------- -------------------------------------------------- --
  193. Final disconnecting (clientPort, io = nil)
  194. Log ( "# (self.class.to_s) # () @ host }:#{port" +
  195. Client: # (clientPort) disconnect ")
  196. Client = @ @ clients [io]
  197. If client! = Nil
  198. User_id = client.db_id
  199. Client.mysql.query ( "UPDATE characters SET savetime = UNIX_TIMESTAMP (), status = 'offline', client_id # = (0), online_id = # (0) WHERE user_id = # user_id) (AND online_id = # (user_id); ") rescue print" M: Error while updating characters table \ n \ r #{$!} \ n \ r "
  200. Client.mysql.query ( "DELETE from online_users WHERE id = '# user_id }';") rescue (print" M: (ensure) Error while deleting online_users entry \ n \ r #{$!}"
  201. Client.mysql.query ( "OPTIMIZE TABLE` online_users `;") rescue print "M: (ensure) Error while optimizing table online_users \ n \ r"
  202. @ @ Clients.delete (io)
  203. Client.socket.close
  204. Client.mysql.close
  205. End
  206. End
  207. End


  208. Updating and launch

  209. We can upgrade him to the script editor of the game with the scripts of netplay plus you need to go there to go and find your main line 12 there is # map_export change with map_export and do a testplay pressure before he comes to the login window on Z, and then closed the game out now you see your maps and tilesets in the folder converted from the directory of your game. Put those maps and tilesets that is converted to the DATA directory of the server and you have him updated!

  210. Now is the day that you can finally try!

  211. Make sure MYSQL is on concern that Wamp is turned on so you have to Wampmanager click and go to the directory Server and main pressure on the local server if you run press Y and if it is not so in N eventually comes to server running, now try to start the game and if everything fails then send a message on this topic!
复制代码

Lv3.寻梦者 (暗夜天使)

名侦探小柯

梦石
0
星屑
3299
在线时间
3619 小时
注册时间
2006-9-6
帖子
37400

开拓者贵宾第3届短篇游戏大赛主流游戏组亚军第5届短篇游戏比赛亚军

2
发表于 2008-1-31 22:12:45 | 只看该作者
SF……

复杂啊……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

很傻很天真

梦石
0
星屑
55
在线时间
3 小时
注册时间
2007-3-13
帖子
3667
3
发表于 2008-1-31 22:40:53 | 只看该作者
在森林看到有人发网络的RM  不过因为服务器..关闭了.
回复 支持 反对

使用道具 举报

Lv1.梦旅人

很傻很天真

梦石
0
星屑
55
在线时间
3 小时
注册时间
2007-3-13
帖子
3667
4
发表于 2008-1-31 22:50:48 | 只看该作者
不过 以前在6R和森林很多高手都说  每可能制作  出来 就算出来也坚持不了几天就XX掉了..
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
74
在线时间
117 小时
注册时间
2007-8-5
帖子
479
5
发表于 2009-6-12 08:00:00 | 只看该作者
不懂昂{/pz}{/pz}
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
908
在线时间
212 小时
注册时间
2006-10-8
帖子
293
6
发表于 2008-2-1 17:33:26 | 只看该作者
不懂英文的可以尝试下架设:XAMPP,配合上Ruby


.....................{/lh}
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-2-1
帖子
13
7
发表于 2008-2-2 01:12:43 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2008-2-1
帖子
98
8
发表于 2008-2-2 04:53:23 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
签名被屏蔽
回复 支持 反对

使用道具 举报

头像被屏蔽

Lv1.梦旅人 (禁止发言)

梦石
0
星屑
50
在线时间
0 小时
注册时间
2006-7-6
帖子
163
9
发表于 2008-2-2 18:53:32 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
49
在线时间
157 小时
注册时间
2007-12-16
帖子
3454
10
发表于 2008-2-2 20:16:06 | 只看该作者
以下引用小溪流水于2008-2-2 10:53:32的发言:

估计66也难以驾驭这种黑客级的东西.
要不,让比尔盖茨试试?

我去CALL他
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-24 22:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表