Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Allegro's relevance makes me happy

This thread is locked; no one can reply to it. rss feed Print
 1   2   3   4 
Allegro's relevance makes me happy
Kris Asick
Member #1,424
July 2001

I'd personally turn it into a static library. And share the library between projects, so you don't have to maintain several different copies.

I've had bad experiences with sharing libraries like that, since if you update the library for a current project, then go back and work on a previous project, you may've broken the functionality of the library for that particular project. As such, I prefer to maintain separate versions for each of the projects I work on, which is fine since I rarely work on more than one project at a time anymore.

Dizzy Egg said:

I dunno....C++ is more helpful after a couple of weeks solid practice...I say if you're good in C go C++, it's 2013.

The thing I like about C and C++ is that they mix together harmoniously. ;D

I mean, my programming style is basically what you would get if you took C and simplified it using C++ interfaces and adding a little OOP in the process, but not a lot. Just enough to sort things out better.

I comment the heck out of my code anyways. Not just for my own sake if I go a period of time without coding because I'm working on other aspects of a project, but also to remind myself what I'm trying to do with certain parts of my code.

All that said, if I need some quick calculations or algorithms tested, I still resort to QBASIC. ::)

--- Kris Asick (Gemini)
--- http://www.pixelships.com

Paul whoknows
Member #5,081
September 2004
avatar

Why do people still insist on using C++ instead of just plain C?

OOP? there is not good reason not to use it. While OOP is perfectly possible in C, it's just not the right tool for the job ;D

____

"The unlimited potential has been replaced by the concrete reality of what I programmed today." - Jordan Mechner.

Matthew Leverton
Supreme Loser
January 1999
avatar

2.8 Million page views at a.cc over the last 12 months.

The most popular thread continues to be no contest, working its way up to the sixth most visited page on the entire site. So relevance? That page alone potentially helped 45,207 people.

Here's where a little marketing comes in to play. If I were to actually explain what Allegro is on that page, there's 45K possible new Allegro users. 8-)

Bruce, where's that tune I asked for? >:(

Thomas Fjellstrom
Member #476
June 2000
avatar

I've had bad experiences with sharing libraries like that, since if you update the library for a current project, then go back and work on a previous project, you may've broken the functionality of the library for that particular project.

Testing FTW.

I find it far more annoying to deal with varying versions of the same code. I end up expecting something to be in the shared code, but it isn't since It didn't get added to this copy and it annoys the crap out of me :P

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Hmm. I build all my useful code into libraries and then install and link with them for my other projects. #include "Eagle5.hpp"

And yeah, I think Allegro is still very relevant. 5.1 is making some nice strides. Shaders, video, cool stuff.

Yodhe23
Member #8,726
June 2007

I have used/learnt to use Allegro since the late 90's, and I am amazed how it continues to "grow/evolve".
I think its endurance in the fleeting world of computer technology say tomes about it, and the community it attracts/nourishes.
I've spent five years of my life writing a turn based strategy squad game with Allegro(4), and it has brought me an immense sense of satisfaction as I have been able to manifest a childhood dream to write my own (half-decent, in my eyes) game.
Simply THANKS.

www.justanotherturn.com

beoran
Member #12,636
March 2011

@furinkan
I've been using C++ as a professional programmer, and my experience is that all in all, it's one step forward and one step back over C. So I want to use classes to organize my code, but to do the memory management now I have to use virtual destructors, constructors, exceptions, templates... And C isn't a subset of C++. It's weaker typing means you can do many things that will give you warnings or errors in C++. So, I choose C as that that works best for me, and gives me the least complexity headaches.

As for OOP, I also use objects, in languages that are truly OO, like, say Ruby (or smalltalk, or objective C). C++ isn't OO, just ask Alan Kay who invented the term: http://programmers.stackexchange.com/questions/46592/so-what-did-alan-kay-really-mean-by-the-term-object-oriented. C++'s classes are simply suitable for proper OO. And the problem is most people don't even realize it!

