y'know what,i've been watching your videos,and you are the only one worth watching,i've been trying to search a video like this the whole day!!thank you!!
@TheExplodingPumpkin No. The tutorials are separated for that reason; Allegro and SDL will do essentially the same thing for you (that is, graphics, input, sound, etc.) so you choose one and follow either the "A" videos (for Allegro) or "B" videos (for SDL)
@LusikkaMage But... how do I load a PNG format file?
I've been trying to find a specific or more generalized image loader function, but could only find the loadBMP one (looking at the docs that comes with SDL)
@GT101boy The tutorial covers both Allegro and SDL. The videos like "4-A" will cover Allegro, and "4-B" cover SFML. They won't quite go in order with the playlist.
hey does anyone have a code i could look at to get this sdl stuff i just wanna set a background image and display some other images but i cant find anycodes to look at just to get the jist of it. so if anyone has anything i could take a look at to learn from id like it very much thx : )
I don't think it's possible to directly access the screen; at least I haven't seen it.
The thing is, with LazyFoo's tutorial, he calls the surface "screen", and I call that same thing "buffer", so that might be throwing peoples off.
It turns out, when you use the function SDL_SetVideoMode on buffer (or "screen"), it will automatically free that for us when we call SDL_Quit(), so we don't have to free it ourselves.
My mistake for not reading thoroughly long ago. D:
y'know what,i've been watching your videos,and you are the only one worth watching,i've been trying to search a video like this the whole day!!thank you!!
dragonhuv 3 months ago
Do you have to use C++?
Cant you use visual C# express, SDL or Allegro?
If i'm used to C# do i have to learn C++ instead!??
Ark4evah 6 months ago
@Ark4evah You can use C# and XNA instead
CoderRach 6 months ago
@CoderRach Thanks!
Ark4evah 6 months ago
Okay, noob question lol.
Will a need both C++, Allegro and SDL?
TheExplodingPumpkin 7 months ago
@TheExplodingPumpkin No. The tutorials are separated for that reason; Allegro and SDL will do essentially the same thing for you (that is, graphics, input, sound, etc.) so you choose one and follow either the "A" videos (for Allegro) or "B" videos (for SDL)
LusikkaMage 7 months ago
how do i slow down my animation without decreasing my frames per second?
Deeharok 8 months ago in playlist Beginner's/Game Programming 1
@Deeharok dont worry i worked it out gosh im dumb >.<
Deeharok 8 months ago in playlist Beginner's/Game Programming 1
@Deeharok Your function for IncrementFrames(), since your frame is a float, just increment it by a lower number; 0.05 instead of 0.1 or whatever.
LusikkaMage 8 months ago
@LusikkaMage Is it possible to use other types of image that are not BMP format?
satomassao 8 months ago
@satomassao Possible and recommended. You'll want to use PNGs for your sprites.
Same with audio, you won't want to use .wav, .ogg is probably a better idea.
LusikkaMage 8 months ago
@LusikkaMage But... how do I load a PNG format file?
I've been trying to find a specific or more generalized image loader function, but could only find the loadBMP one (looking at the docs that comes with SDL)
satomassao 8 months ago
@satomassao Check out LazyFoo dot com, he has a guide on installing SDL_Image extended library
LusikkaMage 8 months ago
what ever happened to using allegro?
GT101boy 9 months ago
@GT101boy The tutorial covers both Allegro and SDL. The videos like "4-A" will cover Allegro, and "4-B" cover SFML. They won't quite go in order with the playlist.
LusikkaMage 8 months ago
@LusikkaMage oh, ok, thank you!
GT101boy 8 months ago
wow now i know when something doesn't have a texture in valve games they appear as that pink color
PurexOvvnage 10 months ago
What's an Uint32? Half year of c++ and never heard of that.
Exdozolie 1 year ago
@Exdozolie Unsigned INTeger 32-bit
nameguy101 11 months ago
I'm using dev c++, and i cannont get it to compile unless i use the code SDL_LoadBMP for some reason.
TheWhatsNextChannel 1 year ago
God this is confusing :(
Soap360 1 year ago
Drink some water or something... It sounds like you're struggling to get words out of your mouth.
TyKtv 1 year ago
LoadBMP didn't work on mine, it said that LoadBMP is undeclared, but when I used SDL_LoadBMP it did work.
YouKondziu 1 year ago
hey does anyone have a code i could look at to get this sdl stuff i just wanna set a background image and display some other images but i cant find anycodes to look at just to get the jist of it. so if anyone has anything i could take a look at to learn from id like it very much thx : )
pkrollp 2 years ago
great tutorial. ;-)
capncrucial12345 2 years ago
doesn't SDL_Quit destroy the buffer (screen) ?
XianForce 2 years ago
nope, it quits sdl.
snasebrase 2 years ago
Well yeah, obviously. Reason I thought that is cause of:
"You may be asking yourself "why aren't we freeing the screen surface?". Don't worry. SDL_Quit() will take care of that for us. "
Direct quote from Lazyfoo's tutorials.
XianForce 2 years ago 8
oh, i didnt know that, lol.
thanks hehe
snasebrase 2 years ago
That's what Lazyfoo said, but since LusikkaMage says you need to free it, I'm confused... I'm guessing it wouldn't hurt to free it though?
XianForce 2 years ago
im always freeing all the surfaces im creating.
snasebrase 2 years ago
Lusikka said to free to the BUFFER, not the screen bitmap.
DeltaFolee2 2 years ago
Two things... since when was the buffer a bitmap? Secondly, the Buffer IS the screen in her tutorials?
XianForce 2 years ago
Now don't get into a fight you two. ^^;
LusikkaMage 2 years ago
I don't think it's possible to directly access the screen; at least I haven't seen it.
The thing is, with LazyFoo's tutorial, he calls the surface "screen", and I call that same thing "buffer", so that might be throwing peoples off.
It turns out, when you use the function SDL_SetVideoMode on buffer (or "screen"), it will automatically free that for us when we call SDL_Quit(), so we don't have to free it ourselves.
My mistake for not reading thoroughly long ago. D:
LusikkaMage 2 years ago
Its okay, your still pwnage epicness =D
XianForce 2 years ago
great tut , that was very easy to understand and it cleared some things up that i didnt understand , keep em comin!!!
rooski8 2 years ago
Wow Lusikka.. EXCELLENT tutorials!!
dandymcgee 2 years ago 12
man everyone and their brother are throwin out videos faster than I can keep up! 5*s though :)
eatcomics 2 years ago
Thank you :)
lightsabermaster0 2 years ago
nice work 5*
mikesherps 2 years ago