SDL, the Simple DirectMedia Layer, is the cross-platform game library used in everything from small indie games to Valve’s blockbuster triple-A games to other applications with rich media needs. This seminar will teach you how to use this powerful C library to write your own 2D games. We will talk about the structure of game code and cover the installation and initialization of the SDL library, the creation and management of the game window, how to draw images onto the window, and how to handle keyboard and mouse input. By the end of the seminar you will have created a small demo that you can later build on as much as you want.
Nguồn: https://mensagensdamanha.com/
Xem thêm bài viết khác: https://mensagensdamanha.com/game/
Xem thêm Bài Viết:
- Hướng dẫn chơi game bắn cá nạp thẻ bit tại nhà cái Dabet
- FAKER HARD CARRY WITH TRISTANA MID! – SKT T1 Faker Plays Tristana vs Pantheon Mid! | Faker KR SoloQ
- Forza Horizon 3 | Recreating 2 Fast 2 Furious
- Jaws Unleashed – PS2 Gameplay Playthrough 1080p Part 1
- GameCube Intro (Hip-Hop Remix) – GHETTO CUBE // I am Jemboy
sudo apt install mono-devel
sudo apt install mflag
linux
Thanks, man! Really really helpful introduction to SDL!
can you write a game using allegro library in c can you heelp men thanks
If you're on macOS and your window doesn't seem to be popping up (as it was not for me), it's because you need to poll for events. It seems that on the creation of the window there are a few events that are queued before the window appear event. So try something like this:
SDL_Event event;
bool isRunning = true;
while (isRunning) {
while (SDL_PollEvent(&event)) {
if (event.type == SDL_QUIT) {
isRunning = false;
}
}
}
instead of using the delay method. Hope this helps!
Please note that your makefile is not portable as it requires GNU make. Also the include convention is SDL.h not SDL/SDL.h.
This is for when C++ just doesn't bring enough tears and pain
damn lm about to watch this video.
what l was doing all this years?
I spend some time looking for lerning materal for game development wit C. I did not find annything useful. If i found something SDL based it was about C++ and not C. So is it just my personal preference which language i choose at the énd ? what are the benefits of using pure C insead of C++ with SDL ?
cs5 does it again. thank you guys so much for everything
great presentation mate, nice intro this crazy hell
There's no libsdl2-dbg package in Ubuntu anymore.
When I run this it just says not responding and the window never appears, there is no error though, and it waits 5 seconds and then quits. (I am on mac)
I appreciate the tutorial, but why the hell linux? Why not default to Windows?
and how configure SDL to Visual Studio 2010?
My PC runs linux. PC is not another word for Windows.
thanks man its really helpful 😍❤❤
Hello,thank your video,where tutorial code that download them?
https://manual.cs50.net/appliance/2015/
this link can't open and download.
Most SDL demo video I find on the youtube is C++ in Windows, and thank you for making a demo in C and Linux.
I am bachelor 1st year student and i wanna learn c to the fullest
Idk the codes how can i learn the graphics code and other code.
Is there any book.?
Please help me anyone😕
But where is the game dude?
I have an example. This rpg has been made with allegro and sdl.
You can switch between them.
https://www.youtube.com/watch?v=nuLi_lB6c4Y
You were wrong about Unions. They are made to store only one of the specified types of data, and they output only one and the most recently added data. They don't store 'the largest data' in it, as you said.
Thank you, Dr. Chase, that was very helpful.
Don't we have cs50 appliance available to download anymore??
Awesome presentation! I am new to SDL 2 programming and loved it. Thank you!
huhu Im vietnamese I don stan enythink
Loved this video
Спасибо большое за видео! мы изучаем эту библиотеку в университете, но преподаватели не очень хорошо нам её объясняют. Мы даже не догадывались, что есть официальный сайт с подробным описанием каждой функции.
So I'm planning to make a small platformer for my Data Structure class, this tutorial helped me A LOT to understand and begin the development.
Next step, reading the documentation!
CXXXXXX
Is this useful for windows compiles?
Excellent tutorial! Gonna give it a bash now:)
Hey thanks guy. I've been using lazy foo's tutorial to get farmiliar with sdl, but I think I'll start using the wiki now.
Excellent!
awesome
Thank you mit
This has rendered great help and allowed me to surface above a lot of troubles, thank you. Deserves better applause at the end.
I was wondering if anybody has difficulties installing libsdl2-dbg. For some reason it doesn't find the package on ubuntu 17.04 zesty. When I add a different source it does find the package but shows me: The following packages have unmet dependencies:
libsdl2-dbg : Depends: libsdl2-2.0-0 (= 2.0.2+dfsg1-3ubuntu1.1) but 2.0.5+dfsg1-2ubuntu3 is to be installed
Any advise on how to solve this?
Thanks in advance 🙂
I am running:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 17.04
Release: 17.04
Codename: zesty
Undefined reference to SDL_INIT . why? I installed sdl just like in the tutorial?
Why doesn t this work for meeee T-T
when I try to run the make file I get this error :
clang : not found
recipe for target (blabla) failed
how to dwonload this
Please help me, I am stuck at when I type make. It came up with this: make: * No rule to make target 'hello_window.o', needed by 'game'. Stop.
That's an awesome introduction but I still have a small problem https://github.com/tlively/sdl_seminar.git this link works well but I can't sdl_seminar-master
Awesome