View Full Version : SP mod save games
08-22-2006, 05:58 PM
Hey, has anyone figured out a good way of making SP mods (ported into MP) have save games?
If it hasn't been done yet, I think it would be a huge factor that would improve gameplay. I was thinking about it myself, and it would basically need the following:
*Store the values of the 3D coordinates for the player(s) and any active NPCs.
*Store the values for health/shields, weapon types, ammo, bank account PIN(ha ha...made you look :lol: ).
*Store values for "killed/destroyed" entities (NPCs & such)
*Store boolean values for any completed objectives.
*Load all stored values upon loading map.
Please feel free correct/modify my comments
08-22-2006, 07:32 PM
I suspect it might be easiest to just whole hog copy the g_entities structure and attached client structs.
08-22-2006, 11:00 PM
Here's a tut that has some stuff that you may want/need. Although JKA already has NPC's so you don't need that.
08-22-2006, 11:27 PM
That's a really good tut. Any other ideas on making savegames?
08-23-2006, 12:49 AM
That is the only way. It shows you how to store stuff if you actually read through it.
08-23-2006, 01:29 AM
Ah yes....my old nemesis, Darth R.T.F.M. </embarrassed>
08-28-2006, 11:02 PM
It'd be pretty good if MP games had a way they could be saved.
If it worked good, perhaps SP mods could be made using OJP's SP in MP mode and making custom levels for it? It could be a pretty good way to get around not being able to change many gameplay features in SP due to not having the source code.
08-29-2006, 03:11 AM
Well I'm working through this tutorial. If it doesn't do it the way I want, I have an idea for making dynamic spawn points. It will involve quite a bit of code though. If I figure it out, I'll gladly share with everyone else.
08-29-2006, 05:47 PM
I've already set it up to be able to manually add autosave points (which act as dynamic spawnpoints) and additional initial spawnpoints to deal with that issue. I don't think we want to make "fully" dynamic spawnpoints since it would make the game WAY too easy if you could just instantly respawn where you died.
And let me know how the save/load code works out. If you can get it working, I'd love to add it to OJP.
08-29-2006, 06:27 PM
Should work fine but its not meant for COOP afaik. and i am assuming jedispy's code is meant for spawn after dying.
08-29-2006, 07:25 PM
Err, right. I'm not sure how well it would work in a multiplayer environment since the engine probably isn't going to like the game jerking it around in terms of player entities. But we'll have to wait and see how it works. :)
08-29-2006, 08:00 PM
It would incorporate respawn after dying. I didnt have coop in mind, but I'll see what I can do. Who knows, maybe if we behave, eat all our veggies, and say our prayers to Raven Software each night before bed, they might release the single player source code.
08-29-2006, 08:51 PM
I call CoOp anything related to running the SP maps in MP. It's entirely possible to run CoOp mode by yourself in a Solo Game.
vBulletin®, Copyright ©2000-2013, Jelsoft Enterprises Ltd.