Hi! Long time no read! I've been so busy in other things that I haven't been able to devote a Post to my SQL Tutorials... for that, I am sorry.
Today's lesson is going to link directly to my most recent csharp-forbeginners Tutorials. In those Lessons I'm creating a Dungeon Crawler game (Lesson 1 & Lesson 2).
So now a quick glimpse into the game itself...
Kneeling or Crawling? You make the call!
Crawl This Way!
The game is a simple dungeon crawler game (a game where the character walks through a dungeon in search of something, be it treasure, people, monsters, or just escape). The story line, put simply, is that you're there to defeat the Evil Wizard Zankar, save Princess Lana, and find the way out... all the while monsters will spring out at you, treasure will be revealed, and you will try to raise your Score to the roof.
The Knights of the Round Table
The Tables have Turned!
So, now that we have an idea of the main gameplay points, we can begin to think of the data that should be stored behind-the-scenes for the game. What kinds of tables do you think we should create for this game? You just let me know in the comments if you think of any that I missed (because I'm only doing a quick run-down of things that I can think of right off the top of my head). There are no wrong ideas, but there will be many ideas that don't fit well with this game.
Well, right from the get-go I know that I'll need a way to store character game data, right? Nope, not for this game. This is a game-by-game, so there's no reason for us to store character information or game-state management information for the long haul. Since this is geared for newer database management types (or those wanting to learn), these 2 are a bit too complicated for the starter course. I believe, when I gear up for an intermediate level Tutorial Series, these types of storage devices will be seriously considered.
Ok, how about scoring?
Now you're talking! We do need a High Score Table, because someone always needs to have bragging rights! What else?
Ummm, battles?
What do you mean by that?
Well, monster battles... the stuff that tells us what we're going to fight. What about that?
That's an excellent idea!
Anything else?
Weapons? or Armor?
We can do so, but I don't think at this point... maybe the next Lesson will do so.
Funny ending messages?
Hmmm, everybody (well, most) like a good pun or joke here and there... and my favorite game series of all time is the King's Quest Adventure series by the now-defunct Sierra On-Line, which is rife with jokes. Sure! We can do that! Just don't condemn me if the puns and jokes are ghastly, BOO-worthy ones!
Yay!! Let's make this game fun!
I agree completely.
Power Up the Points! To the Max!!
Let's start this section by giving you 10 Points for making it this far. Yeah!!! 10 whole Points!
Ok, they don't really mean anything, but you can certainly brag to your friends about it (if you want them to look at you as if you had a second head). That's what it's all about, too, the bragging rights for who is the best. It's the entire reason why Facebook and other Social Media sites have Achievement Scores and rewards... people always want to know who they are better than and, to a smaller degree, who is ahead of them.
That's going to be no different for this game that I'm making with you all. To do so, we need to score those Points so that everyone can see them! What do I need? The score_table table. As you can see below, it will hold the score, the name of the player (or the character name... I haven't decided yet) and the date of the score.
Once this is fully developed, I will need to find a good method to open this to the public to play my game, even if it's super-cheesy. Then I can say... "Yep! I made that game!" or better yet, "Steemit, WE made that game!"
Something Wicked This Way Comes!
You read that right... wickedness is in the air! And what is more wicked than Monsters? Well, Evil Wizard Zankar... but he's already going to be a special-case scenario, so let's say "nothing for the game". So, quake in the wake of Monsters!
Ok, so we want to be able to access monster information. I already went through the basic question of "What do we need for this table?" and designed the table as follows. I have an id to identify the monster by a random number (which is how we'll determine what monster pops up. Below you can see that structure and all the fields... I hope they are all fairly self-explanatory (the name of the monster, the health, the attacking and defensive power, and rewards).
The attacking and defensive power will have a formulaic calculation based on a percentile value in the database. Below you will see the SELECT statement that will pull in all of those monsters' data fields. I will pull in all of these data rows in the beginning of the game and store them in a local variable within the game. This logic is not in place yet.
If you are strong enough, you will be able to defeat these beasts and criminal influences! Good Morrow and Good Luck Sir Knight!!
Following are the Links to my Previous SQL Lessons!!
SQL Beginner's Tutorial: Relational Databases & SQL
SQL Beginner's Tutorial: Writing your First Queries
SQL Beginner's Tutorial: SELECT Data to Use in the Game
SQL Beginner's Tutorial: Manipulate Data for Use in the Game
SQL Beginner's Tutorial: JOIN Me and Together We Will Rule the Universe
SQL Beginner's Tutorial: What if the World IS NOT NULL? and IN the Galaxy?
SQL Beginner's Tutorial: Sorting Groupies
I says Thanks You!