• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
ZeroRadius

Allegro installation?

14 posts in this topic

Hey guys and gals,

I am new to game programming (actually any type of desktop programming, I usually do web development with LAMP/WAMP). I am trying to start learning game development using C++. I found a few good tutorial series and they all use Allegro game library. I have never used a library in this type of environment before and I am having some problems. First I was going to try to use Visual C++ 2008 but every mention I found on allegro said to download it from allegro5.org , I can not however find a place to download it from that site, nor can I find another place to download it (at least not one that my antivirus did not flag on download)

So next I installed Code Blocks 10.5 and followed the following instructions to try and install Allegro: [url="http://wiki.allegro.cc/index.php?title=Code::Blocks"]http://wiki.allegro....le=Code::Blocks[/url]

I am having some problems with it thou. When I run these comands:
[quote]
> FIX.BAT mingw
> MINGW32-MAKE.EXE
> MINGW32-MAKE.EXE DEBUGMODE=1
> MINGW32-MAKE.EXE install
> MINGW32-MAKE.EXE install DEBUGMODE=1
[/quote]

I can run >fix.bat mingw
everything else seems to fail (or maybe i don't know what success looks like? Check the attachment to see what I got when I ran these commands.

Can someone help me please? I would prefer to use MSVC 2008 sense I eventually want to make win 8 metro games using MSVS 2012 but when it comes down to it, right now I am just trying to learn, I do not care what IDE I use as long as I can get Allegro working. I am about to head off for the graveyard shift but I am off tomorrow and hopefully can make some headway with this


Thanks in advanced
~ Zero

P.S : If this is in the wrong section I apologies, it just seemed like a beginner question Edited by ZeroRadius
0

Share this post


Link to post
Share on other sites
If you don't care the IDE, getting it running in Visual Studio 2010 is easy. Same with 2012.

1. Download it: http://alleg.sourceforge.net/download.html

2. Save it to the c: drive

3. Follow these steps: http://wiki.allegro.cc/index.php?title=Windows,_Visual_Studio_2010_and_Allegro_5

4. Here's a video walkthrough/tutorial series, from installation to setup to coding your first game: http://fixbyproximity.com/2d-game-development-course/

5. Have fun
2

Share this post


Link to post
Share on other sites
ZeroRadius: You are following a guide for installing Allegro 4, not Allegro 5. The easiest solution is to just follow the guide that Shaquil linked to. If you are still having difficulties, the best place to get help for Allegro is at [url="http://www.allegro.cc/forums"]Allegro.cc[/url]
2

Share this post


Link to post
Share on other sites
Ok thanks guys. It did not work for me. I downloaded express 2010 and followed all the instructions. Re-checked everything about 8 times and it still gives me a fail when I try to build it. Can you look at the screens (attached) and make sure I did everything right? If I did I will go to the allegro.cc and try to get help there.

Thanks in advance.

Note: One set of screens shows the information I put into the Debug Config, one is the information i put in the release config, and the third set is the zip of the file i downloade (so you can see the version) and the directory that I have it in.
0

Share this post


Link to post
Share on other sites
Can you please post the fail message?

If you created an empty project and made a main.cpp which has:


[source]#include <stdio.h>
#include <allegro.h>

int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display = NULL;

if(!al_init()) {
fprintf(stderr, "failed to initialize allegro!\n");
return -1;
}

display = al_create_display(640, 480);
if(!display) {
fprintf(stderr, "failed to create display!\n");
return -1;
}

al_clear_to_color(al_map_rgb(0,0,0));

al_flip_display();

al_rest(10.0);

al_destroy_display(display);

return 0;
}[/source]


Everything should work, but please post your error message along with the full directories for your allegro include and lib folder.
1

Share this post


Link to post
Share on other sites
Of course, Sorry that I forgot to include it to begin with.

[quote]
1>------ Build started: Project: AllegroTest2010, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\zeroradius\documents\visual studio 2010\projects\allegrotest2010\allegrotest2010\main.cpp(2): error C2059: syntax error : '?'
1>c:\users\zeroradius\documents\visual studio 2010\projects\allegrotest2010\allegrotest2010\main.cpp(32): fatal error C1083: Cannot open include file: 'allegro.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/quote]


Edit:

C:\allegro\lib
C:\allegro\include

(I assume that is what you meant by full directories?) Edited by ZeroRadius
0

Share this post


Link to post
Share on other sites
Please copy your main.cpp code.

