void MyBigPush2018(Knowledge &_current_mind);

The Partridge Family were neither partridges nor a family. Discuss.
willkillson
Posts: 18
Joined: September 3rd, 2017, 7:38 am

void MyBigPush2018(Knowledge &_current_mind);

Post by willkillson » December 31st, 2017, 9:07 am

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.
https://www.twitch.tv/willkillson

Come help me program!

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: void MyBigPush2018(Knowledge &_current_mind);

Post by albinopapa » December 31st, 2017, 9:36 am

Welcome to the forums, and I love the title.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: void MyBigPush2018(Knowledge &_current_mind);

Post by chili » December 31st, 2017, 8:44 pm

Wecome bro, and nice work with the custom putpixel font ;)
Chili

willkillson
Posts: 18
Joined: September 3rd, 2017, 7:38 am

Re: void MyBigPush2018(Knowledge &_current_mind);

Post by willkillson » January 18th, 2018, 4:13 am

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
https://www.twitch.tv/willkillson

Come help me program!

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: void MyBigPush2018(Knowledge &_current_mind);

Post by chili » January 19th, 2018, 1:23 am

Looks like a decent class design. Small issue, but I would use Graphics& instead of Graphics* to maintain reference to the gfx object.
Chili

willkillson
Posts: 18
Joined: September 3rd, 2017, 7:38 am

Re: void MyBigPush2018(Knowledge &_current_mind);

Post by willkillson » January 21st, 2018, 10:24 pm

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&.
https://www.twitch.tv/willkillson

Come help me program!

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: void MyBigPush2018(Knowledge &_current_mind);

Post by chili » January 22nd, 2018, 1:11 am

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).
Chili

willkillson
Posts: 18
Joined: September 3rd, 2017, 7:38 am

Re: void MyBigPush2018(Knowledge &_current_mind);

Post by willkillson » January 24th, 2018, 12:12 am

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.
https://www.twitch.tv/willkillson

Come help me program!

albinopapa
Posts: 4373
Joined: February 28th, 2013, 3:23 am
Location: Oklahoma, United States

Re: void MyBigPush2018(Knowledge &_current_mind);

Post by albinopapa » January 24th, 2018, 12:20 am

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.
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com

willkillson
Posts: 18
Joined: September 3rd, 2017, 7:38 am

Re: void MyBigPush2018(Knowledge &_current_mind);

Post by willkillson » January 24th, 2018, 12:52 am

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
https://www.twitch.tv/willkillson

Come help me program!

Post Reply