This is a quick post as I wanted to get something "shown".
So this is just a quick demonstration of the application running. It is showing the start screen and then playing the Cinimatic_Enter for the 1st room you find yourself in. There are a few features you can see in action here.
- The game engine initialises. This dose a lot of stuff like reading in text files for rooms and items and word lists.
- It also resizes the console to a non-default shape. This is as I wanted more vertical room to allow for long text strings. I also elongated it as well. It shoul fit comfortably into a 1280x720 screen so I doubt the resize will be an issue. Unfortunately there dose not appear to be a way to "lock" the user from resizing the screen. It is just up to them to not do it I guess as resizing the console will destroy the screen formatting.
- Then it prints the "start screen" this is the big Adventure Text and my message under it. These are actually two different print functions. One is a "frame print" that is a instant display, well really just a super fast display if lines) and the other is a "type written" effect that types out each character at a time. You might also note that there is a dynamic wordwrap that makes sure the text has a nice margin on both sides and no spit words across lines.
- The cool thing is that the user can use any key to "skip" the text output to the end.
- After pausing for an Anykey it then starts the actual game. We are now in the main game loop that takes input then returns to a point that takes input.
- Then it prints out what I am calling a "Cinematic". In this case the cinematic is the "entered the room for the first time" List<string>. All this data is read from external text data files and can be changed by simply editing the files in a notePad. These Cinematic only play if certain switches in the room are triggered. So every input loop the room.Activates().. but the switches determine what automatic information is displayed before accepting input. This way I can add any story text or events or scene changes, and then after that, no matter how may times you re-enter you do not see them again. So in this case the CinematicEnter plays the very first time the player enters the room.
Aren't I supposed to be working on the CommandPhraser?
YES! yes, I am.
A good mate of mine who is a programmer recently got over sickness and rebooted his online presence. After I was telling him of my project and how it has been going and he kinda gave me a bit of a scolding. Apparently, I have done one the cardinal sins. I have been focusing on the wrong stuff. Almost on polish rather than the meat of the application. Meaning that I have done a lot of work here and have really failed to make anything but minor inroads into the command phraser. Which is really the entire focus of the application and the main "chunk" of it I plan to be carrying lessons form into other more complex projects for the stage 2 "2D" projects.
Without a command phraser there simply is no game. So why have I not prototyped that first in a clean simple environment? I dunno man.. I dunno. I probably should have haha!
You see I was trying to build what I have now.. an environment that I can easily test commands. So I have a player sitting in a room, with items and in a level. While I was building the DataReader I found I was working on phrasing data I had no real idea on how to use. So during the rewrite I redid the code to be generic. It now reads raw individual lines into strings or reads raw individual lines between brackets into List<strings>. So I am not longer restricted with pre-planning the entire data file. It is trivial to add more read data types as I need them.
So now I had the data reader, it seemed logical to me to work though in a forward,s tep by step kind of way. So I add and use in a "real" manner the data. Rather than having all this junk data. So when I am coding the command processor I am also coding how the read inputs can be used in a scene and at the same time build the exact data it needs to do those commands. Without having to pre-plan everything.
Well that is my reasoning.. I still think I probably should have made sure my command processing concept was workable before hand... oh well.
Regardless I am pretty happy with were the project is right now. Everything seems to be working as I wanted, and I am now in the exact position I planned to be.. as in a area free to experiment wit the command phraser and it's action implementation in a hands on kind of way.
See ya next time!