Jump to content




(MMO)RPG game [WIP] [client-server system]

game lua networking

8 replies to this topic

#1 Piorjade

  • Members
  • 244 posts
  • LocationComputer, Germany

Posted 26 June 2016 - 04:52 PM

I saw that a very low amount of users here try to make RPGs or games in general (now compare that amount to the amount of users trying to make operating systems :P), that's why i decided to make that game.

(Yes, I don't have a title for this thing, I would appreciate suggestions...)

Current features:
  • client login/register (enter server ID, pings server, enter username, checks for users, if found: login - if not found: register, hashes & adds salt to the password and saves it on the server)
  • server (handles: register, login, delete, change pw, spawn player into world, move player(s), sends movement every 0.1s to all players (i made use of coroutines here...), sends world-data (the map and it's data, for example blocks where the player can't go through) upon spawn command to player)
  • map editor (draw your map (MAXIMUM X = 25; MAXIMUM Y = 9) and then type: editor.lua <folderWhichCONTAINSTheMap> <PathTo: editorlayout.nfp>) (Standard locations: editor.lua = /server/maps/editor.lua; editorlayout.nfp = /server/maps/editorlayout.nfp; standard command = /server/maps/editor.lua <folderWhichCONTAINSTheMap> /server/maps/editor.nfp
  • chat system: Players connected to the same server can chat with T (NOTE: the game won't synchronize while typing, meaning movement and received messages won't be seen)
Planned:
  • more features for game and editor (making use of ladders, doors, etc. ;)
  • adding chat DONE :)
  • adding list of objects to the editor
  • NPCs (no AI though ... to complex for meh)
  • (context) menus (inventory, exit, talk with NPC, etc)
  • fighting system (I have no idea how I should do this :P)
How to set-up:
  • download the server to a computer (pastebin run LwmeZ6SL /)
  • download the client to the PCs which should connect to the server (and "play") (pastebin run 0TbYns2m /)
  • run the server startup / reboot the server
  • run the client (startup.lua)
  • enter the server ID
  • enter username
  • it goes directly to the register screen ( next time you enter the username it will go to the login screen)
  • go to "Play" and press enter
  • there you go, you are in the map named "house1"
How to change the player's current world (with the current version):
  • shut down the server (terminate)
  • go to /server/saves/USERNAME/
  • edit "data"
  • edit the string "world" to the desired map
  • OR: Connect the worlds with ladders and use them
Controls:
  • GAME : Move: arrow keys; Use ladder: Enter; Chat: T
  • EDITOR: Save & Exit: delete key
NOTE: you will see your (and the other) name(s) on the bottom and on the right of the map, the right means which players are on YOUR map and the bottom shows EVERY player on the whole server...

NOTE2: to place block in the editor, enter the object in the textbox located below the map

Object list (editor):
  • wall (blocks player movement)
  • door (no use, can't even place)
  • ladder (no use)
Changelog:
Spoiler


Code:
SERVER: GitHub
CLIENT : GitHub

Attached Thumbnails

  • Attached Image: SpawnedAndMoved.PNG
  • Attached Image: Second Player.PNG
  • Attached Image: Menu.PNG
  • Attached Image: Login.PNG
  • Attached Image: Registering.PNG
  • Attached Image: pingingServer.PNG

Edited by Piorjade, 16 September 2016 - 04:58 PM.


#2 Lemmmy

  • Members
  • 218 posts

Posted 26 June 2016 - 05:05 PM

why do you encrypt passwords, you're supposed to hash and salt them

#3 Piorjade

  • Members
  • 244 posts
  • LocationComputer, Germany

Posted 26 June 2016 - 05:07 PM

Oh sry I meant hashing. I use SHA-256 btw



EDIT: I forgot to spread the message: gaben.tv

Edited by Piorjade, 26 June 2016 - 05:10 PM.


#4 Lemmmy

  • Members
  • 218 posts

Posted 26 June 2016 - 05:11 PM

do you salt it too

also why did you include your entire git folder in the pastebin that's just stupid

#5 Piorjade

  • Members
  • 244 posts
  • LocationComputer, Germany

Posted 26 June 2016 - 05:18 PM

dude I bundled the files into one self extracting file to make it easier to download, there is no problem with that at all? If you want to see the source code I could give you the GitHub links...

EDIT: I think I know what you meant wait a second gonna fix that
EDIT2: There you go, no github stuff in the pastebin anymore, thanks for mentioning it

Edited by Piorjade, 26 June 2016 - 05:23 PM.


#6 Piorjade

  • Members
  • 244 posts
  • LocationComputer, Germany

Posted 20 July 2016 - 03:06 PM

UPDATE:
  • Forgot to salt passwords, added that
  • REWORK: moved the "map-system" to the client, because a critical bug occured (look at the comments at the "getworld" function for more information and I would appreciate it if someone knows how to fix it)
  • Updated the mapeditor to proper place ladders (NOTE: after you place a ladder, the editor asks for the name of the destination map. The problem is that it somehow doesnt write the destination to the *.lvlDat file. Just open the *.lvlDat file and under "ladderDestination" write the maps by hand. If you have multiple ladders, you have to write the destinations proportionally to the laddersX and laddersY tables (e.g. laddersX[1] = 2, laddersY[1] = 2, ladderDestination[1] = <whereever the ladder at 2, 2 should lead to)
  • Draw and make use of ladders for the client: Stand NEXT TO a ladder and press enter to teleport to the specified map (but to the same X and Y coordinates you were standing before. NOTE: the client needs to have the map, of course)

Edited by Piorjade, 20 July 2016 - 03:07 PM.


#7 boyscout415

  • Members
  • 3 posts

Posted 03 September 2016 - 04:31 PM

Maybe add a combat system, and some decorations? in that order, if you do.

#8 Piorjade

  • Members
  • 244 posts
  • LocationComputer, Germany

Posted 04 September 2016 - 06:08 PM

 boyscout415, on 03 September 2016 - 04:31 PM, said:

Maybe add a combat system, and some decorations? in that order, if you do.

Thank you for your reply :)

First of all I really don't know HOW to implement fighting... I mean like Final Fantasy or Pokemon Mystery Dungeon, for example.
And second of all I didn't touch this project for a while now mainly cuz noone really replied to this :P (Though I updated my OS, because I was motivated enough lmao)

#9 Piorjade

  • Members
  • 244 posts
  • LocationComputer, Germany

Posted 16 September 2016 - 04:44 PM

UPDATE:
  • Added Chat System (the game pauses while writing, that means that you won't see player movement... I did that because I couldn't get the Cursor to stay on it's coordinates WHILE synchronising with the server...)
  • Chat System is not connected with the Server, you only have to be on the server and the protocol is set to [serverID], which means only peeps on the same server can read your messages






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users