SFML 2 Vs SDL 1.3/2.0 Vs Allegro 5
Rukiri

I'm pretty proficient with C++ and wanted to get out of the "game engine" trend and decided to just write my own, my choice are sfml 2, sdl 1.3/2.0(practically NO documentation..), and allegro 5.

I do plan on writing a level editor as who likes writing out there maps by hand?

The game I'm creating would work on either 3 libraries as it's C++ at the end of the day, but I'm more focused on the game than low level stuff if I do have to use low level I would integrate DirectX 11 or OpenGL 4.3.

Speaking of DirectX or OpenGL does allegro or the others allow linking to other graphics api's?

I'm pretty against sdl 2.0 mainly because there is no documentation, sfml 2 doesn't have documentation but it's forums are like a beehive and there's plenty of unofficial docs for sfml 2, sdl forums aren't really active and for some reason you can't post either.. how convenient for them.

van_houtte

Since documentation is pretty important go for the one that is the most well documented option (Allegro 4 had really good documentation, I haven't tried Allegro 5 so I can't say which one to chose for you).

I once tried to learn frameworks, I had about 3 to chose from in a language that I was already very familiar with however the documentation was sporadic and lacking and it required me to read source code, and 1 other framework that was really well documented but in a language that I was not familiar with.

After fighting for 3-4 weeks with the language that I was already very familiar with & undocumented frameworks I switched to the language I did not know but had a really well documented framework and I never looked back. I believe that strong documentation is what makes the programming tools functional to humans.

gnolam
Rukiri said:

I'm more focused on the game than low level stuff if I do have to use low level I would integrate DirectX 11 or OpenGL 4.3.

If you don't want to focus on low-level stuff, then for Eris's sake target an earlier OpenGL version than 4.3 (which when removing the cruft from the OpenGL API went too far and removed pretty much everything convenient).

Quote:

Speaking of DirectX or OpenGL does allegro or the others allow linking to other graphics api's?

All of them provide easy access to OpenGL.

_Kronk_

I'm using SFML 1.6 (last of the 1.x branch) in my game engine. The API is fairly similar to 2.x from what I've seen. 1.6 has great documentation, so I assume that 2.x is going to have good docs when it's finished. In the meantime, you could use 1.6 if you wanted. It's stupid simple and complies to modern programming paradigms like RAII, OOP, etc.

Evert

I don't know about any of the others, but Allegro lets you use D3D or OpenGL directly if you want. On Windows the default backend is D3D, but you can specify that you want OpenGL. You can then very easily port your game over to OS X, Linux, Android or iOS.