In fact, I'd love to be able to use Objective C, to get C with real OOP, but unfortunately when last investigated, there seemed to be problems with the portability, and the license of the Objective C library (Gnustep). But I'll be using mruby as the scripring language so I'll be able to program the higher level part of the game in a proper OOP language. And binding with mruby language is IMO much easier with C than with C++.

So, I do have my reasons, but I'm well aware others may not agree. To each their own. :)

Mark Oates
Member #1,146
March 2001
avatar

And yeah, I think Allegro is still very relevant. 5.1 is making some nice strides. Shaders, video, cool stuff.

I think adding touch input is a particularly bold move. :)

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

beoran
Member #12,636
March 2011

More on topic, I'd love to contribute force feedback to Allegro, but to be honest my own project takes priority, so it will be a while before I get anywhere with it.

Johan Halmén
Member #1,550
September 2001

Why do people still insist on using C++ instead of just plain C?

Hahahaha! It worked 8-)
Still waiting for the religious and the football sidetracks.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Years of thorough research have revealed that the red "x" that closes a window, really isn't red, but white on red background.

Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest.

james_lohr
Member #1,947
February 2002

That's the biggest issue with Allegro. C and C++ are dated, and the bindings for modern languages (e.g. C#) are crappy compared to stuff that was actually built for modern languages (e.g. OpenTK for C#, or Libgdx for Java).

It's taken me 15 years as a programmer to appreciate what clean code is really about, and C/C++ makes it far too much effort to maintain cleanliness.

bamccaig
Member #7,536
July 2006
avatar

I've had bad experiences with sharing libraries like that, since if you update the library for a current project, then go back and work on a previous project, you may've broken the functionality of the library for that particular project. As such, I prefer to maintain separate versions for each of the projects I work on, which is fine since I rarely work on more than one project at a time anymore.

I think you're doing it wrong if the semantics of a function change like that. :P A function should do one thing and the outcome should be well defined in all cases. If you need a similar function with different semantics then it's a different function and should be named differently.

If a previous game happens to work around a bug before it was discovered then I can see it breaking the previous game, but that will only affect the game if the game is rebuilt against the newer version of the library. You can have multiple versions of the same library (even dynamically linked, let alone statically linked). :P If you decide that you need newer functionality from the library in the old game then it's time to remove the workarounds in the old game for the now fixed bugs. The important thing is that going forward all bug fixes for the shared code are in one place.

At j0rb I introduced "class libraries" in an attempt to begin sharing code between projects to save us time and effort. The brillant(tm) team leader started copying/pasting the class library project into every program "solution". So now we have 3 or 4 copies of the library and each of them has diverged. Why would you do that?! It baffles the mind! Now we never really know how the semantics of the library work because they're different in each project. It doesn't help that the semantics are changed willy-nilly without an understanding of why they were the way they were in the first place... Ugh.

Thomas Fjellstrom
Member #476
June 2000
avatar

I just have to say, ObjC and its runtime is absolutely horrible. Especially how it treats nil. Don't get me started >:(

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Bruce Perry
Member #270
April 2000

You could start a company of your own, and be the team leader yourself :)

I've spent all weekend trying to get GDC to work instead of DMD. I've now given up. DMD produces slower code than GDC, but it also produces a much smaller executable, and it works. I've decided to buy the DMD runtime library source and fix the one bug that prompted all this. Now I'm waiting for the automated download instructions, and beginning to think they're probably not automated. What a waste of time!

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Bob Keane
Member #7,342
June 2006

ML said:

The most popular thread continues to be no contest,

What now? I have not seriously used Allegro, but from what I've seen, it is not irrelavent. Think of how bogged down your programs would be without Allegro's drawing routines.

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
"Love thy neighbor as much as you love yourself means be nice to the people next door. Everyone else can go to hell. Missy Cooper.
The advantage to learning something on your own is that there is no one there to tell you something can't be done.

Matthew Leverton
Supreme Loser
January 1999
avatar

ObjC and its runtime is absolutely horrible. Especially how it treats nil.

// valid:
    NSObject *obj = nil;
    [obj performSelector:@selector(wtf_I_am_nothing)];

// crash:
    NSArray *array = [[NSArray alloc] init];
    if ([array objectAtIndex:0] == nil) { }

