Journal

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Journal

Post by Zedtho » June 18th, 2017, 6:42 am

oh, the image is too wide

edit: got it to work! Will add other images now too
edit 2: Why is there a delete button next to this message, but not next to others?

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

Re: Journal

Post by albinopapa » June 18th, 2017, 9:41 am

Once your post has be superceded by other posts, you can't delete them. Admin and moderators can though.
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

ceofil
Posts: 39
Joined: April 13th, 2017, 8:35 pm

Re: Journal

Post by ceofil » June 24th, 2017, 7:13 am

Salta looks cool mate. You could make doodle jump out of that.

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Journal

Post by Zedtho » June 24th, 2017, 4:42 pm

Thanks! I've been working on Simon Says a bit more. Im having a lot of problems with timing and a lot of errors too. Frustrated.

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Journal

Post by Zedtho » July 2nd, 2017, 6:47 am

I got the timing to work. The only problem now is that it won't take input. I'll try different types of input, but I think it's another logic error because I'm a derp :P.

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

Re: Journal

Post by chili » July 8th, 2017, 7:13 am

Did you end up fixing to work with state variables across frames, or are you still doing timing loops within a single frame? :D
Chili

User avatar
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Journal

Post by Zedtho » July 8th, 2017, 6:34 pm

I'm currently using the former, the latter didnt work well and made the program unresponsive.
Do you mean boolean values by state variables?

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

Re: Journal

Post by albinopapa » July 8th, 2017, 6:41 pm

booleans are but one way to handle state, and depending on how defined a state is, a switch statement using enums would be a better fit, at least at the level you are at. You can also make state classes, where each defined state is it's own class.
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
Zedtho
Posts: 189
Joined: February 14th, 2017, 7:32 pm

Re: Journal

Post by Zedtho » July 9th, 2017, 8:16 am

I haven't actually had enums yet as far as I know, atleast Im not that far yet in the tutorial. Enums do seem like the perfect way for handling the different squares, thanks for the answer :D

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

Re: Journal

Post by chili » July 11th, 2017, 3:22 am

Yup, enums are the right fit. If there are only 2 possible states I often go for bool. You can also make a custom class or a class heirarchy for your states, and that will allow to do you some cool bullshit, but usually it's gonna be unwarranted overkill that will just make your code worse overall by overcomplicating it.

Just don't make your states int and we're cool (float is fine though :kappa:)
Chili

Post Reply