Allegro 5's documentation is a bit rough (compared to A4's) but it generally ok (http://alleg.sourceforge.net/api.html). There's also the Wiki, that people are busy adding more documentation and tutorials to (http://wiki.allegro.cc/, it's not quite as organised as it could be, though people are working on that too). There are the examples, that are mostly clear and well-commented. Last but not least, there's these forums where you can always ask questions if you get stuck on something.

If you want the latest stuff (including shaders, multi-touch and more extensive primitives) you should check out the latest 5.1 WIP version (beware: you may contribute to Allegro development by finding bugs), otherwise stick with 5.0.

In the end it's mostly about personal preference which library you use.

AMCerasoli

You can use Allegro with Ogre3D, in case you want to expand your frontiers.

kazzmir

SDL 1.3/2.0 is still undergoing API changes which is somewhat annoying to deal with. Allegro5 is a bit more stable.

If you want to post on the SDL forums you have to send an email to the admins and have them add you. Still its a waste of time because no one replies to anything.

jmasterx

Yeah, AL5 has unmatched help and support IMO. Teh Community FTW!

Gnatinator

First, do you want to write a GAME or an ENGINE? Big difference. Writing a level editor is a huge timesink. Try using one of these: http://www.ludumdare.com/compo/tools/

Nowadays all of these API's are good options and are feature-similar. Your results are primarily going to come down to your own experience more than anything... which you will build by coding lots of projects.

If you're using straight C or C++ as an "Extended C", then Be sure to check out SFML 2's C port. It's far smaller syntactically.

For SDL tutorials check out http://www.lazyfoo.net/SDL_tutorials/

I know this may seem obvious, but for documentation, the respective API references for each library will be invaluable.

Allegro, SDL and SFML can all use OpenGL; I wouldn't recommend doing graphics any other way, even if you're doing 2D. Also you can do top-notch 2D with OpenGL going back to the earliest versions (1.1?).

Trezker

http://www.codinghorror.com/blog/2007/01/if-it-isnt-documented-it-doesnt-exist.html

If it's true that those other libraries have crappy documentation, then they don't even exist. You have no choice but to use Allegro.

Rukiri

Okay thanks for the tips, and for documentation SFML and Allegro are king.

Specter Phoenix

SDL has a ton of tutorials showing how to use it. I think Lazyfoo's tutorials are the more popular SDL series out there. Also, while Allegro has documentation, I think most Allegro users look at the included examples and games to see how to use it rather than sifting through the docs. This is where other libraries fail or come up short, they don't have very good examples to look at and pick apart.

Neil Walker

What the A5 documentation needs is to stop treating commands in isolation and specifying the obvious and instead add some context, a user friendly description and an example.

for example:

al_create_event_queue
Create a new, empty event queue, returning a pointer to object if successful. Returns NULL on error.

Yes, hello, means nothing to anybody new.

Instead, why not at the start of every section, e.g. http://alleg.sourceforge.net/a5docs/refman/events.html

Have a description of events and how they work.

Elias

True, that sounds like a documentation stub. On al_create_event_queue the example links give you plenty of code to look at though. And to be fair events.html is a quite long read already so even with some functions only documented in brief it already shouldn't be much trouble figuring out how to use them.

Thomas Fjellstrom

What the A5 documentation needs is to stop treating commands in isolation and specifying the obvious and instead add some context, a user friendly description and an example.

PROMOTED!

Specter Phoenix

It may just be my nostalgia, but I liked how the A3 and A4 layout looked compared to A5. That is just my personal preference though.

Don't know why I like this old layout:
{"name":"606090","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/7\/47b4ee85fa3c666e1770e0b6a78c2040.png","w":1366,"h":768,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/7\/47b4ee85fa3c666e1770e0b6a78c2040"}606090

Evert

Don't know why I like this old layout:

Any particular reason you're using archive.org to access the A4 manual despite it still being available directly on Allegro's homepage?

Too many pastels for my taste anyway, although the A5 manual could probably do with a bit more colour. And more examples, obviously. As always, we accept patches. ;)

Specter Phoenix
Evert said:

Any particular reason you're using archive.org to access the A4 manual despite it still being available directly on Allegro's homepage?

Didn't know it was still available on the Allegro homepage. When I went there I saw "API--5.1" and assumed it only linked to the new A5 API, so I used archive.org to get it.

Quote:

And more examples, obviously.

Not just examples, but simple examples as most programmers coming to Allegro may see the included examples on the documents and not have a clue what is going on there. I know I've looked at some examples and thought "WTF?!".

Ashteth

Just use Allegro 5. The examples are good, the library is good and so is the community.

I haven't tried it yet, but this development course looks rather nice:
2D Game Development Course Using Allegro 5

Specter Phoenix
Ashteth said:

Just use Allegro 5. The examples are good, the library is good and so is the community.

It's A5 examples that make me say "WTF" to. Of course I'm referring to the Manual examples that were attached to some things. For example, under al_create_bitmap there is an example (ex_bitmap_target.c) and it makes me think "WTF?!" when looking at the code(sorry for the bad format, apparently copy/paste doesn't copy the format from the manual to the forums at all, so I had to manually tweak it or have one long line of code):

#SelectExpand
1/* An example comparing FPS when drawing to a bitmap with the 2 * ALLEGRO_FORCE_LOCKING flag and without. Mainly meant as a test how much 3 * speedup direct drawing can give over the slow locking. */ 4#include <allegro5/allegro.h> 5#include <allegro5/allegro_font.h> 6#include <allegro5/allegro_image.h> 7#include <allegro5/allegro_primitives.h> 8#include <stdio.h> #include <stdarg.h> 9#include <math.h> 10#include "common.c" 11const int W = 300, H = 300; /* Size of target bitmap. */ 12const int RW = 50, RH = 50; /* Size of rectangle we draw to it. */ 13ALLEGRO_DISPLAY *display; 14ALLEGRO_BITMAP *target; /* The target bitmap. */ 15float x, y, dx, dy; /* Position and velocity of moving rectangle. */ 16double last_time; /* For controling speed. */ 17bool quit; /* Flag to record Esc key or X button. */ 18ALLEGRO_FONT *myfont; /* Our font. */ 19ALLEGRO_EVENT_QUEUE *queue; /* Our events queue. */ 20/* Print some text with a shadow. */ 21static void print(int x, int y, char const *format, ...) 22{ 23 va_list list; 24 char message[1024]; 25 va_start(list, format); 26 vsnprintf(message, sizeof message, format, list); 27 va_end(list); 28 al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_INVERSE_ALPHA); 29 al_draw_text(myfont, al_map_rgb(0, 0, 0), x + 2, y + 2, 0, message); 30 al_draw_text(myfont, al_map_rgb(255, 255, 255), x, y, 0, message); 31} 32/* Draw our example scene. */ 33static void draw(void) 34{ 35 float xs, ys, a; 36 double dt = 0; 37 double t = al_get_time(); 38 if (last_time > 0) { 39 dt = t - last_time; 40 } 41 last_time = t; 42 43 al_set_target_bitmap(target); 44 al_set_blender(ALLEGRO_ADD, ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA); 45 al_draw_filled_rectangle(x, y, x + RW, y + RH, al_map_rgba_f(1, 0, 0, 1)); 46 al_draw_filled_rectangle(0, 0, W, H, al_map_rgba_f(1, 1, 0, 0.1)); 47 x += dx * dt; 48 if (x < 0) { 49 x = 0; 50 dx = -dx; 51 } 52 if (x + RW > W) { 53 x = W - RW; 54 dx = -dx; 55 } 56 y += dy * dt; 57 if (y < 0) { 58 y = 0; 59 dy = -dy; 60 } 61 if (y + RH > H) { 62 y = H - RH; 63 dy = -dy; 64 } 65 66 al_set_target_backbuffer(display); 67 al_set_blender(ALLEGRO_ADD, ALLEGRO_ONE, ALLEGRO_ZERO); 68 al_clear_to_color(al_map_rgba_f(0, 0, 1, 1)); 69 xs = 1 + 0.2 * sin(t * ALLEGRO_PI * 2); 70 ys = 1 + 0.2 * sin(t * ALLEGRO_PI * 2); 71 a = t * ALLEGRO_PI * 2 / 3; 72 al_draw_scaled_rotated_bitmap(target, W / 2, H / 2, 320, 240, xs, ys, a, 0); 73} 74 /* Run the FPS test. */ 75 static void run(void) { 76 ALLEGRO_EVENT event; 77 int frames = 0; 78 double start; 79 target = al_create_bitmap(W, H); 80 al_set_target_bitmap(target); 81 al_clear_to_color(al_map_rgba_f(1, 1, 0, 1)); 82 al_set_target_backbuffer(display); 83 dx = 81; 84 dy = 63; 85 start = al_get_time(); 86 while (true) { 87 /* Check for ESC key or close button event and quit in either case. */ 88 if (!al_is_event_queue_empty(queue)) { 89 while (al_get_next_event(queue, &event)) { 90 switch (event.type) { 91 case ALLEGRO_EVENT_DISPLAY_CLOSE: 92 quit = true; 93 goto done; 94 case ALLEGRO_EVENT_KEY_DOWN: 95 if (event.keyboard.keycode == ALLEGRO_KEY_ESCAPE) 96 quit = true; 97 goto done; 98 if (event.keyboard.keycode == ALLEGRO_KEY_SPACE) 99 goto done; 100 break; 101 } 102 } 103 } 104 draw(); 105 print(0, 0, "FPS: %.1f", frames / (al_get_time() - start)); 106 if (al_get_new_bitmap_flags() & ALLEGRO_FORCE_LOCKING) { 107 print(0, al_get_font_line_height(myfont), "using forced bitmap locking"); 108 } else { 109 print(0, al_get_font_line_height(myfont), "drawing directly to bitmap"); 110 } 111 print(0, al_get_font_line_height(myfont) * 2, "Press SPACE to toggle drawing method."); 112 al_flip_display(); 113 frames++; 114 } 115 done: 116 al_destroy_bitmap(target); 117 } 118 int main(void) 119 { 120 if (!al_init()) { 121 abort_example("Could not init Allegro.\n"); 122 return 1; 123 } 124 al_init_primitives_addon(); 125 al_install_keyboard(); 126 al_init_image_addon(); 127 al_init_font_addon(); 128 display = al_create_display(640, 480); 129 if (!display) { 130 abort_example("Error creating display\n"); 131 return 1; 132 } 133 queue = al_create_event_queue(); 134 al_register_event_source(queue, al_get_keyboard_event_source()); 135 al_register_event_source(queue, al_get_display_event_source(display)); 136 myfont = al_load_font("data/font.tga", 0, 0); 137 if (!myfont) { 138 abort_example("font.tga not found\n"); 139 return 1; 140 } 141 while (!quit) { 142 if (al_get_new_bitmap_flags() & ALLEGRO_FORCE_LOCKING) 143 al_set_new_bitmap_flags(ALLEGRO_VIDEO_BITMAP); 144 else 145 al_set_new_bitmap_flags(ALLEGRO_FORCE_LOCKING); 146 run(); 147 } 148 al_destroy_event_queue(queue); 149 return 0; 150 }

Ashteth

The above example is meant to demonstrate the difference between memory and video bitmaps. It is especially relevant to longtime Allegro 4 users. In Allegro 4, you can pretty much write to bitmaps with reckless abandon. In Allegro 5 if you write to a bitmap you take a hefty performance hit if you don't know what you are doing.

Perhaps a simpler explanation of what the example is trying to demonstrate could be placed at the top of the header.

Specter Phoenix

I'm not that experienced in C++ and looking at that code I can't tell what the hell it is being done because the variable naming is terrible and I have to try to figure out what variable names mean and what is going on in the example. On top of trying to understand what is going on with the Allegro code. For an experienced programmer I'm sure it all makes sense, but most of our new users are new to programming too and trying A5 for the first time to get met with confusing examples like that.

Ashteth

I think its alright if the beginning user can't understand all the examples at first glance. Plenty of the included examples are far more simplistic. To a certain extent, complexity is why I like Allegro. The power is there if you want it. If I want to do raw bitmap manipulation I can. I am, however not required to and I can successfully develop a game without knowing anything about bitmap manipulation.

You are correct however in that this example could use better documentation. Perhaps the examples should come with some sort of rating system. I.E. beginner, intermediate, advanced etc. I am grateful that someone took the time to write all the examples. I myself am too busy developing with Allegro 5 to write examples.

Matthew Leverton

I think the API documentation is fine. The n00bs needs a well written, high level book to walk them through everything from A-Z. The wiki articles are fine if you are looking for a single topic, but they always are going to lack the context and continuity that a single-authored book provides.

weapon_S
Evert said:

As always, we accept patches.

For some reason I thought the documentation source was written in some horrible custom syntax. Instead I see it's written in a very understandable custom(?) syntax. Maybe I'll start making patches ^^ Should I use SVN for that or what?
There definitely are English mistakes, and some entries could refer to a bigger number of appropriate entries.

It's A5 examples that make me say "WTF" to.

In my experience each example contains some extra code that is 'hard' to understand (and irrelevant to the theory of the example), and could use some comments to distinguish.

verthex

I've made some nice demos for myself using A5 and the only other API I used before it is A4.2 and DirectX9 so it takes a rather intermediate skill level in c++ to make anything with A5 but the support is there unlike some other librabries; I'm not sure where SDL has all the answers.

Right now I'm trying to use XOOPIC with A5 for a 2-d plasma physics simulator and there is no support for XOOPIC so I guess I'll see where that goes.

Thomas Fjellstrom
weapon_S said:

For some reason I thought the documentation source was written in some horrible custom syntax. Instead I see it's written in a very understandable custom(?) syntax

Allegro 4 and prior uses "makedoc" format, totally custom to allegro. Allegro 5 uses (I think) markdown (via pandoc) with a few extensions.

Elias
weapon_S said:

Maybe I'll start making patches ^^ Should I use SVN for that or what?

Ideally yes. Patches against the latest release are fine but might not apply anymore if something was modified in the meantime.

Trezker

When are you going to switch to git anyway? Seriously!
Still using svn is just shameful.

Matthew Leverton
Thomas Fjellstrom
Trezker said:

When are you going to switch to git anyway? Seriously!

There's actually a majority of devs that wouldn't mind that. Peter and Elias already seem to use git through git-svn. But one of our (two?) OSX devs says he doesn't have the time to learn git, so we're holding off.

Elias

I agree that using SVN is a bit ridiculous by now (I'm actually using git svn to access the SVN repository myself). I'd volunteer for doing the SVN -> GIT transition on SourceForge. But I spent 5 years or so suggesting the switch each year on the mailing list so I've given up hope. With SVN at least we have nice linear revision numbers :)

torhu

Switching git isn't very nice to developers using Windows, but I suppose there are none... :P

Specter Phoenix
torhu said:

Switching git isn't very nice to developers using Windows, but I suppose there are none... :P

Yeah, sadly, I think they all jumped ship to XNA/C#/Managed C++(cringe) or, like in my case, jumped from Windows to Linux (I only go to Vista when I want to play Guild Wars or such without having to do installs hoping wine works).

SiegeLord

Yeah, sadly, I think they all jumped ship to XNA/C#/Managed C++(cringe) or, like in my case, jumped from Windows to Linux (I only go to Vista when I want to play Guild Wars or such without having to do installs hoping wine works).

Yeah, I'm sure all Allegro Windows developers jumped ship to XNA/C#/Managed C++. Seriously, not everything somehow applies to you, Specter Phoenix, and requires a life anecdote.

torhu said:

Switching git isn't very nice to developers using Windows, but I suppose there are none... :P

git works fine on Windows, in my experience (I use it when developing Windows ports of my stuff).

torhu
SiegeLord said:

git works fine on Windows, in my experience (I use it when developing Windows ports of my stuff).

Yes, but people that primarily work on Windows probably won't think that having to use a bash shell instad of cmd.exe is that great. I know I don't.

Elias

Just use this if you don't like the command-line: http://windows.github.com/

Myself I prefer msys-git in Windows since I don't need to re-learn anything compared to how it works in Linux.

There's also a Windows-GUI included with git itself (which I find horrible, but it works) and tortoise-git (also not very good, but also works). And google suggests there's about 10 other windows git things... so I think that git isn't nice under Windows was true 5 years ago but certainly isn't anymore.

torhu

What if I want to use the command line? ::)

gnolam
Elias said:

so I think that git isn't nice under Windows was true 5 years ago but certainly isn't anymore.

Let's review the earlier part of that post:

Quote:

There's also a Windows-GUI included with git itself (which I find horrible, but it works) and tortoise-git (also not very good, but also works). And google suggests there's about 10 other windows git things...

It should also be added that none of the "10 other windows git things" will improve on the fundamental fact that git is written solely for and expects a UNIX system. It'll still be years before someone hacks together enough kludges to make it properly usable under Windows. If ever.

Arthur Kalliokoski

When you get used to programming under *nix, it seems totally absurd to limit your choices just in case somebody wants to use your program under some other OS. Like not playing anything more than chopsticks on your new Steinway because that's all the baby can play.

Elias

In what way does git expect a unix system? It does work just the same in Windows - what I didn't like about those two tools is that they seemed a bit rough, like nothing happening when I clicked on the "diff" button because some external tool was missing. But nothing which couldn't be fixed in a day or two by their developers.

Matthew Leverton

Doesn't everybody run a Linux VM on Windows machines? How else would you cope with daily activities? ???

MiquelFire

I use hg-git on Windows.

Specter Phoenix

Doesn't everybody run a Linux VM on Windows machines? How else would you cope with daily activities? ???

Heh. I have Wine running under Ubuntu for Icy Tower, Emu8086. Otherwise I program and do all dev things (web and app) under Ubuntu and play games in Vista, though I may look into putting a Linux VM under it, but doubtful.

SiegeLord said:

Seriously, not everything somehow applies to you, Specter Phoenix, and requires a life anecdote.

First, that is how I post, and that is how I am in everyday conversations. I pull personal experiences to connect with the subject matter. Second, before I got into using Ubuntu I was a developer that used Windows, so in that regard it did apply to me as I was stating how I had changed to doing Linux for programming and Windows only for gaming. Last, as I've said in other threads, if you don't like the way I associate topics with my personal experiences you don't have to read them or comment on them. Takes a lot less time to just ignore my 'life anecdote' than it did to type up that sentence complaining about it :P.

torhu

I use hg-git on Windows.

Me too, but I've only used it for simple stuff yet, so I don't know if it will work for everything. Mercurial rocks, though. And it does so both on Linux and Windows.

Karadoc ~~

I use Windows exclusively, and I think git is awesome. (And it's certainly better than SVN.)

I have no idea why you'd think Windows users wouldn't like to use git.

By the way, my favourite IDE, QtCreator, has built-in support for git. It has drop-down menus and such for a heap of different git commands, so that you can use them from inside the same IDE that you write code in.

(Although that all sounds very nice, I've actually never used it. I prefer to just use the command prompt.)

Specter Phoenix

I used Github once for the pong clone I was doing a while back, which SiegeLord helped me with (though I never got the final one updated). When I was done I still had no clue what I was doing (only using it once does nothing for learning to use it).

SiegeLord

Second, before I got into using Ubuntu I was a developer that used Windows, so in that regard it did apply to me as I was stating how I had changed to doing Linux for programming and Windows only for gaming.

We were talking about Allegro developers, not developers in general.

torhu said:

Yes, but people that primarily work on Windows probably won't think that having to use a bash shell instad of cmd.exe is that great. I know I don't.

It didn't seem to explode when I tried using it from cmd.exe... I was glad that it came with the bash shell though, I ditched cmd.exe for good (except for when I compile Allegro).

torhu
SiegeLord said:

It didn't seem to explode when I tried using it from cmd.exe... I was glad that it came with the bash shell though, I ditched cmd.exe for good (except for when I compile Allegro).

"I think Linux is great. Of course, I'd never use it myself, but I'm sure it's great for other people."

That's what the arguments so far are like. See a problem?

Karadoc ~~

I still use cmd.exe, but with unix utils. The bash that comes with git kind of bugs me because it isn't as easy to copy & paste stuff. -- It's a minor problem, but I don't have any problems with cmd, so a minor problem is all that it takes...

Specter Phoenix
SiegeLord said:

We were talking about Allegro developers, not developers in general.

So was I, Allegro was the only library I messed with under Windows. I do more developing 'in general' under Ubuntu than I ever did in Windows. Under Windows I just did Allegro apps and Allegro GUI apps during A3 and early A4 (using DLG program I think it was called). Since going to Linux I started messing with C++/MySQL, PHP/MySQL, CSS, Java, and several other things that I wouldn't have even considered on Windows.

SiegeLord
torhu said:

"I think Linux is great. Of course, I'd never use it myself, but I'm sure it's great for other people."That's what the arguments so far are like. See a problem?

But I just said it works with cmd.exe fine enough from my testing. I choose to use bash, but it doesn't seem like git forced you to do so. I believe you don't even have to install the msys bit, as seen in this screenshot (second option):

{"name":"bootcamp_1_win_install_6.jpg","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e9a4dd3935374324441b23905e5ff573.jpg","w":558,"h":442,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/e\/9\/e9a4dd3935374324441b23905e5ff573"}bootcamp_1_win_install_6.jpg

So was I, Allegro was the only library I messed with under Windows.

Allegro developers are those that develop Allegro, not those that develop using Allegro. Surely after 11 years of being on this forum you've noticed how people who make this mistake by posting a thread on Allegro Development sub-forum have their threads moved to Programming Questions?

Specter Phoenix
SiegeLord said:

Allegro developers are those that develop Allegro, not those that develop using Allegro. Surely after 11 years of being on this forum you've noticed how people who make this mistake by posting a thread on Allegro Development sub-forum have their threads moved to Programming Questions?

No I normally asked my questions on the mailing list or IRC and did OT topics here. I think I asked about screenshot functions and tilemapping at one point on the programming thread, but other than that it was normally the other two methods. I personally don't pay attention to the programming or development thread as my knowledge is more C++ related and not so much Allegro since I mostly did pong and gui apps.

torhu
SiegeLord said:

I believe you don't even have to install the msys bit, as seen in this screenshot (second option):

It does talk about a Cygwin Prompt...

If Git would actually work fine with just cmd.exe, why is is Msys, Cygwin, or Bash always mentioned?

Karadoc ~~

@torhu, what are you getting at here? I've already said that I use git from cmd, and it does work fine. So that's that. It's not relevant that the git installer happens to explain which option people using Cygwin should choose. That's unrelated to cmd, and people who do not use Cygwin can simply ignore that information.

MiquelFire

Because it requires a Linux like environment. With Kaspersky, you can see (in red annoying enough) all the commands it calls (perl, sh, bash, maybe some git* exe's, I think I even saw ruby)

I remember installing msysGit and having to exclude like 10 programs from Kaspersky just to run git init, and an extra 5 for git commit (So there are programs it don't use during init that commit uses)

Karadoc ~~

Well, I personally don't know, nor do I really care, how git gets its internal work done. All I know is that I can type "git" on the command prompt (cmd.exe) and it does what I expect it to do. -- For me, it doesn't matter if git works by calling a bunch of auxiliary programs, or if it actually has all that functionality built into git itself. That doesn't make any difference to me.

-- But apparently it does make a difference for people who use Kaspersky or something. I haven't heard of that problem before. It sounds like a real pest.

Arthur Kalliokoski

git works by calling a bunch of auxiliary programs

That's the *nix way. Each program does one thing, and does it well. The MS world just recently got multitasking working right, so they have a legacy of big, buggy monolithic programs.

weapon_S

And then you have to download and install a runt-time for some interpreted language, because the programmers felt like using one function of that language.
I have Git for Windows too, without MSYS or CygWin, and it works fine. >:( Why the F did they have to include Vim, though?

bamccaig

I've been using Git in Windows directly from cmd.exe for a long while with plenty of success. I rarely use MSYS shells because they're only a partial solution and require you to think differently. I am rather sick of cmd.exe though. I finally went out and found PyCmd, which has a few extra UNIX-like features that can be real time-savers: more intelligent tab completion (e.g., expand environment variables in paths), word-based tab completion, and expand ~ to %HOME% or %USERPROFILE%.

As for Git's modular design, there's a very good and intelligent reason for it, and ideally that is how all software would be written. As for your shit anti-virus software running on your shit operating system, you should be blaming your anti-virus software and operating system, not Git.

AFAIK, Git is predominantly written in C, bash, and Perl. I am unaware of any Ruby and I somewhat doubt that they'd use it since they already have plenty of capable language platforms (and I think the developers are mostly Linux-based [C and bash] and Perl-based). Note that every Git command is implemented as a separate process, and many of them are combinations of others. Without knowing the internals, I imagine that git-clone is likely a combination of git-init, git-remote (which is probably built on git-config), git-fetch, and git-checkout (and there are probably lower-level commands within these too). Then there's also the wrapper git process on top of that. In UNIX-based operating systems processes and forks are extremely cheap and this works wonderfully. In Windows land, it's a rather bulky solution, but that is again a deficiency with your operating system and not your source code management software.

Append:

torhu said:

If Git would actually work fine with just cmd.exe, why is is Msys, Cygwin, or Bash always mentioned?

...because cmd.exe sucks, and most people that would choose to use Git are already familiar with Bash shells and UNIX tools that are available with MSYS or Cygwin. Also, part of what makes Git's modular design useful is linking the processes together, which is only partially practical with cmd.exe (for example, I don't think it has a concept of a subshell).

torhu

Yes, that's another advantage of Mercurial. It doesn't come with a condescending attitude towards Windows and its users ::)

bamccaig
torhu said:

Yes, that's another advantage of Mercurial. It doesn't come with a condescending attitude towards Windows and its users ::)

Maybe not Windows, but definitely to its users. Whenever I ask #mercurial how to do something the answer is "don't". ::) Mercurial is fundamentally flawed in that its branches are not "distributed" by nature, but they are distributed by default (as if that makes any sense ::)). Their answer to that is "we are right and you are wrong", despite the fact that it causes tons of permanent clutter in all repositories, and is susceptible to collisions. I've used Mercurial more than I have used Git. I am quite familiar with it and its community. My advice would be to prefer Git, but settle on Mercurial if you are collaborating with monkeys. :P

torhu

Aren't you supposed to use bookmarks if you want local branches? They are not public by default.

bamccaig

You're not supposed to do anything. There is no single way to do branching in Mercurial. That's the point. Most people in the Mercurial community seem to use entire repository clones for that. Others insist on named branches and permanent history no matter how experimental, uninteresting, or trivial the branch. Others sometimes use bookmarks, named branches, and repository clones all together.

Bookmarks should work for local-only branches. It doesn't include experimental or uninteresting work-in-progress branches that you want to share with a direct collaborator or other interested party, but not the entire team, for example. Bookmarks are not synced between repositories by default, even though branches are. I think that your collaborator would have to be careful to ask for just that branch and bookmark. Still, the Mercurial community also discourages history editing, and there's no other way to delete just a branch, so you'd still have to use repository clones if you stuck to "best practices", making bookmarks "bad practice" by association. :P

Karadoc ~~

The main thing I like about git is that it doesn't have to be centralized. eg. If I clone something, my repository is then just as valid as the one that I cloned it from. So I can have a copy on my computer, and on my usb stick, and on github, and on sourceforge - and there is no one single 'master copy'. All of the copies have all of the information, and they are all compatible with one another, so that they can push and pull to/from each other. -- That's what I like about git (amongst other things).

I've never used Mercurial, but I know both svn and cvs have a master repository.

MiquelFire

For the most part (the bits that bam brings up are just political) Mercurial and Git are the same. There are differences, but it's like the difference between a Honda Fit and a Chevy Aveo/Sonic. For some, which you choose may be nothing more than brand loyalty.

SiegeLord

I don't know... bamccaig's blog post about mercurial branches really opened my eyes. Branching is a key feature of DVCS's and the way mercurial does it is just broken, or if nothing else, overcomplicated relative to the elegances of git's approach to that.

Trezker

What I'm wondering is why there isn't a pure native git for windows.

I think it may have something to do with it using other programs to do stuff that otherwise has nothing to do with git and are not available as native windows programs.

It might also be the case that the git tools are implemented as just programs with no library components. I don't know, I haven't looked at the source, but I think they may not have separated the git functionality from the OS specific code in every git tool.

Every tool you make, if you ever want it to be multiplatform, you have to have one part that'll work anywhere and one clearly separated part that requires a specific platform to work.

To say the same thing thrice, you make an API which is the tool and a program that makes the tool available to users.

Karadoc ~~

I don't understand what you mean by a pure native git for windows. In what way would such a version be different to the current windows version?

Thomas Fjellstrom

If it helps, there is an effort underway to turn git into a library. Instead of the current blobs of code stuck in separate programs. So if someone really wanted to, they could then use that library to interface with git repos, say from a super friendly ui, perhaps even an IDE :o or an Explorer plugin :o

I think that's what people mean by "pure native windows".

Elias

f it helps, there is an effort underway to turn git into a library.

http://libgit2.github.com/

It's what is used by the link I gave (http://windows.github.com/). Which is a pure native Windows desktop application. So I'm not sure what everyone is talking about here. Anyway, git is a version control system, so by its very nature doesn't have anything to do with what OS it runs on.

MiquelFire

GitHub for Windows still uses msysGit to fill in the gaps.

bamccaig
Trezker said:

It might also be the case that the git tools are implemented as just programs with no library components. I don't know, I haven't looked at the source, but I think they may not have separated the git functionality from the OS specific code in every git tool.

Some of the commands are nothing more than shell scripts. :) In unices you don't notice any difference.

Trezker said:

Every tool you make, if you ever want it to be multiplatform, you have to have one part that'll work anywhere and one clearly separated part that requires a specific platform to work.

To say the same thing thrice, you make an API which is the tool and a program that makes the tool available to users.

That somewhat depends on whether or not there's any reusable code between parts. Take the bash scripts, for example. If you wanted to implement those commands using Windows with no UNIX-like compatibility layer then you wouldn't be able to reuse any of those programs. You'd basically have to implement a Windows-specific alternative from scratch.

The problem here is that Microsoft insists on doing everything differently, and poorly, requiring Windows ports to be completely different than other ports. Using a compatibility layer that will work on both platforms would likely degrade the performance of UNIX-like implementations (some things you just can't do in Windows, like fork()), or at the very least greatly complicate them. In short, fuck Windows. You should be happy to get anything. >:(

gnolam

Ah, yes, the ever wonderful "it's different from how UNIX does it, therefore it is bad" argument. ::)

Specter Phoenix

Back on topic of SFML v SDL v Allegro I think it comes down to how easy the API is to understand and learn as well as the amount of documentation or examples to look at.

Trezker

Since I started using github I have pointing a bunch of people to my repos when they ask for advice on a problem I have gone through in one of my projects. I wonder if anyone got some help from my code. I never got follow up questions, don't know if that's good or bad.

Elias

On github you can post questions to commits (or even to single lines of the source in a specific revision). I find that quite nice :) Although I never had an actual use for it.

Peter Wang

Great, another communication channel for me to ignore :-X

Elias

Well, sourceforge doesn't have that, and I think that's where our official git would live.

Bill Morris

Speaking of SourceForge, what percentages of new projects there do you guys think use Allegro vs. SDL vs. SFML? For total, I suppose Allegro has the advantage of having been around longer, and SDL would have the same advantage over SFML. So the question is about new projects.

Specter Phoenix

Well, I'm sad to say that I think SDL would have the biggest majority for the SF projects.

m c

Does SFML really not work on AMD?

I suppose SDL would also be the largest, I mean it was made for commercial game porting from windows to linux after all (loki games)

Specter Phoenix
m c said:

Does SFML really not work on AMD?

No clue. I tried using it once and had a headache by the time I was done. Though you could bypass most of the headaches and do:

using namespace std;
using namespace sfml;

Otherwise you get to have fun making sure you remember std:: and sfml:: in front of the proper functions all the time.

[REVISION]
Don't know why the code tags aren't working.

LennyLen

Don't know why the code tags aren't working.

Because it's </code>, not <\code>

Specter Phoenix
LennyLen said:

Because it's </code>, not <\code>

Not entirely sure how I managed that. Of course I keep flipping Cplusplus.com code tags and A.cc code tags around so that may be how I got it. cplusplus.com use [code][/code] while A.cc is < code></ code>. Didn't even notice I hit \ instead of / though. That is going to bug me for the rest of the day, wondering how I did that since both keys are nowhere near each other ???.

l j
m c said:

Does SFML really not work on AMD?

According to some forums 1.6 doesn't work properly with AMD cards.
However, 2.0 should support AMD properly.

Thread #610311. Printed from Allegro.cc