Jump to content

Online Game Project


Alek

Recommended Posts

I've decided to start a small online RPG game written from scratch. I'm using C++ with Direct2D and Winsock.

 

What I have done (Milestones):

-Recursive image loading through Windows Imaging Component (23 December 2016)
-Image filtering (seen in screenshots below, no filter was applied) (24 December 2016)
-Map Editor; adds and removes sprites (with layering), collision editor (27 December 2016)
-Generic Client/Server communication, moving players and sending entity information (16 Jan 2017)
-Finished basic login system with player profile saving/loading (19 Jan 2017)
-Added multiple region support, save and load easily (01 Feb 2017)
-Link regions with doors, create game objects (06 Feb 17)  
-Created simple menu system (15 Feb 17)
-Finished basic battle system (26 Mar 17)

 

The next stuff:
-Huge code cleanup
-Replace placeholder skill system with real skills
 

 

 

Recent News:

 

26 Mar 17:

After a much needed small break, I went through and scrapped my old battle system and created a new one. It's much cleaner and allows for me to treat enemies as actual clients; this opens up some pretty dynamic play in the future. Originally I intended for the ability to attack multiple targets, but for now a 1v1 battle will suffice. As you see below, there are 4 remaining tiles on each side for this team battle mechanic. The menu is wonky, but I'll work on aesthetics later. For now only "Attack" works, however in the future Item will be for using things like medpacks and "Taunt" will be used to skip your turn.

f62ef42ae48b771a663b69270ef08931.png

 

Changelog History:

 

06 Feb 17:
I finished a pretty big hurdle which was doors, opening a huge can of worms. First I had to have the map loader save and load multiple regions, update the editor, create game objects with inheritance, update player saves, write destination checks, etc. Now the world can be infinitely huge and immersive. Next up is menus and skills. 

c60fb59144bb9f605042199cdc5a2a92.gif

 


01 Feb 17:
Probably a more daunting task was adding multiple region support, but I finally powered through it. Using my editor I can quickly switch between regions, save regions, add new regions, and make whatever edits I need to. Next up is adding game objects to the map and linking between numerous regions through doors (teleports). The only hard part about this will be having my editor intuitively aid me in linking the regions graphically (instead of using hard-coded coordinates). I'll also probably make a some sort of object editor, more daunting interface tasks. 

 

27 Jan 17:
I've cleaned up the code a bit and reduced server CPU from 50% to ~4% and client CPU usage to under 1%, RAM for both is under 10MB. I also wrote some more login logic, knowing when a player is already logged in, invalid username/password, knowing when to disconnect players, etc. Also I have a pretty basic loading screen on the client's end which shows how the login is going. 

The code is still a bit messy so I'll be trying to grind through some more of it. It's not a lot of fun so hopefully I finish soon.

 

19 Jan 17:

Finished basic login system, there isn't an interface for it because it would just waste time. Right now it just reads your credentials from a text file. If your username and password doesn't exist, it just creates a new account for you (will definitely change in the future). Since the only thing you can do in the game right now is move around, the only thing saved it your X and Y coords. 

 

The game is at a really good point. We have a basic map, the player can move around on the server, you can see other players in the same world as you, and your progress is saved. For now I'm going to take a week or two break to clean up a lot of the disgusting code I wrote. 

16 Jan 17:

I've finished writing a simple local player class that sends information to the server, asking for the player to perform a certain action (currently the only action is movement). The server then validates the action and sends it back to the client. Additionally I wrote the code so you can see other players on the server (along with their unique player sprites, movements, etc). So at the very least this is now a multiplayer game. I'm only doing server sided checks for now, but later on I'll be adding a preliminary client-sided check before it asks the server to ease up on the server load. 

 

From here I'm going to write a simple player profile for the server to save the player's information. I don't want to get crazy with the login system so for testing, you will have a text document on your computer that will have your username and password. 

 

 

03 Jan 17:
Completed some basic client/server communication. Everything is coming together pretty well so all I need to really do now is create a basic message reader. I'm going to use these messages to validate just about everything, for now it will be basic movement verification from the server for collision. After that I'll make some basic player profiles for saving your information (position, inventory, etc) and create a login handler.

 

27 Dec 16:

Finally finished map saving, I'm going to have to expand on it in the future when I want to do things like add spawn points, items, etc., but for now it's fine with room to expand.

Also started up the client/server connections using Winsock, still a bit new to it but I'll get comfortable soon enough. 

 

 

23 Dec 16:

Map Editor (how it works):

Tile editing:

Select a filter by directory, in the screenshots below I'm using "Sprites" which happens to be my root folder. The "+" and "-" signs cycle through the available images with that filter. Left click adds, right click removes.

Collision editing:
Green tiles are "walkable" where red riles are solid. Left click makes it solid, right click makes it walkable.

  • Like 21
Link to comment
Share on other sites

I will be building detection systems to combat botters. It will be a serious of mouse algorithm checks and if you check your skills every so often. Additionally I cannot ban unless I'm awake during business hours. 

 Funniest post ive read in a month.

Edited by tranzystor3
Link to comment
Share on other sites

  • 2 weeks later...

16 Jan 17:

I've finished writing a simple local player class that sends information to the server, asking for the player to perform a certain action (currently the only action is movement). The server then validates the action and sends it back to the client. Additionally I wrote the code so you can see other players on the server (along with their unique player sprites, movements, etc). So at the very least this is now a multiplayer game. I'm only doing server sided checks for now, but later on I'll be adding a preliminary client-sided check before it asks the server to ease up on the server load. 

 

From here I'm going to write a simple player profile for the server to save the player's information. I don't want to get crazy with the login system so for testing, you will have a text document on your computer that will have your username and password. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...