I’m in the process of making a full-fledged first person shooter game, I’ve already made the character, animations, and most of the map but now I’m stump because I need to setup a save system (so players can keep what they unlock) a network so people can play online and join servers. and a game mode selection so they can play one of the various game modes. I’m a first-time video game developer so if anyone could give their opinion or advice that would be most helpful.
I need to setup a save system (so players can keep what they unlock) a network so people can play online and join servers. and a game mode selection so they can play one of the various game modes.
…and then
I’m a first-time video game developer…
I strongly suggest you to start with a very simple game like Space Invaders or Snake Byte and learn Python(if using BGE)
Except the save system, the other features are very-very-very hard to do, even by a working full time group of experienced developers.
checkout using a dictionary of game objects that have a property that needs saved.
import bge
import pickle
controller = bge.logic.getCurrentController()
own = controller.owner
saveDict ={ }
for object in own.scene.objects:
if 'SaveMe' in object:
Name = object.name
props = object.getPropertyNames()
store = [ ]
for prop in props:
store.append([ prop, object[prop] ])
saveDict.update( { Name:store } )
path =bge.logic.expandPath("//")path += '/SavedGame/'
file = 'SaveName.txt''
with open(path+file, 'wb') as f:
pickle.dump(saveDict, f)
and to get the data back
import bge
import pickle
def main():
cont = bge.logic.getCurrentController()
own = cont.owner
path= bge.logic.expandPath("//")
path += '/SavedGame/'
file = SaveName.txt'
with open(path+file, 'rb') as f:
gameData = pickle.load(f)
for key in gameData:
try:
object = own.scene.objects[key]
for prop in gameData[key]:
object[prop[0]] = prop[1]
except:
print('Keyed item " + key + " does not exist')
take the save from blueprintrandom or simply look in resource section.
a few people including me sharing a save/load. agoose got a network setup, and game mode selection is for you to build, its just a simple overly with a few buttons.
But listen to haidme first before you even dive into it.
path =bge.logic.expandPath("//")path += '/SavedGame/'
why not simply:
path =bge.logic.expandPath("//SavedGame/")
Make sure your weapons feel impactful and powerful both in animation sound, and the damage they do.