client-godot

A long term progressive resource management text based MMORPG being developed in Godot.

Stars
18
Committers
2

Bot releases are hidden (Show)

client-godot - Latest Release

Published by valkyrienyanko over 2 years ago

This release was created to preserve the code used to generate the 3D chunks with smoothed chunk edge normals as this code will now be deleted as the FPS drops needed to maintain chunk generation is just too much for this game so I'm going back to 2D map.

  • Chunk checks are done in separate timer loop instead of every frame in _Process(float delta)
  • Chunk edge normals are averaged to smooth the rigid edges
  • Chunks are freed from memory if distance to chunk is greater than some value

One thing I learned (or remembered) is I should not do var arr = new Chunk[10000][10000] as this will eat up all the RAM as instead I should have done new Dict<Position, Chunk>.

Pasting some code in here for future reference for other future projects. (in case downloading zip and extracting is too much of a hassle)

These are the most important scripts of interest, for the others download the entire release.

camera.gd (Free look cam): https://gist.github.com/valkyrienyanko/83234f5440476948f6867da62697e2b6
CameraController.cs (top down cam): https://gist.github.com/valkyrienyanko/5284b8c0c707d2b9f289a3623c0b6f4b
Chunk.cs: https://gist.github.com/valkyrienyanko/7c90003208fb686dc79db86829483b94
ChunkGenerator.cs: https://gist.github.com/valkyrienyanko/e7295429598c4e75a00972bc39a0c310
World.cs: https://gist.github.com/valkyrienyanko/a7b7c748dddee564fc1529c0f63395fb

client-godot -

Published by valkyrienyanko over 2 years ago

  • New world tab
  • World chunks use shared vertices
  • Vastly improved UI
  • Several other fixes
client-godot - v0.1.34

Published by valkyrienyanko over 2 years ago

v0.1.30 (dev)
Fixed Bugs:

  • Tech tree columns are drawn in wrong order
  • Can't click on anything outside the viewport

v0.1.31 (dev)
Fixed Bugs:

  • await ToSignal(GetTree(), "idle_frame"); is called every frame in _PhysicsProcess(float delta)
  • If viewport is resized larger than viewport content, you can no longer zoom in (on top of this there should be some auto zooming in taking place if viewport gets bigger than viewport content) Fixed with temporary solution, but working on better solution

v0.1.32 (dev)

  • Figured out how to calculate max zoom scroll

v0.1.33 (dev)

  • You can no longer drag the viewport when mouse is outside of viewport (left clicks will not register) (drag will still work if mouse is held down and goes outside of viewport)

v0.1.34 (dev)

  • Camera moves towards position of mouse when zooming in
client-godot -

Published by valkyrienyanko over 2 years ago

v0.1.29 (dev)

  • The way the tech tree is built has been redone making use of Godot's Control nodes instead of through pure maths

Known Issues:

  • Long white vertical line is offset a bit making it appear jagged
  • 2 long white vertical lines are drawn when 1 is really only needed to get the job done
  • Purple circles are not being displayed for tech nodes G and H
  • You can drag the tech tree with left mouse drag even when dragging outside of the viewport
  • Zooming out will sometimes go past the maxZoom for a split second than correct itself next frame
  • Zooming feels linear and not lerp like
  • Camera moves to center on startup for about the first 10 frames (small but noticeable)

v0.1.28 (dev)

  • Tech lines look more node like
  • Tech node sizes are retrieved dynamically and no longer hardcoded
  • Fixed memory leak caused by a bug in Godot Engine for all _Input related functions
client-godot -

Published by valkyrienyanko over 2 years ago

