Search found 15 matches
- May 24th, 2018, 2:12 am
- Forum: Everything
- Topic: Key press release
- Replies: 11
- Views: 4296
Re: Key press release
Wow guys thanks for all your input. Super helpful. I guess it might have helped if i was telling what i was using it for. I'm just trying to make a my character jump. I had already tried the approach of the bool before i posted here and it wasn't working for me. when space is pressed my character wo...
- May 21st, 2018, 4:13 am
- Forum: Everything
- Topic: Key press release
- Replies: 11
- Views: 4296
Key press release
Hi guys,
I was wondering if there was an easy way to to uses if (wnd.kbd.KeyIsPressed(VK_SPACE)) to only register one key press even if the key is held down. is anything built into the framework or is there a simple why can tell it to act as such?
thanks
I was wondering if there was an easy way to to uses if (wnd.kbd.KeyIsPressed(VK_SPACE)) to only register one key press even if the key is held down. is anything built into the framework or is there a simple why can tell it to act as such?
thanks
- April 21st, 2018, 5:20 pm
- Forum: Everything
- Topic: Snek function and the brd object
- Replies: 1
- Views: 1278
Snek function and the brd object
So, I know that the answer to this question is probably large in scope but I'm not sure exactly what to be asking. So here it is. void Snake::Draw(Board & brd) { for (int i = 0; i < nSegments; ++i) { segments[i].Draw(brd); } } In the line " segments .Draw(brd); " what exactly is brd doing. What I'm ...
- April 18th, 2018, 4:01 pm
- Forum: Everything
- Topic: Using variables between classes and constexpr
- Replies: 9
- Views: 2624
Re: Using variables between classes and constexpr
Thanks a million guys i think i understand the :: and static a lot more now, which was something i was struggling with. as far as the x and y goes, i had no real reason for them to be seprate from the x corner and yCorner, they just happen to land that way after i had tried many different things. @a...
- April 17th, 2018, 3:41 pm
- Forum: Everything
- Topic: Using variables between classes and constexpr
- Replies: 9
- Views: 2624
Using variables between classes and constexpr
hey all, Just hoping someone can help me get a better handle on static constexpr. While working through the snek game in tutorial 14 I wanted to set it up so the board is always centred on the screen no matter the size of the window. To do this I needed to first get the screen width and height from ...
- April 4th, 2018, 5:41 pm
- Forum: Everything
- Topic: Life meter out of control
- Replies: 5
- Views: 1814
Re: Life meter out of control
Dude! You make it look so easy.
I figured it would be something simple but i'd been pulling my hair out for hours.
I see why this works though, so thanks a mill.
I figured it would be something simple but i'd been pulling my hair out for hours.
I see why this works though, so thanks a mill.
- April 3rd, 2018, 5:21 pm
- Forum: Everything
- Topic: Life meter out of control
- Replies: 5
- Views: 1814
Life meter out of control
Hey dudes, I've built my own version of the poo game using some zelda graphics and now I'm trying to implement a health meter. problem is if link takes one hit it just starts draining life till it hits 0. I thought at first it was because link was taking damage for every frame that link and the enem...
- April 3rd, 2018, 5:00 pm
- Forum: Everything
- Topic: Beginner CPP Homework 13
- Replies: 5
- Views: 2433
Re: Beginner CPP Homework 13
Thanks for the help guys.
Yeah, looks like I had a circular dependency issue. I seem to have it sorted now.
Cheers!
Yeah, looks like I had a circular dependency issue. I seem to have it sorted now.
Cheers!
- March 23rd, 2018, 12:55 am
- Forum: Everything
- Topic: Beginner CPP Homework 13
- Replies: 5
- Views: 2433
Beginner CPP Homework 13
I've been playing around with the code from tutorial 13 and what i am trying to do is get the meter to work for the poos instead of the goal. I'm trying to add the meter level increase to the ProcessConsumption function so with each poo eaten the meter increases. the first problem was that i couldn'...
- March 18th, 2018, 11:54 pm
- Forum: Everything
- Topic: Passin gin graphics to Draw function Tutorial 11
- Replies: 7
- Views: 2523
Re: Passin gin graphics to Draw function Tutorial 11
Yeah i think that's kind of answering my question. Mainly i did not know that a class object could be passed as an argument in a function. So, i was learning two things at once, references as well as a new type of function parameter. I was having a little trouble separating the two and was wondering...