Streamlining! Streamlining. Streamlining?
by Jared Coliadis · 01/29/2006 (7:37 am) · 3 comments
Hello again. It's been a couple weeks and I've only been able to poke around for a couple days at my code. Even so, I've made a few significant steps in the T2D Adventure Core.
First and foremost, levels can be dynamically loaded/unloaded without losing the contents of the level. For example, let's say the game has a character and two items inside a bedroom, say called "shadyGuy", "blueKey" and "oldBook". After setting up the proper datablocks, all that needs to be coded is:
Then, any code relating to the t2dSceneObject itself can just be called from a member variable. All object properties, such as scaling the sprites, dialog boxes, and all state data is automatically handled. Say now that the player character leaves the area through a (now functioning) door. All of the current level objects are removed from the scene and the new stage and all of its characters are loaded, but no worries! Whenever the character re-enters the original scene, everything is back exactly where it was before! The programmer doesn't need to track any positional/logical data of the objects in the current scene, it is all automatically handled by the Adventure Core. This is also the first step to saving/loading the complete game state to/from a file.
I have set an intentional limitation to this though. All characters and items can only exist in one location at a time. This means that if any character moves to a new scene, he is not considered a part of the old scene anymore. The reasoning of this limitation is, in fact, to reduce continuity errors in the game story. It prevents a programmer from accidently leaving a character in two different game locations at a certain time when the player travels between the two areas. Also, this will mean that each game item doesn't have any clones cropping up if an item would have to change locations or is part of the player's inventory.
I've been working hard on the Adventure Core to make actual content creation extremely simple on the end coder. Besides the effortless loading/sequencing, I'm trying to keep as much of the object data available to the programmer as possible with little to no modification to suit their specific game. I've been getting the code simple enough now that I think it's becoming more and more feasible to have a GUI to even handle most of the code for content creation. No promises yet, but it's looking pretty good.
The Adventure Core still has a number of large hurdles to pass that I have yet to even attempt to cross. I think the largest of these hurdles will be the dialog trees. I am trying to keep the core as 100% script, so a script-based tree-algorithm might be a bit too straining on the engine and on me when a simpler solution probably exists. I still have a bit of research to do here, but I'll figure something out. Another large task that I think I have an idea to approach is changing the game context throughout the game based off of various events ingame. I want this to be more powerful than a simple solution will allow, but like I said, I think I have a solution in my head. I haven't touched the inventory yet still, but it looks to be pretty simple.
So overall, I'm getting more and more impressed with the Adventure Core, but there are still a number of things to accomplish. To conclude, here's the newest subtle feature. Hovering over any game object will reveal it's name or destination. The .jpg compression wasn't friendly to the text, but it says "Comic Book Store" on it. Also if you notice, I re-scanned the level/character and stopped chickening out about the texture size. It looks nice in the new high-resolution. I keep getting giddy while working on this. Monica (our artist) hit the style for Issue #37 perfectly. The actual game is still waiting for the Adventure Core to be completed, but using the few art assets she's supplied makes me happy.

It doesn't look that much different gameplay-wise from my last few .plans, but there is so much going on behind the scenes that is running the show. It's like how I describe to computer illiterate people what it is that programmers do. "You know how you push a button, some magic things happen, and then you have the information you need? I work the magic."
I hope I'm not the only one excited about this,
/Jared
First and foremost, levels can be dynamically loaded/unloaded without losing the contents of the level. For example, let's say the game has a character and two items inside a bedroom, say called "shadyGuy", "blueKey" and "oldBook". After setting up the proper datablocks, all that needs to be coded is:
level("bedroom").load();
character("shadyGuy").load();
item("blueKey").load();
item("oldBook").load();Then, any code relating to the t2dSceneObject itself can just be called from a member variable. All object properties, such as scaling the sprites, dialog boxes, and all state data is automatically handled. Say now that the player character leaves the area through a (now functioning) door. All of the current level objects are removed from the scene and the new stage and all of its characters are loaded, but no worries! Whenever the character re-enters the original scene, everything is back exactly where it was before! The programmer doesn't need to track any positional/logical data of the objects in the current scene, it is all automatically handled by the Adventure Core. This is also the first step to saving/loading the complete game state to/from a file.
I have set an intentional limitation to this though. All characters and items can only exist in one location at a time. This means that if any character moves to a new scene, he is not considered a part of the old scene anymore. The reasoning of this limitation is, in fact, to reduce continuity errors in the game story. It prevents a programmer from accidently leaving a character in two different game locations at a certain time when the player travels between the two areas. Also, this will mean that each game item doesn't have any clones cropping up if an item would have to change locations or is part of the player's inventory.
I've been working hard on the Adventure Core to make actual content creation extremely simple on the end coder. Besides the effortless loading/sequencing, I'm trying to keep as much of the object data available to the programmer as possible with little to no modification to suit their specific game. I've been getting the code simple enough now that I think it's becoming more and more feasible to have a GUI to even handle most of the code for content creation. No promises yet, but it's looking pretty good.
The Adventure Core still has a number of large hurdles to pass that I have yet to even attempt to cross. I think the largest of these hurdles will be the dialog trees. I am trying to keep the core as 100% script, so a script-based tree-algorithm might be a bit too straining on the engine and on me when a simpler solution probably exists. I still have a bit of research to do here, but I'll figure something out. Another large task that I think I have an idea to approach is changing the game context throughout the game based off of various events ingame. I want this to be more powerful than a simple solution will allow, but like I said, I think I have a solution in my head. I haven't touched the inventory yet still, but it looks to be pretty simple.
So overall, I'm getting more and more impressed with the Adventure Core, but there are still a number of things to accomplish. To conclude, here's the newest subtle feature. Hovering over any game object will reveal it's name or destination. The .jpg compression wasn't friendly to the text, but it says "Comic Book Store" on it. Also if you notice, I re-scanned the level/character and stopped chickening out about the texture size. It looks nice in the new high-resolution. I keep getting giddy while working on this. Monica (our artist) hit the style for Issue #37 perfectly. The actual game is still waiting for the Adventure Core to be completed, but using the few art assets she's supplied makes me happy.

It doesn't look that much different gameplay-wise from my last few .plans, but there is so much going on behind the scenes that is running the show. It's like how I describe to computer illiterate people what it is that programmers do. "You know how you push a button, some magic things happen, and then you have the information you need? I work the magic."
I hope I'm not the only one excited about this,
/Jared
About the author
#2
01/29/2006 (4:35 pm)
Very cool!
#3
This sounds very very cool! I look forward to seeing what you come up with over the next coming months! I like the game persistance you've got going on, that's something we've been working on over here in the garage for some time now. Can't wait to see the fruit of your labor, so hurry up ;)
Best Regards,
-Justin
01/31/2006 (1:17 am)
Jared,This sounds very very cool! I look forward to seeing what you come up with over the next coming months! I like the game persistance you've got going on, that's something we've been working on over here in the garage for some time now. Can't wait to see the fruit of your labor, so hurry up ;)
Best Regards,
-Justin
Torque Owner Jesse (Midhir) Liles
Also, I _will_ be in line to purchase your game =) Tell your artist that she is brilliant as well =)