Skip to content

info-uaic/IP_2015-2016_Mario_1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mario 1

####Faculty of Computer Science, "Alexandru Ioan Cuza" University

University year: 2015-2016

Author: Chiriac Dorin Virgiliu

Course: Introduction to programming


This projects was built for the Introduction in programming course. The purpose of the project was to prove the understanding of basic programming concepts in the C++ language.


A few words from the author

Hi! Here's Virgiliu, the creator of this project. You have on your hands one of my favourite work in which I invested time, energy and passion, so respect it. I hope you'll find the information presented here useful for your future projects.

Firstly, you can open this project and start playing it. I recommend you to open it with Code::Blocks, because this project was conceived on this platform and there are highly chances for it to work properly on your machine too. If you are a rebel and still want to use Visual Studio, after reading my hardtrying persuasive comments, don't forget to add this libary at the begining of the project: #include "stdafx.h".

Why I want you to do so? Just because I care about your time and I don't want you to read something that you have no clue about. So stop here, play my game and than come back.

Good. Now that you're back, or if you are still reading, whatever, I've stopped caring, let's begin with why I loved this project. Simply because it was a challenge for me to create Mario in ASCII. Ofcource I could work with a graphic library and so on, but where were the fun? Trying to surpass the limits and bringing the inovation, well, "asta inseamna sa fii inginer".

The map--firstly, I drew sqares, a[4][8], for: Mario, coins, mashroom, and so on. Than, I built the map as a puzzle. How I drew those sqares? With extended ascii, using these codes: 176,177,178.

How I printed everything? With the help of a good firend of mine who told me to use printf() for a single string instead of "cout<<" for one character, because this is how you speed a lot your game...when I say a lot, I mean a lot!! Use printf(). Instead of "cout<<(char)178;" use "string[counter++]=(char)178;" This is how you speed things, by using only one printf().

Phisics - how I made the Mario to jump, well, that's MAGIC!! ... check the code, it's too much to explain. Let's say just that I refresh the map at every 30ms and I update the possition of every moving object by deleting it's previous position and drewing it again on the new position. The same applyis for all moving objects.

Have any further questions? USE GOOGLE! Like all of us. You can bother a human being on a certain matter only after you've spent a lot of time searching the internet for an answare. The best advise I can give to you, try to look like you've searched the internet for ages and you did't find the answare, when you actually watched videos with kitties on youtube.

This one is my favourite: https://www.youtube.com/watch?v=Q34z5dCmC4M Of course I found this video while I was "working" for this project.


Good luck!

Releases

No releases published

Packages

No packages published

Languages