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

in sql-forbeginners •  7 years ago 

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!


Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

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

I will try.

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.

well thats one of my best sql tutorials i have ever seen u have great analayzing power sir and that u have shown in ur post good informative post!

Thank you for the kind feedback! I will continue to make these Lessons to teach more and more SQL techniques. I appreciate you reading my work.

pleasure is all mine and yeah sir i will wait for ur more lessons on sQl techniques!

so awesome and engaging. I dont really have any value to add but I just wanted to let you know this is an awesome post

I appreciate the feedback! Is there anything in particular you'd like me to devote a lesson to that might help in your projects and data analyses?

No just keep them coming and im tagging #blockchainbi

Sounds good. If you do think of anything that you want me to go more in-depth on, just let me know.

amazing post ser. @dbzfan4awhile
thank you for posting it

Thanks! I appreciate the positive feedback! Any ideas on other things I should point out during my teaching?

You are welcome ser @dbzfan4awhile

this is very unique content.. i like this types of things.. go on

I like to be entertaining while I teach. I think I do a pretty good job.

yeah. you are doing.. my support will always with you

Amazing work :) Thank you for providing us best SQL tutorial :)

You're quite welcome! Is there anything that you would request me to go over in future Lessons?

Yeah i would like you to share some tips for newbies on steemit :)

I already have some Previous Posts that have given some tips and techniques. You can find this list at the Bottom of this Post and you can search using the tag csharp-forbeginners to get some of the more recent Posts. Is there a specific SQL Command that you're having difficulty in understanding?

Keep in mind that I have not taught any lesson on INSERT and UPDATE statements yet, mainly because I am hesitant on teaching that part since it can lead to issues if you get things wrong.

Gergeous work bro carry on

I certainly put effort into it, so I'm glad you and the other readers seem to enjoy it.

Wow really interesting, am more and more in love with your write up

Glad you are enjoying the lessons. If you have any suggestions or topics that you'd like me to put in my plans, just let me know!

I think you're very scared. You protect yourself. I believe you will be good ..

I'm very scared? I am scared of providing poor lessons, so I guess you're right there. That is the reason I always welcome suggestions! Thanks.

thank you @dbzfan4awhile for sharing this valuable information with us i just learn something new from your tutorial.

I'm glad you find value in it.

@dbzfan4awhile thousand miles far better than the tutorials i get from my college...

Some of those Tutorials and Lessons are just way too advanced in nature. I try my best to bring the "jargonese" down to a minimum.

Dude this is pretty cool. Shoutout @dbzfan4awhile

Thanks so much! Anything you might do differently or add to it to make it better?

I would consider incorporating alternative races in some of the other characters..

I'm thinking of doing so and adding NPC's (Non-Player Characters for those that read this and don't understand) as well as Stores that have popped up in the Catacomb Corridors to buy/sell weapons and armor as well as, with extra complexity, characters for a group party. Those items will probably be a ways down the road just due to the extra work and complexity involved. It might be part of an Intermediate-Level Series.

Or I might try to create a Budget Proposal for the Steemit Budget thing to create a project for a Web Service-based game that is far better than this one where I can hire on some other individuals to work on different functions.

Maybe.

Interesting. Are you working solo on your gaming project @dbzfan4awhile?

Yep, and trying to make the code as simple as can be.

I learn from yOur post.

Thanks so much. I appreciate the feedback!

This post has received a 4.86 % upvote from @getboost thanks to: @dbzfan4awhile.

You got a 9.30% upvote from @bearwards courtesy of @dbzfan4awhile!

@resteem.bot
Resteemed to over 10800 followers and 100% upvoted. Thank you for using my service!

Send 0.200 Steem or 0.200 Steem Dollar and the URL in the memo to use the bot.
Read here how the bot from Berlin works.

We are happy to be part of the APPICS bounty program. APPICS is a new social community based on Steem. The presale was sold in 26 minutes. The ICO will start soon. You can get a account over our invite link: https://ico.appics.com/login?referral=1fRdrJIW

@resteem.bot

DQmSxhCU6hn88Pm21KL88hdscDEyYbALofjap57LYyuybkU.gif

I do think I'm rather amusing... but that might just be me.

yes , i think.

Good deal.