|
Hellows |
Andre Xavier
Member #16,694
June 2017
|
Hellows, peeps! Its been more than 6 years since I last coded something in C and I totally lost touch with allegro and game programming. Now that I have some time I want to recover this much appreciated hobby and I hope that soon, maybe not as soon as I want, this old man will be coding again. I just have some questions to put myself in the right path: I must be really old but why the installation area reads more than 4K topics but when I click on it just show 4? I really checked the options and changed them to display 100 but still just 4 shows up. Funny thing... What would you recommend me? C or C++? And I would like to say its good to be back! Im surprised with how many small games are in the allegro.cc website and how things have evolved so much! Actually, I feel lost at some things yet... Anyway, thanks all for keeping everything up! I love you all, guys! Xavier. =^.^= |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Welcome, Xavier! Xavier said: I must be really old but why the installation area reads more than 4K topics but when I click on it just show 4? I really checked the options and changed them to display 100 but still just 4 shows up. Funny thing... That's the a.cc forums for you. You have to search the forums or change the display date to see other older threads. Your best bet for information on Allegro is at http://liballeg.org first, and at http://wiki.allegro.cc second. Xavier said: What would you recommend me? C or C++? If you're just getting back into programming, I would recommend C for now, and then move on to C++ when you're comfortable. Pretty much everything you can do in C you can do in C++ as well, but not the other way around. I suggest starting with the Allegro 5 tutorials on the wiki here : https://wiki.allegro.cc/index.php?title=Getting_Started https://wiki.allegro.cc/index.php?title=Allegro_5_API_Tutorials My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Dizzy Egg
Member #10,824
March 2009
|
Hello! I agree with Edgar, C with Allegro5, make something amazing!
---------------------------------------------------- |
Andre Xavier
Member #16,694
June 2017
|
Thanks a lot for the guidance! Definitely I can go with C for a restart! That makes everything a LOT easier! I would like to make a tic tac toe game for a start too! I remember the old allegro 4.something with all the examples from George Foot. I loved that. I was considering checking them again before trying the version 5. What do you think? I got mingw and code blocks. I tried codelite first but I definitely have a better feeling from code blocks. A lot less things on the screen makes it easier for me to read. I have been trying to install the allegro 4.x version but Ive been failing miserably. I got the version 5 but Im not sure exactly what to do with that to include them. Im not sure bettwin static or dynamic including it. By the looks of it everything got a LOT more complicated after all these years... Holy crap, I really feel overloaded and lost sometimes... O.o =^.^= |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Hey Xavier, let me help you out a bit. First you need to pick a compiler that matches your version of allegro (whether it's for 4 or 5). Second download the binaries. Since you're going with CB and MinGW I suggest you start out with my pre-made binaries from here : https://www.allegro.cc/forums/thread/616935. Simply extract the folders anywhere you like. Generally you move the mingw folder to c:\mingw to make it easier for codeblocks and other programs to find your compiler. Next you need to setup either your command line or your CB project (do not use the global compiler, it just mixes and messes everything up). First I'll show you how to compile with a simple command line : Here's a simple list of commands to use with gcc : Anytime you open a command shell, you'll need to set your %PATH% variable to include c:\mingw\bin or wherever you installed MinGW. You can do that with : c:>set path=c:\mingw\bin;%PATH% The second command will output the current path. You can also change your system environment variable PATH to do the same thing if you want it to be permananent. In CodeBlocks go to Menu->Project->BuildOptions and click on the overall project button in the top left. Then select search directories and set the compiler and linker search directories to match those of your allegro distribution that you are using (ie. from the binaries I provided, in the \include and \lib folders. You also need to set the linker settings (for the libraries that you need to link to) here : Compiler Search Directories Linker Search Directories Linker Settings After that you'll need to add files to your project by using Menu->Project->Add Files or Menu->File->New File. Then build and run the project as necessary, fixing compiler errors as you go. There are more advanced things, but those are the basics. I'll see if I can't get this up on the wiki. The page up there for codeblocks and mingw is like 10 years out of date. xD My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
l j
Member #10,584
January 2009
|
C is less complex than C++. Learning C first might help you understand low level memory management better and will probably help you to keep things simple. C++ has many more concepts and will encourage you to write things more abstract, at least in my experience. But it seems a lot of people eventually end up learning to love over-engineering everything. If you learn C++ and C after you might have more trouble with memory management and exceptions as you won't have smart pointers or destructors. If you learn C and then C++ you might have trouble with best practices and write code more prone to memory leaks and error as you'll more likely end up writing C-like C++ code not making proper use of destructors, smart pointers and containers. On the other hand what is considered a best practice in general application development might not be considered a good practice at all by some or many for game development. One big advantage of C is that it easily interfaces with almost everything. Pretty much any programming language will have an API for making calls to C libraries while you'd probably have to write a C API on top of your C++ libraries to do the same thing. I don't think it really matters whether you choose C++ or C to learn. Maybe learn them both at the same time or do something like learning Haskell and C at the same time to learn to think at a very high and a low level of abstraction.
|
Andre Xavier
Member #16,694
June 2017
|
Ooooook! Edgar, you are my hero! Everything is working now! I got a small code from the allegro wiki to test the display, compiled it and it works! The only funny thing is that I need to copy the dlls to the folder where the executable is so I can run it. I suppose that eventually Ill find out which dlls are necessary and which arent. I think I can finally begun to focus on learning allegro again alongside C. Thanks a lot, friend! Im your fan now! By the way, whats that -leagle_debug command on the linker settings? And Taron, thanks for the advice! Ill go slow and stay just with C for the beginning then. No need to complicate anything anymore than it already is, right? Is Shawn Hargreaves still around? He still is part of the allegro community? Thanks a lot, peeps! Xavier =^.^= |
Gideon Weems
Member #3,925
October 2003
|
Andre Xavier said: I remember the old allegro 4.something with all the examples from George Foot. Allegro Vivace? It's on the wiki. Quote: By the looks of it everything got a LOT more complicated after all these years... It may seem daunting, but if you take Allegro 5 in bite-size chunks, everything (except maybe voices/mixers) fits together very nicely. The wiki helps a lot! |
Chris Katko
Member #1,881
January 2002
|
Allegro 5 sounds more complex but really it all comes down to "set up allegro, setup graphics, make an event queue, tell the queue to respond to whatever events you want (drawing, logic, keyboard), and when the event is fired you call the right function in your main loop." I put together a "template" main source file that has all those filled in already, so whenever I make a new project it's already ready-to-go. -----sig: |
bamccaig
Member #7,536
July 2006
|
As far as I know Hargreaves has not been part of the project for a decade or more. He has moved on to greener pastures. Last I knew he had been a part of the XNA team, and also its successor. As far as I know he's still part of Microsoft, but I'm not sure where he is anymore. Not that I ever knew him or interacted with him. He's just a legend. For all I know, it's all bullshit and God created Allergro on the 8th day. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Chris Katko
Member #1,881
January 2002
|
http://www.shawnhargreaves.com/ Quote:
Microsoft, 2005 to present 2014- 2012-2014 2008-2010 2007-2008 2005-2007 In addition to my product development work, I supported the XNA game developer community through blogging, conference presentations, developer support forums, and by writing many of the XNA samples. See www.shawnhargreaves.com for links. https://blogs.msdn.microsoft.com/pix/introduction/ Quote: PIX is a performance tuning and debugging tool for Windows and Xbox game developers using DirectX 12. It provides seven main modes of operation: GPU captures for debugging and analyzing the performance of Direct3D 12 graphics rendering.
-----sig: |
|