• OK, it's on.
  • Please note that many, many Email Addresses used for spam, are not accepted at registration. Select a respectable Free email.
  • See https://www.intpforum.com/threads/upgrade-at-10-am-gmt.27631/

Game Project Preface

Cognisant

Prolific Member
Local time
Yesterday, 19:22
Joined
Dec 12, 2009
Messages
8,647
I want to make a text based sandbox game, partly to brush up on my (quite rusty) coding skills and to have a fun collaborative project for the forum that doesn't require participants to contribute anything other than text and ideas.

By a "sandbox game" I mean something like the Elder Scrolls games or more accurately something like Kenshi, a game where you have a simulated world and you can throw the player into more-or-less any part of it and the player makes their own story through how they achieve their rise to power or whatever other goal they give themselves. Kenshi is a good example because unlike in the Elder Scrolls where the player character is inherently better than everyone else in Kenshi the player character is just another starving vagrant, even once you've trained up your stats and got some good equipment you can still get your ass kicked by a gang of starving hobos.

There's a reason for this aside from the fact that I like Kenshi, a game like that doesn't really require scripted quests just surviving and getting stronger is your quest and the story is what happens to your character in the course of doing that, I've had some amazing experiences in Kenshi that simply emerged from the complexity of the setting and your ability to interact with it. Now I'm emphasizing that complexity because I think that's where an entirely text based game could really shine, when your content is just text that makes it much easier to make (and run) a lot of content and the same is true for mechanical complexity, having everything abstracted lets you do very complex things just by saying it happens and showing the player just enough to let them fill in the gaps with their own imagination.

At the same time that's not to say we can't have scripted questlines, the more the merrier, it's just my goal is to start with a foundation that by itself fun to play then give everyone the tools to easily build upon that foundation. Speaking of tools that's my initial goal to create something like the TES Editor (y'know that program we used to mod Morrowind way back when) but obviously not as complicated because there won't be models or textures or animations or pathfinding or y'know all the other shit that comes with making a 3D fully rendered world. I really want this game project to be easy to mod and make extensions to so all the content and player files will be saved as text files and human readable markup languages so if you want to take a look beneath the proverbial hood you shouldn't need any coding knowledge to do so (unless you want to script a new gameplay mechanic).

Where I'm currently looking for is ideas for setting up that foundation, as per the usual text adventure game format the world is going to be divided up into locations with a number of paths you can take between those locations, for example:
Game Window said:
You are in a room with a couch, a window and too doors, one leads to the kitchen and the other leads outside.
  • Sit on couch
  • Jump out window
  • Go through the door to the kitchen
  • Go through the door to outside
The kitchen is a location, the cellar is a location you can only access from the kitchen, etc.
I'm going to need a way to map these locations, there will be a text file with a list of all locations and some of the other locations they link to but navigating that will be a massive pain in the ass, it would be better to have some kind of visual flowchart but it'll take work to make/update it and with a sufficiently large world even a flowchart could become impractical.
Maybe I could divide things up into regions, sub-regions, sub-sub-regions, etc. WIP

The locations themselves should ideally be as dynamic as possible, say if you're out in an open field the location description could include the current weather and the state of any dynamic elements that location has. For example the room above could be dimly lit (if there's no active light sources) with rain pattering softly on the closed window, the darkness and noise making it easier for you to succeed at sneaking/hiding but the same is true for anyone who my be trying to ambush you. Or it could be a sunny day outside with a pie cooling on the windowsill, if you close the window you crush the pie and if you don't clean it up after a period of time the mess will attract vermin, or worse if you leave dead bodies laying around. NPCs are also a dynamic element, at different times of day NPCs will come and go from locations to engage in their daily activities and as you progress time the things they're doing will change, say if you're in a kitchen in the morning the occupants of the house will come down and at different times they'll be making breakfast, eating breakfast, cleaning up, talking to each other, etc. This is of course assuming said occupants have no issue with you being there and there's nothing else that would reasonably disrupt their routine, a dead body on the kitchen table would of course have a profound effect on someone's willingness to make breakfast.

Again this is why I'm emphasizing complexity and interactivity, a text based game isn't going to wow people with action or visuals but you could make a text based adventure game that outdoes everything else in terms of depth and as anyone who has played Dwarf Fortress or Rimwold can attest to games with a lot of depth can be far more engaging than games that look good but are really just flashy and shallow.

So we have a location, that location is going to be affected by certain external dynamics (weather, season, time of day, maybe even stuff like the day of the week or what faction controls the area), the location itself is going to have certain identifying properties (the type of walls, floor, roof, or the ground and surroundings outside) and in the location there's going to be dynamic elements (furniture, decoration, objects, NPCs, mess) and each of these things will have its own properties. You might think I'm getting ahead of myself here but object orientated programming is going to be a big part of this and it's wise to come up with as many properties for your objects as possible before you start trying to define them.

For example a chair might have:
Weight = 5kg
Material = Steel
Bulk = 30
These properties are useful for determining whether a character is able to pick up a chair (is it too heavy?) carry it to another room (will it fit through the doorway?) and it it's used to barricade a door how effective will it be (steel is stronger than wood therefor a steel chair will last longer). Of course these properties aren't relevant for a light switch on the wall, although if you inspect the switch the material its made of could be one of the properties that appear in the description, I digress the point I'm getting at is that when making objects it's a lot easier to leave properties you're not going to use for an object undefined than to go through the exhaustive list of properties and try to determine which are relevant for each object you're create.

This is doubly true when it comes to object interaction, rather than enabling "can be picked up" for every such object you create you can instead set it so that every object that has a weight can be picked up, likewise giving something a damage value then qualifies it to be used as a weapon, this also helps prevent weird stuff happening like people picking up landmines and using them as a bludgeoning weapon (with added explosive damage!) because the weight is undefined therefor they can't be picked up even if they have a damage value.

This sort of data structuring is something I really want to talk about, is using "undefined weight" a good idea for landmines or should there be a "can be picked up" property to prevent any potential weirdness when someone else mods in the ability for players to defuse and pick up mines?
 

Cognisant

Prolific Member
Local time
Yesterday, 19:22
Joined
Dec 12, 2009
Messages
8,647
Need to work out some not stupid naming conventions.

Stuff: In-game objects, the stuff a character would interact with, this is better than calling them objects because an object could be anything in the code that has associated properties and functions.

Stuff is a class of object, as are characters and locations.

Objects have properties, I'm going to further define these into static and dynamic properties, a static property tells you something about the object itself (i.e. that a chair is made of wood) which will rarely change. A dynamic property is something like the weather outside a window, one has to be careful about applying dynamic properties to objects in cases where they may not be applicable. A location is an object with the dynamic property of weather but weather isn't applicable to all locations, it would be odd if it started snowing inside a cave.

----------------------------------------

I'm getting bored so lets talk NPCs, I'd like the game to be set somewhere that allows for a wide range of races so I can really go wild on all the different options available for character customization and NPC generation. Aside from physical properties like height, gender, skin color, etc, it's also worth considering things like class and culture. Continuing my praise for Kenshi the race you choose for your character greatly affects how different NPCs of other races/factions treat you, it really makes the race of your character feel a lot more important when everyone's making it perfectly clear what they expect of you.
 
Top Bottom