https://github.com/kleineluka/terra
Server emulation for U.B. Funkeys. 🌏
https://github.com/kleineluka/terra
flash funkeys private-server server server-emulator ub ub-funkeys ubfunkey ubfunkeys
Last synced: 3 months ago
JSON representation
Server emulation for U.B. Funkeys. 🌏
- Host: GitHub
- URL: https://github.com/kleineluka/terra
- Owner: kleineluka
- License: mit
- Created: 2025-01-20T02:28:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-29T10:14:43.000Z (about 1 year ago)
- Last Synced: 2025-04-07T21:44:42.564Z (about 1 year ago)
- Topics: flash, funkeys, private-server, server, server-emulator, ub, ub-funkeys, ubfunkey, ubfunkeys
- Language: JavaScript
- Homepage:
- Size: 151 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Terra 🌏
Capitalism toy-selling video game server emulator from my childhood built in Node and Express. I've called it Terra because that's what the world of UB Funkeys is called! **Not done yet. Please also be aware that the logs WILL be flooded with information while in development, and not a clean user experience.**
# Highlights 🌈
- Stupidly simple and secure accounts with bcrypt.
- Fast, portable and no-setup database with SQLite.
- Readable and organised code with extensive comments (from my annoying brain).
- Highly configurable by compartmentalising settings into JSON files.
- Robust error handling and debugging system for further development.
# Progress Tracking 📌
Server Emulator (6/7)
- [x] Database
- [x] Environment (config, cache, user data)
- [x] TCP Server
- [x] HTTP Server
- [x] Packet Formatting
- [x] Active Connection Manager
- [ ] Better Error Handling
Core Features (6/7)
- [x] Guest Login
- [x] Host Details
- [x] Server Details
- [x] Account Creation
- [x] Account Login
- [ ] Another Login
- [x] Heartbeat
User Features (3/10)
- [x] Friend List
- [x] Chat Status
- [x] Phone Status
- [ ] Add Friend
- [ ] Accept Friend
- [ ] Delete Friend
- [ ] Send DM
- [ ] Delete DM
- [ ] Send Invite
- [ ] Respond to Invite
Chat Features (0/12)
- [ ] Create Room
- [ ] Change Properties
- [ ] Item Activation
- [ ] Join Room
- [ ] Kick Out
- [ ] Chat Message
- [ ] Player Move
- [ ] Open Door
- [ ] Put Item
- [ ] Player Location
- [ ] Remove Item
- [ ] Send Event
Boxing Minigame in Nightmare Rift (0/1)
- [ ] Boxing Action
Soccer Minigame in Daydream Oasis (0/4)
- [ ] Ball Save
- [ ] Character Chosen
- [ ] Send Moving
- [ ] Strike Parameter
Mahjong Minigame (0/3)
- [ ] Freeze Game
- [ ] Remove Tile Pair
- [ ] Reset Tiles
Pool Minigame in Nightmare Rift (0/4)
- [ ] Release Cue
- [ ] Motion End
- [ ] Roll Update
- [ ] Partner Hit
Fight Minigame (0/17)
- [ ] Block
- [ ] Extended Punch
- [ ] Headbutt
- [ ] Health Reduction
- [ ] Hit
- [ ] Jump Kick
- [ ] Jump
- [ ] Kick
- [ ] Move
- [ ] Ping
- [ ] Punch
- [ ] RTT
- [ ] Special Action
- [ ] Score
- [ ] Soft Reconciliation
- [ ] Stop
- [ ] Unblock
Chinese Checkers (0/2)
- [ ] Movement
- [ ] Turn Notification
Worms in Paradox Green (0/0)
- Nothing Yet
Dominoes in Paradox Green (0/0)
- Nothing Yet
Trunk Features (0/6)
- [ ] Get Assets
- [ ] Balance
- [ ] Product List
- [ ] User Transactions
- [ ] Buy Product (various subcommands)
- [ ] Send Asset
Galaxy Features (Cloud Storage) (2/5)
- [x] Profile Save Version
- [x] Statistics Request
- [ ] Save Profile
- [ ] Load Profile
- [ ] Leaderboards
Multiplayer Features (0/6)
- [ ] Leave Game
- [ ] Ready Up
- [ ] Message Opponent
- [ ] Play Again
- [ ] Chat Message
- [ ] Draw (yes/no subcommands)
Misc. Features (0/10)
- [ ] Clean Up Code (ex. when done remove debugging features, useless imports/exports, clean up comments, etc.)
- [ ] Figure Out More Response Codes
- [ ] Documentation
- [ ] Safety Filter (ex. account name)
- [ ] Graceful disconnection (ex. remove connection statuses on socket close)
- [ ] Conflicting Command Handling (based on context)
- [ ] Web Panel for Admins
- [ ] EULA Check (by using this you wont impersonate the game)
- [ ] Clean up inactive users regularly
- [ ] Any random "todo" comments
- [ ] Convert to Typescript? ~~Hehehe.. Maybe one day..~~
*Note: This is not an exhaustive list, just a frankenstein of A1Emu, UBFunkeysServer, and XmlMessageDoc. There are also a lot of overlapping commands, which will be properly organised in the future. Once these are complete, I will look for any missing niche commands!*
# Why Node? Why not continue Java or C#? 😨
By choosing Node over Java and C#, setup is lightweight and easy. The drawback is that it will not scale as well, but for a Flash game, this is more than fine. Node has many libraries established for web communication like what Terra needs and is a straightforward approach. I am not familiar with the codebases well enough to continue the other projects and a fresh start is more appealing to me.
# Acknowledgements 🥰
- [A1Emu](https://github.com/GittyMac/A1Emu) (and by extension [UBFunkeysServer](https://github.com/Leahnaya/UBFunkeysServer)) was a reference for the progress tracking and the server emulator. I plan for this to be a "re-implementation" of these projects initially but grow from there.
- [XmlMessageDoc](https://github.com/bluisblu/XmlMessageDoc) has a lot of useful information about the game's packets.
- [OpenFK](https://github.com/GittyMac/OpenFK/), [JPEXS](https://github.com/jindrapetrik/jpexs-decompiler), and [Wireshark](https://github.com/wireshark/wireshark) for testing and reverse engineering the game client.
- Mattel, Radica Games, and Arkadium for creating the game.