Day 3


Today I debugged a bunch of issues around player rotation and managing the netcode communication efficiently.  I added a small fishing village and modified the landscape material functions to include sand and cobble.  I also coordinated deleting other players from the player session when the other players logoff or disconnect.

I developed a simple chat system, which actually took several hours mostly due to strange stuff in UE4 realted to Slate and the Enter key when you type in a text box.  The design was similar to most mmorpg - you press enter, the text box opens up, type your chat, then press enter again to submit it and it gets sent to everyone else.  Problem is, once you get into a slate component, enter no longer gets captured by key presses, instead you get a "commit text" message which doesnt play well with the key press stuff.  In the end I had to write a preprocess handler (very poorly documented by Unreal) which grabs key events before they hit anything in the input subsytem.  From there I peeled off the Enter key and fired a special event in my chat handler.  Ultimately everything worked exactly as designed but the road was pretty long and frustrating.

Tomorrow I'm going to add player nametags and work on NPCs.  The challenge with NPCs will be their movable area because the server has to be authoritative.  It's not feasible to export the entire landscape mesh, so I'm going to design a local navmesh database stored in mysql which will be on a small grid (maybe 10cm).  I'm planning to use an a* algorithm for the NPC to seek out the player when aggro or run home when evading.  My initial thought is that the NPC can "explore" the area in a special mode of the game which reports the navmesh x/y/z points back to the server and they are then stored in the database.  This will need to be highly optimized for loading and searching, which will probably involve some sort of hashing mechanism and an optimized c# dictionary.  Goal is to have a couple working NPCs by the end of day tomorrow.


Current project item list status:


for game jam

--------
player nametags
combine mesh on human male and re-export
couple of npc - doe/deer, dragon
combat
inventory
a* pathfinding on server for npc with client updates
delete players from list when they get far away
npc merchant
small crypt (lighting/candle flicker)
add name to chat history box
add scrollbar to chat history box

later
--------
randomize name
check return value from create player, if -1 pop message box that name is taken
display character preview in character create and selection windows
disable play button if no characters created
level loading screen
on processEnterLevel - validate that player id belongs to user id
one house model doesnt have door open
smoothly rotate to on force update of player
chat channels

done
-------------
delete players from other clients when they disconnect or logoff/exit
save/load location and rotation
send other player locations/rotations to everyone
give error if server not found
add sand texture to landscape material and apply to coastline
add cobble text to landscape material and draw some paths
build fishing village from unity assets
    3 or 4 huts on water, 3 other houses, inn, small forest nearby
other players have a weird rotation sometimes on spawn
world chat

Get Darkfire

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.