High performance single player 634 server with a focus on bot player ai.
All content built will be playable by (hopefully thousands of) bot players.
The gameplay will emulate the original games feel but not all of it's oddly specific mechanics, I'll be enhancing and changing mechanics as I see fit. e.g. dynamic spawn areas rather than fixed coordinates
It'll still be fully networked so you can play on multiple accounts at once, multiplayer just won't be a priority.
3 month goals
- Convert to 634
- Identify xteas
- Convert all packets
- Flat file cache tools
- Data formats
- Replace networking with ktor
- File server
- Player saving
6 month goals
- Stable framework
- Spatial entity storage
- Event/Action handling QOL
- Inline classes
- Dynamic object improvements
- Pathfinding improvements
- NPC types (flying, swimming)
- Combat following
- Polygon area system
- Within checking
- Random tile selection
12 month goals
- Pest control
- Bot communication
- Interface mods
- Middle mouse camera movement
- Extended render distance
- Xp drop types
- Coin pouch
- Deposit all trades/bob etc..
- Server-controlled inventory right click options
Spoiler for Updates:
No I don't plan on hosting, yes it's all [Only registered and activated users can see links. ], it's my [Only registered and activated users can see links. ].
Good luck Greg
Continuing on from my last project I realised that bot decision making itself is relatively straightforward compared to representing the game world in an ai friendly manor. Here's the things I've been experiementing with since then.
Lots of research and experiments, this example here is a bot utilising goal-oriented-action-programming, it's nice to use but has memory scalability issues and it's essentially pathfinding which is expensive enough as-is.
I've sebtled on a utility scoring system where everything will be aggregated down to 0.0 - 1.0 values, although applying curves can be tricky from a content design perspective, the system itself is fast and really flexible.
As a player this is easy as you have a giant corpus of information you've stored from past experience or can easily lookup on the wiki.
For example for a slayer task to kill dragons you know:
* the wilderness spots are dangerous for pkers
* if your low level baby dragons are easy to kill than regular, and metal dragons are harder than that.
* going to brimhaven dungeon requires an axe and 12 agility
* it's quicker to use an amulet of glory for getting to brimhaven than chartering a ship
For a bot all this information needs to be stored in memory which entails having the entire world, objects, npcs, collision etc.. loaded at once
First I looked at the feasability of doing long distance pathfinding, I built 2d a map viewer which loads collision data as well and wrote and tested various pathfinding algorithms to see how long it takes to generate paths between two points marked on the map,
Using the longest path I could think of without any doors (castle wars to burthorpe) an exact a* path took 347ms which was to be expected (bfs was several times slower than this), I used it as the base and compared against multiple variations of hierarchical a* which searches a pre-generated abstract (almost navmesh looking) graph.
However even those only solve the path in 6.6ms which is great, but not 2k players in 600ms great. JPS+ possibly could give better results given the sparseness of rs maps but I decided that I'd gone far enough to test the feasibility of full path generation.
I moved on to abstracting the map instead, a bot can use the same walking mechanics given to a player, it _just_ needs to know approximately where it's going. By that point I could already generate abstract maps of all walkable areas but it doesn't take into considerations like agility shortcuts, lever teleports, doors, ladders, and all of the requirements which a bot might not have to do those things.
So once again I tried tackling generating this data with varying levels of success:
Matching open/closed doors and gate ids was relatively straight forward by matching object definitions, there was less than a thousand doors in total for 667. I did get distracted and did the same for tree stump id's, and well we all know how that went.
Using, ironically enough, the utility ai to match the bottom of ladders with the tops it found 2445 teleports (a ladder being two; one up, one down) in total, 231 with a match but confidence less than 50% and 11 it had no idea about.
The results aren't perfect but 90% coverage is pretty good.
I was going to do the same for dungeon entrances and exits but I decided that as all the data needed to be checked, and additional information added (theiving levels to pick locks etc..), it'd be better to have an editor and gradually expand the supported area alongside the development of content than tackling the entire game world in one go.
The original map viewer I had made was pretty slugish and used a tonne of ram to render on the fly so I split it up into a render script and rewrote it as a tiled png viewer with better performance as well.
This one doesn't have all the pathfinding weighing it down and I also added support for teleport links, adding/editing data to links, and drawing out area polygons.
While messing around with getting 634 up and running I decided to write a high performance file-server, initially experimenting with writing raw NIO I settled on ktor's CIO (coroutine suspending NIO) library, it's very nice and massively simplifies traditionally complex networking logic like handshakes.
Anyway, [Only registered and activated users can see links. ] and it [Only registered and activated users can see links. ] too.
Looking quite remarkable. Like a top goat. Fill the void Greg!!!
Can we expect pest control any time soon?
Sounds interesting cant lie, good luck with this Greg!
Best of luck, hopefully we get to see those beautiful tree stumps put to use in this too!
GL, nice to see more singleplayer projects with bots.
|« Recreating the game that I loved (2011 Recreation Server) | A PvP Experience  »|
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
|Tags for this Thread|