Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / General Programming / Do you ever use other peoples code? Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Jaap Suter

August 23, 1999, 05:48 PM

Hi,

I'm wondering. Do you ever use other peoples code or are we all a bunch of freaks to scary to trust eachother so we hack everything together ourselfs :). I'm starting to believe I'm such a freak.

Therefor I got the following questions.

Currently I'm in the design phase of an open source game programming library and I want to know what it should look like so you would use it.

What do you like about Allegro, directX, openGL, Glide or any other API/Library?
And what didn't you like?
What features should definitely be in it besides:
All the standard 2d Drawing primitives
Sprite and Blit functions
Bitmap Loaders
A Graphical User Interface
Input handling
Sound
Networking
A 3D engine
A scripting language
A console
????

I would like to create something that isn't going to be used by me alone. So therefor I would like all your suggestions.

Thanks

Jaap Suter

 
Jan Niestadt

August 24, 1999, 09:08 AM

Jaap Suter wrote:
>>I'm wondering. Do you ever use other peoples code or are we all a bunch of freaks
>>to scary to trust eachother so we hack everything together ourselfs :).

Most programmers are control freaks: I want complete control over every aspect of my projects.
So if I ever use other people's code, it's only because of one of these reasons:
1. I fully understand the underlying code and could program it myself without any research or thinking.
2. It's pretty complete and it's guaranteed to be supported for a long time (i.e. DirectX)
3. I don't want to, but have to because I'm working in a team with the other guy ;-)

(of course I *do* learn from other people's code and then adapt it or write my own)

So it's very hard to get people to use your code, even if they could save time with it.
It's perhaps most important to make the code easy to use (the time investment should be as small as possible).
Open source is a good step towards (1), especially if the code is well documented (not just commented, but with separate doc files explaining the architecture)

>>What do you like about Allegro, directX, openGL, Glide or any other API/Library?
>>And what didn't you like?

I only use DirectX.
I disklike all low-level stuff:
- The lack of pixel format support functions (i.e. Color(r,g,b) converts rgb to the right pixelformat)
- Having to restore lost surfaces
- Having to put in code for windowed apps
- Having to take into account desktop mode switches
- Differences between vidmem and sysmem (i.e. the library should figure out where to allocate things)
etc.

My current DirectDraw wrapper takes care of most of these things for me, but it cost me a few weeks to perfect.

 
Bryan Moodie

August 24, 1999, 10:25 AM

Hey Jaap,

>>I'm wondering. Do you ever use other peoples code or are we all a bunch of freaks to scary to trust eachother so we hack everything together ourselfs :). I'm starting to believe I'm such a freak.

Well I just got out of bed at midnight, so don't worry about the freak thing. :)
(working on heaps of assignments has got my hours screwed)

I think what most programmers like is to have the tedious work done using
simple functions, yet still have the ability to control exactly what is happening.

>>I would like to create something that isn't going to be used by me alone. So therefor I would like all your suggestions.

I've coded in DOS, MGL, MacOS, and written a DOS based library.
So here is a list of features I would like:
- Keep it simple to use (easy to get a gfx window in MacOS & MGL, hard in Win)
- Same code for fullscreen/window
- Run-time image conversion
- Not too closely linked to a specific platform (Win/X/Mac)
- Gfx/Input/Network/Sound as independent components

-Bry

 
Jaap Suter

August 24, 1999, 05:54 PM

Funny that all features you mention I already had planned.

I don't know about the multiplatform thingy yet but for the rest:

Automatic Pixel Format conversions
No difference between windowed and full screen mode
etc.

It will definitely be in there.

Jaap Suter

 
Greg Magarshak

September 07, 1999, 10:35 PM

Jaap Suter recently scribed:
>I'm wondering. Do you ever use other peoples code or are we all a bunch of freaks
>to scary to trust eachother so we hack everything together ourselfs :).

Yep, freaks seems appropriate ;)
Personally, I'd use something if it would save me a whole lot of time while still
letting me do what I want without having to spend even more time figuring out how
to do it. It's a trade-off between not having to write all the underlying stuff
yourself, and not having to grapple with the exposed functionality until you trick
it into doing what you want.

>What do you like about Allegro, directX, openGL, Glide or any other API/Library?
>And what didn't you like?
I believe strongly that Allegro is an awesome graphics library for anyone making
games in DOS. Sure, it has great sound, input, etc... but I've only really used
the graphics part sofar, and it rocks :-)
Allegro makes it easy to do anything you could conceivably want with graphics,
all the while throwing in optimizations and good design. :-)

DirectX is supported by a whole bunch of hardware, and it lets you do great things.
Sure, everyone hates the API (compared to, say, OpenGL), but with a good wrapper
it doesn't matter what API you use. For example, engines like OGE, Genesis3D, etc.
make use of DirectX, and you can just use them without worrying about things like
rendering triangle fans with phong shading.
Personally, though, I would much prefer OpenGL over DirectX.
Glide is cool, but it's a one-hardware-platform thing, so I wouldn't really bother
using it if I could get away with it. And I can, by using DirectX ;)

By the way, I'm writing a 3D engine for DOS. I'm using Allegro for all the 2D stuff,
and my engine takes care of all 3D stuff (polys, collision detection, rooms, portals,
dynamic lighting, radiosity, etc. etc.) ... far from finished, but you can download
a demo at http://members.aol.com/intermagic/presto2.zip

Now that I've discovered Crystal Space, though, I am am starting to wonder whether
I should continue reinventing the wheel for the sake of being able to scream "YEAH!
I CREATED ALL OF IT! I KNOW THE INS AND OUTS OF 3D RENDERING! WOO HOO!!" ... not
that it wouldn't be nice, of course.
Once I finish my engine, it would be pretty easy to port to any platform, since
the 3D code is resolution-independent. But, Crystal Space is already on so many
platforms, and it's pretty far ahead of my engine... even if I did catch up,
(unlikely, since I would probably have to out-code at least 5 people working
at the same time on the core engine), I would still have to make it stable enough,
and port it to other platforms. To do that I would have to research 2D graphics
on each platform (does VESA exist on the Mac? etc.) which is a large bit of work!

I have a feeling that once I'll get acquainted with Crystal Space, I'll start to
love it as much as I do Allegro. But I will need to be able to implement and/or use
collision detection, a good entity model, etc.

Sincerely,
Greg

 
realtimeddd

September 20, 1999, 04:18 PM



Jaap Suter wrote:
>>Hi,
>>
>>I'm wondering. Do you ever use other peoples code or are we all a bunch of freaks to scary to trust eachother so we hack everything together ourselfs :). I'm starting to believe I'm such a freak.

Haven't you ever heard the quote (by unknown):

"Good programmers write good code. Great programmers steal good code."

I like the others who have replied tend to be the former rather than the latter.


 
This thread contains 6 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.