that's pretty spiffy, i love your tutorials. Is it a good idea to try to limit the logic loop too? As to avoid eating a lot of cycles, I mean. Could i have the game calculate the logic 100 times per second and no more, for instance? That would be nice, right?
These tutorials are great! I have learned so many nifty tricks so far :) Just curious, are you planning on completing this tutorial sometime in the future? Thanks.
@LusikkaMage ok i'm confused, so in the counter loop I have character.update which gets the input and I have character.draw in the counter loop which blits the character to the buffer. Outside this loop but still in the game loop I have the buffer blitted to the screen. When I run the game, problems occur.
1. the walking animation is way too fast, how do I slow it down.
The inner loop is essentially for getting input, as it might happen more than once per cycle. You only want to draw once per cycle, so you won't put it inside the loop.
question, when I run that code, i get an error:
Unhandled exception at 0x100dabf5 in (name of game i'm making): 0xC0000005 Access violation reading location at 0x00000098.
what do I do.
askmiller 3 months ago
Your tutorials are fabulous! Thank you!
BrianH20092 5 months ago
When i build it i get this error c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\libmingw32.a(main.o):main.c|| undefined reference to `WinMain@16'|
||=== Build finished: 1 errors, 0 warnings ===|
i dont know what the problem is ? btw im using code::blocks
Xaloez 9 months ago
@Xaloez Do you have END_OF_MAIN(); immediately after the main function block?
LusikkaMage 9 months ago
Great video, I thought when I read the title, that you refered FPS as First Person-Shooter.HAHAHA!
ddhhT 1 year ago
that's pretty spiffy, i love your tutorials. Is it a good idea to try to limit the logic loop too? As to avoid eating a lot of cycles, I mean. Could i have the game calculate the logic 100 times per second and no more, for instance? That would be nice, right?
stereo123 2 years ago
These tutorials are great! I have learned so many nifty tricks so far :) Just curious, are you planning on completing this tutorial sometime in the future? Thanks.
ffantasy36 2 years ago
Oh wow, disregard my comment :p I just looked on your channel and website and found the rest of the videos :D Thanks anyway.
ffantasy36 2 years ago
I have two questions, in the loomsoft tutorial, they used "END_OF_FUNCTION(incCTL), don't we need that. and why do we decrease the variable?
AlliedSamurais 2 years ago
Ahh, I looked it up. You need it for a function that's been LOCKed by a timer, but doesn't seem necessary for anything else.
LusikkaMage 2 years ago
@LusikkaMage ok i'm confused, so in the counter loop I have character.update which gets the input and I have character.draw in the counter loop which blits the character to the buffer. Outside this loop but still in the game loop I have the buffer blitted to the screen. When I run the game, problems occur.
1. the walking animation is way too fast, how do I slow it down.
2. the character flashes..
what do I do?
askmiller 3 months ago
Lusikka, great job on some awesome video tutorials.
JeTSpice 2 years ago
Thank ye!
LusikkaMage 2 years ago
oh holy cow!
Great Tutorials :)
DATAFRAMEC 2 years ago
Thanks! Sorry for late response :P
LusikkaMage 2 years ago
@LusikkaMage Quick Question. Why should the draw to the screen stuff be outside the second while loop?
why can't you put it inside the second while loop and then clear the buffer in the first while loop?
so basically like this
while (!done) {
while (counter > 0) {
/// update
blit (Buffer, screen , 0 , 0, 0, 0, 640, 480);
}
clear_bitmap (Buffer);
}
CodingMadeEasy 1 year ago
@CodingMadeEasy
The inner loop is essentially for getting input, as it might happen more than once per cycle. You only want to draw once per cycle, so you won't put it inside the loop.
LusikkaMage 1 year ago
This has been flagged as spam show
@LusikkaMage Thanks for the reply. I figured that out shortly after I asked the question :p.
I make similar tutorials to you on my channel so it'd be great if you could check out my channel :D
CodingMadeEasy 1 year ago
Question: When decrementing the counter, could you also just use
counter--;
instead?
wehavemagnums 2 years ago 2
Yeah of course. I just did -= 1 because the font would make -- look like one -.
LusikkaMage 2 years ago
Ah, I see. Thanks. I just wondered if there was another reason. I'm pretty new to C++.
wehavemagnums 2 years ago
Really helpfull, thanks :)
hebronsawyers 2 years ago
LusikkaMage for President of Earth 2012.
wehavemagnums 2 years ago
This has been flagged as spam show
Dear LusikkaMage
Loved it!
If you subscribe to : savewithfun
message me after and I will subscribe you!
P.S. He is starting something awesome, I am just spreading the word!
Also, if you rate + comment his vid, I will also rate, favorite, and comment on your vids~
Thanks
tuyir23coolio 2 years ago
I can't wait for you to get the SDL one past here, I kinda jumped ahead and got sound and FPS done, but can't be bothered moving on for now :p
GP4Vid 2 years ago
Haha I saw the title and instantly thought of First Person Shooter... Me so silly D:
MegaGWolf 2 years ago
First!!!!!!!!111!one
LusikkaMage 2 years ago
pwned. I'm bewoe wuu nowwuh!
HomocidalCanineK9 2 years ago