This post is a portion of Part 5 in my on going series about 2D Game Development using the Allegro 5 library. These posts are in course order. You can see all of the posts in this course by clicking the “2D Game Development” button at the top of this site.
- 5.0 – Our First Game
- 5.1 – Our First Game: The Player
- 5.2 – Our First Game: Timing and Movement
- 5.3 – Our First Game: The Projectiles
- 5.4 – Our First Game: The Enemies
- 5.5 – Our First Game: Collision Detection
- 5.6 – Our First Game: Game Logic
- 5.7 – Our First Game: Conclusion
In this video we go over the framework we will be using. We then add the player object and get it to appear on the screen.
Full source can be found here.
Great and very educational video, I like it very much, find it easy to follow and understand things. Also, not involving OOP with these lessons is a great idea because I’m a c programmer, and I’m pretty sure there are other C programmers too who wouldn’t like to mess with classes.
Grreat tutorials sir! These are really helpful to get me going. A couple of things to note with this particular video as it is built in C++ for all the XCode 4/ Allegro 5 users out there:
int main argument needs to be
int main(int argc, char **argv)
…in order to NOT get the _al_mangled_main errors. Also, if you copy and paste the source code from this page, the #include statements have the wrong slash. They should be:
#include
NOT
#include
…I have a feeling that was maybe a cute joke by the author 😉
Anyways, thanks again for these! You’re being very thorough with all of this.
Mark
Thanks. Yes, sometimes the IDE specific variables get missed by me. I will make sure future videos are more universal
hi mike i have been enjoying your? videos for awhile now and i am having a slight problem, when i create the header file objects.h and include it i get a bug error saying “Cannot open include file: ‘objects.h’: No such file or directory” can you help me with this?
I’m sorry for bugging you, i copied the source text and pasted it inside a new? source code file and somehow that made it work. Once again sorry for bugging you.
Jacob,
More than likely, you were trying to do #include which won’t work. If the file is local you use #include “objects.h”
VIDEO IS DOWN! ? ! ? please fix this
sorry , i reloaded 3 times and it mysteriously started working
I have a simple question. Why did you clear the screen after you flip display ? I think It should be done DrawShip();
Go ahead and remove it and see. Hopefully after doing that it becomes more apparent as to why we clear it. Let me know what you think.
Yo Mike,
Your Tut’s really holy dude..
Hope you keep up the good work! 🙂
everything in my code is right ive even re typed it twice but i keep getting up to date (1) instead of succeeded and it will not launch can you help?
Any idea how do i got this by folowing your tutorial?
‘Chosen of Emblem.exe’: Loaded ‘C:Documents and SettingsJaMoje dokumentyVisual Studio 2010ProjectsChosen of EmblemDebugChosen of Emblem.exe’, Symbols loaded.
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32ntdll.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32kernel32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32allegro-5.0.7-monolith-md-debug.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32psapi.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32ole32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32advapi32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32rpcrt4.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32secur32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32gdi32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32user32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32msvcrt.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32shlwapi.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32winmm.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32shell32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSWinSxSx86_Microsoft.Windows.GdiPlus_6595b64144ccf1df_1.0.6002.22791_x-ww_c8dff154GdiPlus.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32comdlg32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32comctl32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32opengl32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32glu32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32ddraw.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32dciman32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32msvcr100d.dll’, Symbols loaded.
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32imm32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSWinSxSx86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202comctl32.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32d3d9.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32d3d8thk.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32version.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32uxtheme.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32msctf.dll’, Cannot find or open the PDB file
‘Chosen of Emblem.exe’: Loaded ‘C:WINDOWSsystem32msctfime.ime’, Cannot find or open the PDB file
The thread ‘Win32 Thread’ (0x1a4) has exited with code -1073741510 (0xc000013a).
The thread ‘Win32 Thread’ (0xffc) has exited with code -1073741510 (0xc000013a).
The program ‘[808] Chosen of Emblem.exe: Native’ has exited with code 0 (0x0).
i have problem with error fatal error C1083: Cannot open include file: ‘objects.h’: No such file or directory.how i fix it ?
hello. i get these errors and i don`t know why:
1>—— Build started: Project: First Game, Configuration: Debug Win32 ——
1>Build started 22.10.2013 15:36:35.
1>InitializeBuildStatus:
1> Touching “DebugFirst Game.unsuccessfulbuild”.
1>ClCompile:
1> All outputs are up-to-date.
1>Main.obj : error LNK2019: unresolved external symbol __imp__al_destroy_display referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__al_clear_to_color referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__al_map_rgb referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__al_flip_display referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__al_init_primitives_addon referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__al_create_display referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__al_install_system referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__al_draw_filled_triangle referenced in function “void __cdecl DrawShip(struct SpaceShip &)” (?DrawShip@@YAXAAUSpaceShip@@@Z)
1>Main.obj : error LNK2019: unresolved external symbol __imp__al_draw_filled_rectangle referenced in function “void __cdecl DrawShip(struct SpaceShip &)” (?DrawShip@@YAXAAUSpaceShip@@@Z)
1>C:UsersLucianDesktopFirst gameFirst GameDebugFirst Game.exe : fatal error LNK1120: 9 unresolved externals
1>
1>Build FAILED.
1>
never mind found the problem
Can you tell me what you did to solve this? I cant see the issue with my code…