v0.1.18 (main)

  • Clicking on "Whisper" to whisper yourself will now close the dialog popup unlike before (no you can't whisper yourself)
  • More safety around QueueFree() orphan nodes

v0.1.19 (dev)

  • Lots of code from main branch removed
  • Thread safety enforced everywhere
  • Redesigned chat UI
  • Added some tech tree logic (very wip)
  • Viewport tech tree drag mechanic works with the new viewport node

v0.1.20 (dev)

  • Loading tech tree will start in center of tech tree (likewise first research node is created from center)
  • Drag mechanics work with new tech tree logic
  • Zoom mechanics are WIP

v0.1.21 (dev)

  • The way the tech tree and tech tree contents are centered has been recalculated
  • The camera is dragged around instead of the tech tree content panel now
  • The camera offset has been changed from (512, 100) to (0, 0) as this was causing numerous issues in drag / bound limit calculations
  • Drag mechanics work yet again with new tech tree logic
  • Drag camera bounds work for top and bottom, still finicky for left and right
  • Zoom actually works somewhat now, still very WIP

v0.1.22 (dev)

  • Drag camera bounds limit logic is now flawless (tested for all viewport and window sizes)

v0.1.23 (dev)

  • Research and move controls were separated into 2 classes with static methods for organization

Known Issues

  • Camera bound limits no longer work when zoom value is changed

v0.1.24 (dev)

  • Camera bound limits work when zoom value is changed

Known Issues

  • Camera bound limits when zoom value is changed does not work when window height is smaller than viewport (camera) height
    v0.1.25 (dev)
  • Solved: Camera bound limits when zoom value is changed does not work when window height is smaller than viewport (camera) height

v0.1.26 (dev)

  • Camera is now instantly set to the center of tech tree panel (no longer smoothly moves towards center of tech tree panel)
  • Zoom is much smoother (although it would be nice if lerping was implemented somehow)
  • Min and Max zoom restrictions have been added
  • Current zoom level determines drag / arrow key / scroll speeds

v0.1.27 (dev)

  • Tech tree research nodes are drawn recursively now
  • Lines are drawn between research nodes (WIP)
client-godot -

Published by valkyrienyanko almost 3 years ago

v0.1.17

  • Separated channel data from PacketLogin to its own packet PacketChannelList
  • Server now keeps track of all Peer's
  • Added new methods to server SendAll(GamePacket packet), optimized Send(GamePacket packet, Peer[] peers)
  • Fixed client displaying improper channel names
  • Server now keeps track of channel text content
  • Private duo channels seem to work 100% with zero bugs (group channels have not been started yet)
  • Messages used to be stored as List now they are stored as List where UIMessage has UserId, Message, Special
  • Global channel text is loaded on client login
  • Feedback channel commands no longer try to access non-existent users
  • Clicking on any channel tab will auto focus the LineEdit node (chat input zone)
  • Clicking on the Game channel tab will hide the users to the right and expand the chat area to make up for the lost space
  • You can no longer whisper yourself
  • The correct users show up in the correct channels (wip / very buggy due to my lack of experience in Godot)
client-godot -

Published by valkyrienyanko almost 3 years ago

v0.1.16

  • Fixed server crash when client sent a packet ChatMessage bigger than the max packet size (2048)
  • Fixed server crash where server would try to cleanup a non-existent player (peer exists but player object not created yet)
  • Potentially fixed client crash on re-login
  • Fixed client crashes on DuplicateKey added for channels and channel users
  • Fixed client crash on game start due to misuse of thread safety (thread safety is now ensured throughout the entire codebase)
  • Channels actually work now (still lots to do)
  • Channels display the proper names on creator client and other client (needs more testing when a 3rd client joins)
  • Fixed instances where the game would not cleanup certain things when it would other times
client-godot -

Published by valkyrienyanko almost 3 years ago

client-godot -

Published by valkyrienyanko almost 3 years ago

v0.1.14

  • Added main channels "Global" "Game"
  • Friend, Users tabs were removed
  • Global tab button name from replaced from "Global" to a chat icon
  • Users can now open up private channels with another user
  • New private channels that are created are shown up as tabs on the top of the chat window
  • Users can right click any user and a dialog box will popup with the options "Add Friend, Whisper, Block" (note only whisper is functional right now)
  • IPs are no longer hardcoded and are now connected to public export vars
  • Added the logic for chat cmds in both the Game and Global channels (cmds are separate collections for each channel but may be merged all into one collection)
client-godot -

Published by valkyrienyanko almost 3 years ago

client-godot -

Published by valkyrienyanko almost 3 years ago

client-godot -

Published by valkyrienyanko almost 3 years ago

client-godot -

Published by valkyrienyanko almost 3 years ago

client-godot -

Published by valkyrienyanko almost 3 years ago

client-godot -

Published by valkyrienyanko almost 3 years ago

client-godot - v0.1.7

Published by valkyrienyanko almost 3 years ago

client-godot -

Published by valkyrienyanko almost 3 years ago

client-godot - v0.1.5

Published by valkyrienyanko almost 3 years ago

v0.1.3

  • Simulating resource values gained in real-time on the client (>90% accurate with server values)

v0.1.4

Changelog for Client

  • Added spaces before each capitol to structure names so instead of WheatFarm its Wheat Farm

Changelog for Server

  • whois displays more info and looks nicer
  • console cursorleft bug fixed
  • console command history no longer saves extra words / spaces
  • created give cmd
  • redid reset cmd (it works too)
  • abstracted code into ServerUtils.cs (added 3 new functions FindPlayer FindOfflinePlayer FindOnlinePlayer)
  • cleaned up common lib for both projects
  • abruptly closing the console now does forceful cleanup before exit
  • give cmd sends packet to client and client sees the changes
  • redid SaveAllPlayersToDatabase()
  • ban logic is now flawless (for both offline and online)
  • PlayerManager.cs merged into Player.cs

v0.1.5
Changelog for Client

  • Complete UI Overhaul
  • Added chat / friends / users windows
  • Client now keeps track of joining / leaving clients
  • Chat window is functional and other clients can see messages
  • Common lib was optimized further
  • Added several util functions

Changelog for Server

  • Added new packets to accommodate for the new changes in client
client-godot -

Published by valkyrienyanko almost 3 years ago

  • Server and client both have a copy of structure and resource info data instead of the server sending all this data to the client on first time login
  • Server no longer sends how many structures the client purchased and how many resources they were lacking / used on purchase as this is all now tracked client side in a cache
  • Server now sends how much was generated from the structures to the client when the client modifies specific resources on purchase (this way the server does not send all the resource values on a mere purchase and only sends the ones that need to be updated)
client-godot -

Published by valkyrienyanko almost 3 years ago

Before the shared common code.