We will use Allegro 5 in the final project.
Administrative
- 12/02 (二) Allegro5 簡介希望在黑客松前大家可以先把 Allegro5 在自己電腦上裝好。
- 12/14 (六) 09:00-20:00 Prof. Yang 黑客松 (占總成績 2%)
- 12/15 (日) 09:00-20:00 Prof. Hu 黑客松 (占總成績 2%)
- 01/13 (一) Demo, 詳情一週前會公布 (占總成績 13%)
Tasks: tasks, task video
The Allegro Guide General » Windows » Dev-C 5 » Using Allegro I. Creating a Project. Using Allegro with Dev-C is simple once you get the workspace configured. For most applications, you will want to use a 'Windows Application' and link against the optimized library. We are assuming you already have Allegro already installed for MinGW32. Apr 22, 2013 Dev-C development packages provide C/C programmers using the Dev-C IDE with an ease of installation for various useful libraries and tools.!!!!! The currently only active admins are mol1111 and laserlight, please do not contact other listed ad.
Generic keyboard mapping traktor pro. PPT: allegro5_tutorial.pdf
Installation
Follow the steps here.
- Windows
- Code::Blocks: Video
- Dev-C++: Video
- Visual Studio: Video
- Mac OS
- XCode: Video
Useful Links
- Official Site
- Documentations
- GitHub repo
Tutorials
FAQ
Final Project
Dev C 5.11 Install
- If you want to use GIF images, you can download the plugin algif.It can be used like videos after putting the library under your project folder.
- If you play multiple BGMs or sound effects at the same time, the
al_play_sample
could fail.You can either:- Set
RESERVED_SAMPLES
to a higher value. - Don't abort if
al_play_sample
fails.
- Set
- Unable to find resources when open the executable file located in
..bin
directly.You can copy all used resources to the..bin
folder, since the executable file searches for the resources file located in the same folder. - Error message:
assertion failed .. bitmap_draw..
A high chance is that you didn't initialize one of your image file before drawing it. e.g.The full error message: al_load_bitmap
,load_resized_bitmap
keeps failing, but I've done nothing wrong.Some image files you downloaded from the internet might be in the incorrect format. You can open it in PhotoShop, GIMP, Paint.NET, .. and re-save it as*.png
or any format you want. This problem occurs sometime if you are using Chrome, but it doesn't occur if you use Firefox.For example: You can try to save this image: http://img1.3png.com/340af8a9dd2e666738f797b6573a963e1e8f.png. Although it says it's aPNG
file, but it's actually aJPEG
file. If you don't believe it, you can open it in Notepad, Notepad++, .. You'll see theJFIF
at the beginning lines, if it's aPNG
file, you should seeNG
.- Task 1, 2, 3 are independent, you can test the game behavior after finishing each part.
- If your game lags (drop frames), you can comment out the line below:
- If your game loading time is very long, it is caused by the large music files. You can change the file to other audio, or simply disable (don't load) background music.
Space
key cannot be detected.You should change your input fromChinese
toEnglish
, otherwise the keycode will be different.
Installation on Windows
- Speed up button response traktor pro 2 free.
fopen is not safe ..
in Visual StudioDownload template again, or add#define _CRT_SECURE_NO_DEPRECATE
at the top of your file. - Visual Studio cannot compileWhen setting the configuration of Allegro5 plugins, make sure to set in
All Configurations
andAll Platforms
. - File
allegro-5.0.10-monolith-mt-debug.dll
is missing in Code::BlocksFind the fileallegro/bin/allegro-5.0.10-monolith-mt-debug.dll
located inside the unzipped library folder.Copy it to your project folder underbinDebug
. If these folders don't exist, you can create them by yourself, or simply compile and run the code, your IDE will create them for you. task_2_ans.c
compile error in Code::Blocks.Changeto- Header not found using the new version Allegro5.2 in Dev-C++
fatal error: allegro5/allegro.h: No such file or directory
The include and library paths assume that you have extracted the library using the built-inExtract All..
, and put it into the C drive.A way to check if you had put them in the correct path is to see if the include path really exists in the file system. - Cannot find resource files (when running task_2_ans.c)You should drag your files (pirulen.ttf, 32largebugs.jpg) into your project folder (same folder as your
main.c
ortask_n_ans.c
). - Redefinition of ..You need to keep only one
main
function in one project, for example you may have bothtask_1_ans.c
andtask_2_ans.c
in your project. You should only keep one.Or you might accidentally edit the Allgero5 library header, re-installing the library may help. - When reopen the project, all settings are gone.For Code::Blocks you should open the
*.cbp
file.For Dev-C++ you should open the*.dev
file. If all files disappear, useProject > Add To Project..
and select all files. - On Code::Blocks Release mode:
The Application was Unable to Start Correctly (0xc000007b)
You should copy bothallegro_monolith-5.2.dll
andallegro-5.2.dll
to your/Release
folder. - I want to hide the console window.For Code::Blocks:Set the build target type to
GUI application
.For other IDEs there are also such settings.
Dev C++ 5.12
Installation on Mac OS
- There are OpenGL related bugs in newer version of XCode make sure to use XCode versions prior or equal to 10.3.Or you can use a custom Makefile.
- Command not found - brewWhen installing homebrew, it'll ask you to press
Return
to continue, you must pressEnter
and type your password to continue installing.If you press any other keys, it'll abort the installation process. - Password are not read by terminalThe password you type won't be shown on the terminal (it won't have something like
****
). You can just type your password and pressEnter
. - Cannot find resource files (when running
task_2_ans.c
)You should drag your files (pirulen.ttf
,32largebugs.jpg
) into your project. - Redefinition of ..You need to keep only one
main
function in one project, for example you may have bothtask_1_ans.c
andtask_2_ans.c
in your project. You should only keep one.Or you might accidentally edit the Allgero5 library header (e.g.fmaths.inl
), re-installing the library using the command below may help.