Page 1 of 3

void MyBigPush2018(Knowledge &_current_mind);

Posted: December 31st, 2017, 9:07 am
by willkillson
Hey people!

Just got out of the military, and im going to school for computer engineering at ASU. I am trying to increase my skills while doing something fun.

I have taken two programming classes, and during one of them I decided to model TGM gameplay in ASCII. After I completed that, I found chili's videos, and the putpixel calls directly transfered into my game, with minor scaling. I even took a crack at implementing a string to pixel call conversion, but never finished it!

Here is what it looks like,
https://imgur.com/a/BH3fj
(I only have a compiled EXE leftover)

Sadly during this experiment, I didn't know what versioning was, and so I lost the project due to deleting it :(, but my ASCII source material is still present.

If you want to see any projects I've worked on, or am working on here is a link.

https://github.com/willkillson

Currently I am pounding through intermediate videos, trying to learn as much as possible.

Re: void MyBigPush2018(Knowledge &_current_mind);

Posted: December 31st, 2017, 9:36 am
by albinopapa
Welcome to the forums, and I love the title.

Re: void MyBigPush2018(Knowledge &_current_mind);

Posted: December 31st, 2017, 8:44 pm
by chili
Wecome bro, and nice work with the custom putpixel font ;)

Re: void MyBigPush2018(Knowledge &_current_mind);

Posted: January 18th, 2018, 4:13 am
by willkillson
Going back to basics, as there is a lot of information that you are covering that my two c++ classes have not covered. With that being said I am not going to start in intermediate.

Before I start this snake game, I think I am going to want to have a counter.

And so here is my implementation.

It will work from 0 to the max of an unsigned int.

Image

Heres using it to print off the x and y locations of your mouse input (my original plan for using this)
Image


https://github.com/willkillson/SevenSeg ... nSegment.h
https://github.com/willkillson/SevenSeg ... egment.cpp

Re: void MyBigPush2018(Knowledge &_current_mind);

Posted: January 19th, 2018, 1:23 am
by chili
Looks like a decent class design. Small issue, but I would use Graphics& instead of Graphics* to maintain reference to the gfx object.

Re: void MyBigPush2018(Knowledge &_current_mind);

Posted: January 21st, 2018, 10:24 pm
by willkillson
chili wrote:Looks like a decent class design. Small issue, but I would use Graphics& instead of Graphics* to maintain reference to the gfx object.
This recommendation is just a better coding practice right? Because I don't want to be able to re target the Graphics*, so I should use the Graphics&.

Re: void MyBigPush2018(Knowledge &_current_mind);

Posted: January 22nd, 2018, 1:11 am
by chili
Yeah. We generally prefer refs& because they are safer and have nicer syntax. Just one thing: have to be careful with refs& as member vars because they generally cockblock copy construction. Should be fine for this class because it's not something you want to copy (even preferable, because it will alert you of unexpected copies).

Re: void MyBigPush2018(Knowledge &_current_mind);

Posted: January 24th, 2018, 12:12 am
by willkillson
So I am having major problems trying to read your code for the snake game. I have no idea how these segments are following each other. Why do you not comment any of the code?

I think I am going to just throw away everything from the video, and start off on my own. I can see that the segments are not actually in the right positions on the board, but I can't seem to make heads or tails of how things are suppose to work based on your framework.

Re: void MyBigPush2018(Knowledge &_current_mind);

Posted: January 24th, 2018, 12:20 am
by albinopapa
Have you watched the corresponding videos, beginner 14, there's like 3 of them? That is probably why there is little to no comments in code, figured if you are following along on with tutorials, you won't need comments.

Re: void MyBigPush2018(Knowledge &_current_mind);

Posted: January 24th, 2018, 12:52 am
by willkillson
albinopapa wrote:Have you watched the corresponding videos, beginner 14, there's like 3 of them? That is probably why there is little to no comments in code, figured if you are following along on with tutorials, you won't need comments.
Yeah I watched the first two, and I am just going to say its finished. On the next game I am going to just watch, then code on my own. I feel following chili's code verbatim just makes me feel as though I shouldn't modify what he has put out, nor do I completely understand it O.o.

I spent some more time on this after being frustrated, and I added color and a border. I really just want to press on, so I think I am done with it!

https://github.com/willkillson/Snake/tree/master