SQL Beginner's Tutorial: Keeping Score in a World of Data

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.



Need an Extra Life to go on?

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!"



Ogre

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


PackerYetiClaus2.JPG

I says Thanks You!


Sort:  

Upvoted on behalf of the dropahead Curation Team!

Thanks for following the rules.

DISCLAIMER: dropahead Curation Team does not necessarily share opinions expressed in this article, but find author's effort and/or contribution deserves better reward and visibility.

Help us giving you bigger upvotes by:

Upvote this comment!
Upvote & Resteem the latest dropahead Curation Reports!
Join the dropahead Curation Trail
to maximize your curation rewards!
Vote dropahead Witness with SteemConnect
Proxy vote dropahead Witness
with SteemConnect
Donate STEEM POWER to @dropahead
12.5SP, 25SP, 50SP, 100SP, 250SP, 500SP, 1000SP
Do the above and we'll have more STEEM POWER to give YOU bigger rewards next time!

News from dropahead: How to give back to the dropahead Project in 15 seconds or less

Quality review by the dropahead Curation Team

According to our quality standards(1), your publication has reached an score of 84%.

Well said Gabriel García Marquez: "You learn to write by writing" Keep trying, you will soon achieve excellence!


(1) dropahead Witness' quality standards:

- Graphic relation to the text (Choice of images according to the text)
- Order and coherence
- Style and uniqueness (Personal touch, logic, complexity, what makes it interesting and easy to understand for the reader)
- Images source and their usage license

well! that's best SQL Tutorials. Thanks for explain in more detail.
Your Picture is AwesOme cOol :)

Thank you and thank you! I am a yeti at heart. I hope these Tutorials help you in your SQL learning journey.

Yeah! I learn from yOur post!!

Excellent! I love hearing how my readers are learning from me.

Yup! Sir yOu're doing great job. You're teach peOple through your skill. That's a big honor for me, I respect you!

bows Thanks so much! I honor me as well by finding value in my teachings.

Hi sir thank you for this wonderful post which you have shared after a long time. Yeah, long time no read..from your side.

I'm a student of BSCS currently learning SQL database at my uni where my teacher is giving lectures on this topic with C sharp as well to store data out there. That's why your post really helped me. I hope I can develop such a Good game in the future. ☺️

I believe my next C# Tutorial will join these 2 Tutorial Series' in order to show how to access this data. Maybe it will help you with some ideas. Any suggestions for things to go over?

Please look up my C# Tutorials (you can search for the tag csharp-forbeginners) to help you with your learning.

Yes sir it will help me a lot and I always confuse in the complex sql queries while we want to retrieve the data and I always got confusion whenever I tried to make a query. Can you help me with the logics?

Yes I noticed your previous post as per this tag. Thanks a lot ❤️

If you could give me a taste of what you're doing currently and what your ending goal is I might be able to give you a couple of pointers and suggestions to move you in the right direction.

Hi, this is really great game the ' dungeon crawler game' and the detail you have explained is quite helpful for beginners to understand each and everything that how the game developed and worked well.

You are always come with useful and informative contents even after a week. You should keep your working continue in this field. :)

The last is picture you shared for saying Thank You is Awesome in the Winter Season. ;)

Thanks so much! I am glad you appreciate my efforts and hope to continue in this way for a long time.

@dbzfan4awhile I find writing query (advance part of sql queries )a bit difficult in sql hope you make a article on that and as always you were on the point and really you have wonderful coding skills and really amazed by your posts ....You are really doing wonderful thing and I bet you will surely get wonderful results for this pn steemit in long run ....keep it up sir

I will keep it up. I think it's helping and doing good for the community! I'll definitely be delving into more complexity going forward, so keep reading and learning!

cool bro, i've always wanted to design a game, can you also post some tutorials on basic game creation? if you find the time, that is. nice tutorial, i hope there's a part you would later explain CRUD from external applications...

This SQL Tutorial and my C# Programming Tutorial are tied together in many ways, so this is going to join them together more and more. I do have some CRUD explanations in earlier SQL Lessons if you wish to go back through the Links at the bottom of the Post.

oh, nice, ill go check them out, nice effort bro...

I try to make things easy to use and easy to understand.

Oh!
Excellent work bro.Keep sharing like this.We are with you 😊

I intend to do so; and linking my 2 Tutorial Series sets together will make it easier for people to understand why both are necessary. For programmers and Database personnel this might be a no-brainer, but for the average person it might still be a good question to understand.

now i am learning c++,after 4 step i will learn sql.it is my syllabus in this semester in my university .........thank for sharing this information @dbzfan4awhile

You'll have to let me know if this series helps to make your SQL course easier. That's my hope, at least. You'd be great testimonial.

i am new learner about programming language.so i have a little knowledge about this.as the series is selected by the department.i hope it will helpful for me. but i am not sure...however i have learned many things from you

As long as it is helpful at all, that's a positive in my book. Thanks for reading!

you are welcome........really you are a pioneer for me in many ways.....love to stay with you..........god bless you

And blessings to you as well.

Thank You @dbzfan4awhile for the Awesome Tutorials
I was in search of best SQL tutorials and Finally I found it Here
thanks alot

You're quite welcome! I hope you find them informative as well as entertaining! I tried to make them easy to follow, so you'll have to let me know if I succeeded.

Yeah @dbzfan4awhile
I hope this will be the Best tutorials on SQL
And we will alot from this
Thanks Again

after reading your post? I understand a little about SQL. and I will continue to study, either through google, journals, of course through your post. thank you for sharing knowledge. hopefully you are more successful

I'm glad you found value in it! Did you also see that there are a number of prior Posts that might be of use to you?

I plan on this Tutorial Series lasting a year if I can do so, with increasing complexity and reviews and, maybe, a homework contest. Who knows.

Coin Marketplace

STEEM 0.36
TRX 0.12
JST 0.040
BTC 70846.59
ETH 3567.69
USDT 1.00
SBD 4.79