|
Allegro 5 Book |
weapon_S
Member #7,859
October 2006
|
AleX-G Squadron said: i have already made the social network and this is why i am turning my back to web. Not to sound condescending, but why not put energy into promoting/expanding that? |
someone972
Member #7,719
August 2006
|
The basic problem with a game programming book is that there is such a great span of game types, and they take an incredibly varied amount of libraries and coding strategies to implement. Covering everything you could ever need in a book is simply impractical. However, tutorials and examples on Allegro 5 definitely can help. Perhaps something more useful to focus on would be how to design a game. Determining what is needed to implement an idea and then how to find and integrate an existing library, or some guidance on how to begin to create one should one not fit the needs of the game, would be much more useful than showing how to do very specific things. That being said, it could use examples with specifics to help explain and enforce how the information presented could be used. It could even categorize and list some existing libraries/terms to aid in finding the right library. Knowing the syntax of a programming language or the specifics of how to use a library is only part of being able to truly program. Most of the hard work is learning how to design and implement code within the restrictions of the programming language and libraries that gets one closer to bringing an idea to life. Programming languages and libraries are merely tools; someone can know how to use a saw and hammer, but if they can't think of a design for a cabinet the tools are useless. Also, because tone and attitude are lost in text, I'd like to make that you know I am not directing this at you or trying to talk down to or criticize anyone. These are merely my thoughts and opinions; I recognize that just because I thought of them does not mean that they are truth. I would love to see someone's different opinion, and hope that you can find what you are looking for with Allegro . ______________________________________ |
AleX-G Squadron
Member #13,593
October 2011
|
Ok, today i got up and started writing the book. @bam @am Q2)The game with network EDIT: Just made the cover www.anothergames.com |
Trent Gamblin
Member #261
April 2000
|
I thought it was a law of the universe that if you started a book with the cover (or a game with the logo) that you'd never finish.
|
Elias
Member #358
May 2000
|
What about starting the game with the title screen? I think I did that in some speed hack entry and finished it. -- |
alehbeer
Member #12,996
July 2011
|
AleX-G Squadron said: The manual is not simple ..[later on].. My question is: allegro 5 book. Any? NO! Epic fail. Man, I completely disagree. I hold the allegro manual as one of the most well documented and organized library manual I know of. Not to mention the community has been amazing. Epic, no doubt. Trent Gamblin said: Wha? You could write each of those chapters in 1 page. Agreed. AleX! Write a 10 page document and fill the rest with a picture tutorial how-to! I would be sincerely interested in your picture tutorial on iOS dev. AleX-G Squadron said: There is no jokes on programming. Oh, oh! I got this: "Programming is like sex: One mistake and you have to support it for the rest of your life." Find more at http://www.devtopics.com/best-programming-jokes/ AleX-G Squadron said: Can your game run google? Why yes, yes it can. I have made accounting software which could run google. And I have made a browser (early 90s) which could run google.com. Both have easteregg snake games. someone972 said: Programming languages and libraries are merely tools; someone can know how to use a saw and hammer, but if they can't think of a design for a cabinet the tools are useless. Very well said. AleX-G Squadron said: And i call an enginner someone who makes a car. Sure... that makes sense. Let's forget the who definition of the word. Nevermind biomedical engineering, electrical engineering, chemical engineering, software engineering, etc. And about the not a game programmer thing, I think just about everyone on this site can fairly call themselves such. AleX-G Squadron said:
As for web development, i have already made the social network and this is why i am turning my back to web. Social networking, huh. You might be doing it wrong.
|
Arthur Kalliokoski
Second in Command
February 2005
|
Trent Gamblin said: I thought it was a law of the universe that if you started a book with the cover (or a game with the logo) that you'd never finish. IIRC, I've read that back in the '30's, artists would paint science fiction themed subjects for the pulp magazines, and authors would have to craft a story around those. They all watch too much MSNBC... they get ideas. |
AleX-G Squadron
Member #13,593
October 2011
|
The book is already 6 pages.... I thought it would take much more! Thanks for great replies! www.anothergames.com |
GameCreator
Member #2,541
July 2002
|
{"name":"13214306211.jpeg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/c\/8c5e2db7a466321e0aa5b867fc729570.jpg","w":300,"h":300,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/c\/8c5e2db7a466321e0aa5b867fc729570"}
|
someone972
Member #7,719
August 2006
|
AleX-G Squadron said: I laughed so much from the replies, as i knew none will give an opinion. It seems like there has been lots of opinions presented in this thread . Anyway congratulations on getting the first couple pages of the book done. If you need any examples double-checked or critiqued you can always post them here, but be warned: Allegro.cc is famous for being hard critics, as I'm sure you are aware . ______________________________________ |
bamccaig
Member #7,536
July 2006
|
-- 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 |
alehbeer
Member #12,996
July 2011
|
someone972 said: ... These are merely my thoughts and opinions ...
AleX-G Squadron said: ... I laughed so much from the replies, as i knew none will give an opinion. ... Indeed, indeed. All joking aside, here is how you do that magical teleport. Simply have a condition, evaluate for its validity in the current game-state and then change the position values as needed. 1//Please add proper error checking, spacing, and formating in your own program - it is removed here for simplicity only
2#include "allegro5/allegro.h"
3#include "allegro5/allegro_font.h"
4#include "allegro5/allegro_image.h"
5#include <allegro5/allegro_primitives.h>
6int main(int argc, char **argv){
7 int i_x = 50;
8 int i_y = 50;
9 int i_done = -1;
10 ALLEGRO_DISPLAY *display = NULL;
11 ALLEGRO_EVENT_QUEUE *events;
12 ALLEGRO_EVENT event;
13 ALLEGRO_KEYBOARD_STATE kbdstate;
14 al_init();
15 al_set_new_display_flags(ALLEGRO_WINDOWED);
16 display = al_create_display(640, 480);
17 al_set_window_title(display, "Teleport: Use the arrow keys to put the triangle at the X");
18 al_install_keyboard();
19 al_init_image_addon();
20 al_init_primitives_addon();
21 events = al_create_event_queue();
22 al_register_event_source(events, al_get_keyboard_event_source());
23 al_register_event_source(events, al_get_display_event_source(display));
24 while(i_done != 1) {
25 al_clear_to_color(al_map_rgb(255,0,0));
26 al_draw_line(100, 100, 150, 150, al_map_rgb(255,0 ,255), 5.);
27 al_draw_line(150, 100, 100, 150, al_map_rgb(255,0 ,255), 5.);
28 al_draw_filled_rectangle(400, 50, 450, 75, al_map_rgb(0,255 ,255));
29 al_draw_filled_triangle(i_x-10, i_y,i_x,i_y-20.,i_x+10,i_y,al_map_rgb(0,0 ,255));
30 al_get_keyboard_state(&kbdstate);
31 if (al_key_down(&kbdstate, ALLEGRO_KEY_LEFT)) {i_x-=5;}
32 if (al_key_down(&kbdstate, ALLEGRO_KEY_RIGHT)) {i_x+=5;}
33 if (al_key_down(&kbdstate, ALLEGRO_KEY_UP)) {i_y-=5;}
34 if (al_key_down(&kbdstate, ALLEGRO_KEY_DOWN)) {i_y+=5;}
35 if (al_key_down(&kbdstate, ALLEGRO_KEY_ESCAPE)) {i_done=1;}
36 if((i_x>100&&i_x<150)&&(i_y>100&&i_y<150)){i_x=420;i_y=75;}
37 al_flip_display();
38 al_wait_for_event(events, &event);
39 }
40 al_destroy_display(display);
41 return 0;
42}
|
bamccaig
Member #7,536
July 2006
|
"How to teleport" is a ridiculous thing to teach somebody. It's very context-specific. Figuring out how to solve these problems yourself is what programmers are for. If you can't think your way through a problem like that then you aren't a programmer. If that's the case then you should be using game maker software or hire programmers. The import things to teach are lower-level than that. Things like collision detection and resolution. -- 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 |
AMCerasoli
Member #11,955
May 2010
|
bamccaig said: Things like collision detection and resolution. Yeah, like when you crash your parents' car and need to think how to fix it before they see it.
|
Arthur Kalliokoski
Second in Command
February 2005
|
AMCerasoli said: Yhea like when your crash your parent's car and need to think how to fix it before they see it. Crashes can usually be figured out with a debugger. They all watch too much MSNBC... they get ideas. |
AleX-G Squadron
Member #13,593
October 2011
|
Wow! Thanks for teleport! I will try to understand the code as i am not that expert. I am working hard for the book and i hope people will understand one day its need. www.anothergames.com |
AMCerasoli
Member #11,955
May 2010
|
Not these kind of crashes, my friend... Not these kind of crashes... Do you know what is difficult about making a game?
Do you know what is difficult about making a game release the thing make some fame maybe sleep with some girls have a name see people reconigze my face and walk on the street and feal proud about me? no cry no more bad thoughts about this and the intrigue that all this causes when you hear all those voices? That nobody is helping you Instead they're always questioning you If you're able to do this and if you really want to do this and how much time are you going to spend on it are you really motivated are you really focused Do you know this could take a lot of time and you could gain nothing
|
Neil Black
Member #7,867
October 2006
|
This thread reminds me that I still haven't bothered to learn Allegro 5. Is there, like, a book or something to get me started?
|
Don Freeman
Member #5,110
October 2004
|
I had plans to write a book for my war game engine, but sadly other things have taken over my life the last year or so...so it's been put on the back burner. I may try to find some spare time here and there, but with work and all...it will probably be a while before it comes anywhere close to being done. -- |
Arthur Kalliokoski
Second in Command
February 2005
|
It seems to me that writing a book is at least as hard as writing a computer program, after all, to write a good book about how to program is simply optimizing for a human, rather than a specific compiler. If your optimizations are crap, well then, your book can join all the worthless web pages already in existance. They all watch too much MSNBC... they get ideas. |
AleX-G Squadron
Member #13,593
October 2011
|
I was writing about native dialog boxes and read in the manual about them. The manual is very good, but does not unveil you things, for example making a native dialog box upside down or creating a timer which stays for 5 secs than closes the native dialog box. One thing i dont understand is why it is called native? www.anothergames.com |
Arthur Kalliokoski
Second in Command
February 2005
|
AleX-G Squadron said: making a native dialog box upside down Why would you do that? Quote: making a native dialog box upside down or creating a timer which stays for 5 secs than closes the native dialog box. The native dialog box isn't meant to be a generic window, more like to alert the user of a problem or make a choice. Even if you'd want to close it in 5 seconds to some default, it's not that big a deal to require the user to click OK or something. Quote: One thing i dont understand is why it is called native? AFAIK, it's because it uses OS specific features, hence, native to the OS. They all watch too much MSNBC... they get ideas. |
Trent Gamblin
Member #261
April 2000
|
Arthur Kalliokoski said: Why would you do that? And how? Pretty sure that's just not possible .
|
AleX-G Squadron
Member #13,593
October 2011
|
Thanks for the replies! www.anothergames.com |
Trent Gamblin
Member #261
April 2000
|
return -1 is often used as a "failure" return value in functions that return integers. It's not specific to Allegro but used in many C-like languages. monolith means "all-in-one" I guess. The Allegro monolith DLL includes all the addons and dependencies in 1 single DLL.
|
|
|