Think I need advice on how to proceed...
Posted: Tue Mar 27, 2012 8:13 pm
Hi guys,
As you know I have been trying to "get my fu back" and start working on my Text RPG game/engine.
But I have run into a technical dilemma that I am not sure how to move past. Those who know me should know by now that this will be a long post as I attempt to explain what the problem is, and why I can't move past it, and what I wish to accomplish; so please bear with me and read it.
When I first started out, long before I came to PureBasic, one of my goals for this game project was to come away with not only a fully working game, but also a game engine that could essentially be re-used and expanded upon further. The realist in me sees that there a lot of things I don't know, and would have a hard time learning in order to do what I want, but the kid/programmer in me wants to press forward and do things and have a finished project...
The proverbial straw that has broken the camels back is the constant thinking I have done on subsystems such as Quests and Combat/World mechanics, to a lesser extent AI as well..
When I set out to start my world editing tools, I wanted to make a program that I could create almost everything from. Rooms, NPC characters, Monsters, Items, Quests, etc.. As it stands right now the only thing I would be able to create and alter in a truly re-usable fashion are my Rooms. Rooms are very simple, it involves minimal code that spits out a room description and checks for valid directions. Rooms can be easily linked and unlinked with predefined fields and from that aspect it is pretty mailable and there is no need to hard-code anything important that I want to accomplish with a built room (because it requires a handful of static fields in a data structure).
With the other stuff it becomes more complex, from the way I see things.. Building a quest for instance, I cannot rely on a few predefined structure fields to hold all the data I need - not without having huge structures and unused fields littered all over (waste of memory yes?) depending on how big or small the quest is and what kind of interaction is required during said quest. There is the question of how to manage triggers for quest progression, how to update quests based on interaction with NPC's (new objective) or Monsters (kill x monster, collect something from them, etc).
The only solution I see would be to hard-code the majority of that stuff into the program source, which hurts code re-use from a management standpoint.. I have to worry about keeping things very tightly organized and keep reusable code out of files intended for a specific project, and from a motivational stand point that really hurts me.. It is a personal flaw of mine I guess.. My brain tells me "why do this if you are going to have to go back and rip it out the next time, and write the new stuff from scratch? ".... So it makes me feel really bad and like its not even worth it.
I do feel a lot of this would be solved by a scripting language, but as well all know good wrappers are scarce or incomplete, and for someone like me, I could easily spend half a year trying to understand how to integrate a language like Python, or LUA, just by myself. Some of it could probably be made easier by some Object Oriented management also, but PB is not OO and I have no desire to.... try and learn the various OO middle-ware that users have created.
I had an idea about trying to come up with some way of parsing an external data file (say, XML or INI/node based) to try and generate some dynamic content during runtime but I'm not even sure how/if that would work or if it would be too limited technically.. i.e reading some instructions from a file that say "create this variable and give it this value", or "here is a function definition, create this function" etc.. I don't think that's possible in any language? If anything that sounds more like a compiler / VM and way out of my realm anyhow..
I'm just at a real loss here.. Do I need to suck it up and just hard-code stuff? Is there any merit to trying to use external data files to dynamically change things during run-time?
Has anyone else faced this kind of problem, or at least something similar?
I think on an emotional level it is effecting me even more than being frustrated by my technical limitations/understanding.. Because I've been at this idea a couple years now, gone through a couple different programming languages, and now that I've gotten farther I still feel embarrassed because I've got a lot of participation on these forums, made a lot of posts, talked about ideas, requested help with some code -- and I still have nothing to show for it. Makes me feel like a fake?
As you know I have been trying to "get my fu back" and start working on my Text RPG game/engine.
But I have run into a technical dilemma that I am not sure how to move past. Those who know me should know by now that this will be a long post as I attempt to explain what the problem is, and why I can't move past it, and what I wish to accomplish; so please bear with me and read it.
When I first started out, long before I came to PureBasic, one of my goals for this game project was to come away with not only a fully working game, but also a game engine that could essentially be re-used and expanded upon further. The realist in me sees that there a lot of things I don't know, and would have a hard time learning in order to do what I want, but the kid/programmer in me wants to press forward and do things and have a finished project...
The proverbial straw that has broken the camels back is the constant thinking I have done on subsystems such as Quests and Combat/World mechanics, to a lesser extent AI as well..
When I set out to start my world editing tools, I wanted to make a program that I could create almost everything from. Rooms, NPC characters, Monsters, Items, Quests, etc.. As it stands right now the only thing I would be able to create and alter in a truly re-usable fashion are my Rooms. Rooms are very simple, it involves minimal code that spits out a room description and checks for valid directions. Rooms can be easily linked and unlinked with predefined fields and from that aspect it is pretty mailable and there is no need to hard-code anything important that I want to accomplish with a built room (because it requires a handful of static fields in a data structure).
With the other stuff it becomes more complex, from the way I see things.. Building a quest for instance, I cannot rely on a few predefined structure fields to hold all the data I need - not without having huge structures and unused fields littered all over (waste of memory yes?) depending on how big or small the quest is and what kind of interaction is required during said quest. There is the question of how to manage triggers for quest progression, how to update quests based on interaction with NPC's (new objective) or Monsters (kill x monster, collect something from them, etc).
The only solution I see would be to hard-code the majority of that stuff into the program source, which hurts code re-use from a management standpoint.. I have to worry about keeping things very tightly organized and keep reusable code out of files intended for a specific project, and from a motivational stand point that really hurts me.. It is a personal flaw of mine I guess.. My brain tells me "why do this if you are going to have to go back and rip it out the next time, and write the new stuff from scratch? ".... So it makes me feel really bad and like its not even worth it.
I do feel a lot of this would be solved by a scripting language, but as well all know good wrappers are scarce or incomplete, and for someone like me, I could easily spend half a year trying to understand how to integrate a language like Python, or LUA, just by myself. Some of it could probably be made easier by some Object Oriented management also, but PB is not OO and I have no desire to.... try and learn the various OO middle-ware that users have created.
I had an idea about trying to come up with some way of parsing an external data file (say, XML or INI/node based) to try and generate some dynamic content during runtime but I'm not even sure how/if that would work or if it would be too limited technically.. i.e reading some instructions from a file that say "create this variable and give it this value", or "here is a function definition, create this function" etc.. I don't think that's possible in any language? If anything that sounds more like a compiler / VM and way out of my realm anyhow..
I'm just at a real loss here.. Do I need to suck it up and just hard-code stuff? Is there any merit to trying to use external data files to dynamically change things during run-time?
Has anyone else faced this kind of problem, or at least something similar?
I think on an emotional level it is effecting me even more than being frustrated by my technical limitations/understanding.. Because I've been at this idea a couple years now, gone through a couple different programming languages, and now that I've gotten farther I still feel embarrassed because I've got a lot of participation on these forums, made a lot of posts, talked about ideas, requested help with some code -- and I still have nothing to show for it. Makes me feel like a fake?