Bob Keane said:

What now? I have not seriously used Allegro, but from what I've seen, it is not irrelavent.

I'm saying without Allegro, this site wouldn't exist, and those poor fellows would have never found your thread to get the help they needed to launch their careers as excellent software engineers.

Specter Phoenix
Member #1,425
July 2001
avatar

Dizzy Egg said:

Allegro 5 makes me sexually aroused; I'm not sure if that helps anyone.

/me puts chasity belt on A5.

I learned ... and then I learned ... errr.. yeah!

Fishcake
Member #8,704
June 2007
avatar

// valid:
    NSObject *obj = nil;
    [obj performSelector:@selector(wtf_I_am_nothing)];

// crash:
    NSArray *array = [[NSArray alloc] init];
    if ([array objectAtIndex:0] == nil) { }

I personally like the first one. Having used Objective-C for a year, I grew to hate having to check if an object is null before calling a method. :P As for the second one, isn't it the same case for C++?

// crash:
vector<MyClass *> array;
if (array.at(0) == NULL) { } // throws an out_of_range exception 

// But..
if (array[0] == NULL) { } // undefined according to cplusplus.com

And how is it better to have the array return nil/NULL in this situation?

Matthew Leverton
Supreme Loser
January 1999
avatar

Fishcake said:

And how is it better to have the array return nil/NULL in this situation?

It's inconsistent behavior. If the array somehow got nil'd out it would not crash. But if the array exists and is empty, it does crash. I fully understand the technical reasons of the behavior, but the split personality can be maddening.

Thomas Fjellstrom
Member #476
June 2000
avatar

// crash:
    NSArray *array = [[NSArray alloc] init];
    if ([array objectAtIndex:0] == nil) { }

Actually, that's an exception which you can catch and ignore if you see fit.

But yes, it is really annoying. Also annoying is that you can't store actual nil values in containers. Instead you have to deal with NSNull, so now you have to check for nil, AND [NSNull null].... Which is maddening.

Fishcake said:

I personally like the first one.

I hate you.

It's a horrible idea. It papers over fatal errors as if they don't exist, and its hard to track down what went wrong.

NULL/nil values should crash when you try to dereference them. period. It is the only sane option.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

bamccaig said:

At j0rb I introduced "class libraries" in an attempt to begin sharing code between projects to save us time and effort. The brillant(tm) team leader started copying/pasting the class library project into every program "solution". So now we have 3 or 4 copies of the library and each of them has diverged. Why would you do that?! It baffles the mind! Now we never really know how the semantics of the library work because they're different in each project. It doesn't help that the semantics are changed willy-nilly without an understanding of why they were the way they were in the first place... Ugh.

Hahaha that would make a nice daily WTF. 4 versions of the same library. Nice.

Matthew Leverton
Supreme Loser
January 1999
avatar

Actually, that's an exception which you can catch and ignore if you see fit.

The nil messaging behavior reminds me of this classic from Visual Basic:

ON ERROR RESUME NEXT

???

Thomas Fjellstrom
Member #476
June 2000
avatar

Heh. Yeah. I don't even.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Bruce Perry
Member #270
April 2000

int checkPassword(String password) {
  try {
    if (password != "bacon")
      throw new SecurityException("invalid username or pasword");

  }finally
  {
    return 0; //fix for reutrn at end of method error
    }
}

...

What? I'm sure this code exists somewhere.

Oh and the stuff I bought came through :) Must ... do ... housework ... ARGH CAN'T RESIST DMD <3 T_T ... work ... tomorrow ... BUT DMD T_T ... :'( [EDIT: slight correction: it's actually the DMC runtime library I bought the source for. The DMD one is open source :) ]

I forgot Matthew wanted an uplifting song! Here:

video

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

amarillion
Member #940
January 2001
avatar

By the way, the fact that I can write my code in D these days (having now used Java a lot and realised just how much time C and C++ waste) makes Allegro even better.

I feel the same way. I've started playing with D + allegro 5 now.

One day you wake up, and suddenly you realise what an abomination C++ really is :D

 1   2   3   4 


Go to: