September 2023: Time to pick up the (scripting) slack

Although I didn't admit it until almost June (see my first blog), I've now spent upwards 6 months in a "slack generator" mode, adding various bits of scripting and modding without a clear direction, and often not even getting them complete. Only now I realize where it all went "wrong" - here's a rough timeline:
  1. Feb 2023: The mission system draft. Excellent idea from Discord. To make it work at all, I needed to extend our scripting, and once I started, I began also finding and fixing defects and realizing more and more opportunities. Eventually I paused working on the missions to finish those fixes and enhancements. The branch is now very stale, but after I dust it off, it will shrink to around 1/3 of it's current size - that's how many things from there already made it to master.
  2. Early Mar 2023: The message queue binding. Something I figured while working on missions. This is a honorary mention because it actually got finished, though it's full potential is yet to be shown.
  3. Mid Mar 2023: The audio bindings. What kind of mission would it be without a cash register "ka't'ching" sound when you receive reward? This is another honorary mention because this got completed and has pretty good demo. But again, not really used in any gameplay yet.
  4. Late Mar 2023: The OGRE scene and mesh bindings. I realized OGRE API is sensible enough for modders to use it themselves, if they could only access it. So I made it accessible. I almost got this thing done but I wanted to make it more useful by letting modders read vehicle and engine state. It didn't get done.
  5. Apr 2023: Enhanced mouse-node manipulation: I think manipulating things with mouse will be the most important gameplay mechanic in the future. Also I'm not happy with how it's now visualized - basically you can't see the node you're grabbing with mouse, you're clicking blind until you actually hit one. That's probably why I did create a working grab+highlight mechanic but then got stuck remaking debugview internals and creating a theme system.
  6. May: the first blog and start of Script Editor. You know the rest.
Yes I'm repeating what I already blogged but I needed to go through it again because I lost all context in the past month. So what's in it for the player?

Multiplayer game of tag

This is my plan to finish and showcase the mission system, and the timeframe for completing it is next 2 weeks (Sep 9-24) with a prototype completed this weekend. I received a lot of hints that it should support multiplayer challenges too (or perhaps primarily). I looked into it and found out RoRnet and AngelScript already provide what we need, it just needs documentation and a demo. So by creating a simplistic multiplayer challenge that involves interaction between players (complete with score UI and audio effects), I can make all the code above come together into something meaningful. This is a rough roadmap:
  1. The rorserver side: Like I said above, no changes to RoRnet are needed, an neither are changes to server. The only thing the server needs is a generic mission-support script which handles `server.gameCmd()` and possibly other callbacks - see the example server script PR and provisional server script docs. We've had multiplayer server scripts before but I don't want missionzips to work this way - it would make them a PITA to develop and maintain and force host to restart server and shuffle configs to get them going. Best to keep things simple on server and let clients do the gameplay.
  2. The client side: Obviously everyone on the server must have the missionzip installed in the requested version to play. For this purpose I'll add script API to query things from modcache.
  3. The tagged player: Whoever joins last gets the tag. All clients know who has the tag. Visualization for the player may be simply done with a custom label, drawn by DearIMGUI like standard net labels already are. It's also possible to leverage the OGRE scene bindings to use a custom mesh on top of the vehicle, perhaps a giant beacon or the like. And finally the standard race arrow will be present.
  4. Tagging an opponent: The player must drive close the opponent, face it forward and press a key. Keypresses are already in the scripts. Getting position and rotation of actors also. DearIMGUI can draw any necessary "targeting" UI telling the player how close and what angle they need to be. Finally, the client sends the opponent a message "you've been tagged", the opponent verifies it's legit and informs everybody.
  5. Victory: It's a "last man standing" mode game (though a lot other modes can be thought of). The host client monitors how long each player was tagged. After a certain time limit (possibly reducible by powerups) the player loses.
It's not a small project but like I said all the research and much of the coding is already done. I'll be posting updates in Discord#development. Hope you'll enoy it!
 
One of the main reasons I joined this forum (seriously) was because I saw these "micro" blog posts from you and I wanted to thank you personally (as well as all the other developers) for your continuing work on this great game. Thank you!
 
Back
Top