If you're using the cpp tag option it might not show anything after #include <wont show> for some reason.... You can edit your post and just take the cpp part off, and keep it as source. Edited by Black-Rook
1

Share this post


Link to post
Share on other sites
Ok sorry, I'm going to re-post , that was the wrong error message from where i was trying various things earlier.
Heres the actual error message:
[quote]
1>------ Build started: Project: AllegroTest2010, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\zeroradius\documents\visual studio 2010\projects\allegrotest2010\allegrotest2010\main.cpp(2): fatal error C1083: Cannot open include file: 'allegro5/allegro.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/quote]

heres the source:
[source]#include <stdio.h>
#include <allegro5/allegro.h>

int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display = NULL;

if(!al_init()) {
fprintf(stderr, "failed to initialize allegro!\n");
return -1;
}

display = al_create_display(640, 480);
if(!display) {
fprintf(stderr, "failed to create display!\n");
return -1;
}

al_clear_to_color(al_map_rgb(0,0,0));

al_flip_display();

al_rest(10.0);

al_destroy_display(display);

return 0;
}[/source]

dirs:
C:\allegro\lib
C:\allegro\include Edited by ZeroRadius
0

Share this post


Link to post
Share on other sites
same thing:

[quote]
1>------ Build started: Project: AllegroTest2010, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\zeroradius\documents\visual studio 2010\projects\allegrotest2010\allegrotest2010\main.cpp(2): fatal error C1083: Cannot open include file: 'allegro.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/quote]
0

Share this post


Link to post
Share on other sites
Okay this is the problem, it cannot find allegro.h !

For example, I use: #include <allegro5/allegro.h> because I have my C/C++ General Include set to ->>>> C:\allegro-5.0.5\include

If you go into your include folder, you should see another folder which has your allegro.h file, mine happens to be allegro5.

I just downloaded the 5.0.7 version to check the folder, and it shows the file in allegro5.

Using: #include <allegro5/allegro.h> should work! So you must have set your direct wrong in your settings.

Type your directory address for the file instead. Should show this:
#include "C:\allegro-5.0.5\include\allegro5\allegro.h" (SOMETHING LIKE THIS) and remove: #include <allegro5/allegro.h>
1

Share this post


Link to post
Share on other sites
OMG you are awsome!

That worked ....on the first error. I have another error:

[quote]
1>------ Build started: Project: AllegroTest2010, Configuration: Debug Win32 ------
1> main.cpp
1>c:\allegro\include\allegro5\allegro.h(26): fatal error C1083: Cannot open include file: 'allegro5/base.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/quote]

even thou I knew it would not work I tried to use an include directive for it ....... obviously it did not work.I am going to try googling it, but if anyone knows how to fix it I would appreciate you telling me.

@Black-Rook - Does this website have rep/karma if so how do i give it to you (or is that what the little arrows under your avatar is for?) Thank you so much, I'm glad to make progress on this, I was about to give up.
0

Share this post


Link to post
Share on other sites
Okay what appears to have happened is that you've set your directories incorrectly. Just encase you didn't know, you must also reset your directory for each new project you create in your project settings. I would strongly suggest you make a project already setup with a generic main.cpp file, and just copy and past the whole project so you don't have to setup everything again. However, if you use a new version you will have to redo everything.
1

Share this post


Link to post
Share on other sites
ok, I think I got it. I am no longer getting those errors. I am instead getting

[quote]
1>------ Build started: Project: test1Console, Configuration: Debug Win32 ------
1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/quote]

After a little googling it looks like I have to uninstall my vs 2010 and 2012 along with frameworks 4.0 and 4.5 and then re-install vs 2010 ..... the point is the code that is calling allegro is no longer underlined in red and no longer throwing an error (unless this new error for console apps is just taking precedence). Any way it looks like it will be work for my next day off. This issue was solved. Thanks everyone. Black-rook your a life saver


Edit: Actually I only had to install SP1 for VS 2010 and now it is working!!! I finally get to start my adventure in game programming! Thank you!!! Edited by ZeroRadius
0

Share this post


Link to post
Share on other sites
Yes, the 4.5 framework causes issues sadly. You can try the following though:

Set Generate Manifest to No, or you can disable incremental Linking. Under Project Properties -> Configuration Properties -> Linker (General) -> Enable Incremental Linking -> "No (/INCREMENTAL:NO)".

Hope this helps!

Edit: Yes, SP1 is also an option, sorry I forgot all about it. Edited by Black-Rook
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0