Jump to content
  • Advertisement
Sign in to follow this  
alexxzius

applet troubles (wanna try C/C++)

This topic is 4135 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

ok, seems like the first thing to do is to get Allegro library. So i did; installed it through my Dev-C++ but it still says that it cant locate allegro.h and its functions. [ramble] Im kinda been programming in Java which is not such a pain in an *** (dont have pointers which as everyone knows are pointless). Wanna know if its worth it to switch to C. I know Java says that its "multiplatform" except people who gonna play yo game will have to download 13MB of virtual machine and other java stuff. I suppose that C creates .exe files instead of .jar or .jnlp which is more portable, so here is one advantage. Plus im having trouble writing files in Java since its so secure . . . But the game that i wanna write will require a 60x2000 array of bytes and since c/c++ is a memory hog, i dont know if its possible. Just wanna know if its worth it since the problems will just keep on piling up and ive solved some while doing games in java. [/ramble] Anyways, need a concise step-by-step tutorial on how to make my compiler recognize Allegro. [Edited by - alexxzius on June 24, 2007 11:38:03 AM]

Share this post


Link to post
Share on other sites
Advertisement
You are startlingly misinformed about... most everything. I know nothing about Allegro, so I won't be much help there, but:

Quote:
dont have pointers which as everyone knows are pointless

Just because you don't know how to use them doesn't make them pointless. Direct memory access (pointers) is one of the things that makes low-level languages (like C) so powerful and fast. It also makes them more difficult to learn, and more prone to errors. It's an advanced feature, not pointless.

Quote:
I suppose that C creates .exe files instead of .jar or .jnlp which is more portable

... maybe I misunderstand what you're trying to say here. An executable is about the least portable file format there is, since it's built particularly for a specific piece of hardware. A .jar file is platform-independent, meaning (theoretically) that it is the ultimate portable format: the exact same file should run on any Java-supported hardware with no changes.

Quote:
But the game that i wanna write will require a 60x2000 array of bytes and since c/c++ is a memory hog, i dont know if its possible.

Huh? Are you confusing the two languages? Java uses a special runtime, which requires extra memory. C/C++ compiles to an executable that does not require a runtime, making C/C++ less of a memory hog.

And a 60x2000 array of bytes is only 117k... an eight of a megabyte, the equivalent of a small (approx 170x170) bitmap image. That's not at all memory intensive.

Good luck with your Allegro setup... like I said, I can't really help there. But you should do a bit less rambling and a bit more fact checking when bitching about language selection. C is a pain in the ass for many reasons, but none of which you listed here.

Share this post


Link to post
Share on other sites
Quote:
Original post by alexxzius
... But the game that i wanna write will require a 60x2000 array of bytes and since c/c++ is a memory hog, i dont know if its possible...


What? that doesn't make any sence, who told you that, or what do you mean?

Share this post


Link to post
Share on other sites
Have you add the path to allegro folder?
I don't know anything about allegro, but it seems it is common problem from people starting c++.

Share this post


Link to post
Share on other sites
I won't rehash what the others have said, but I'll try and help. I found this thread the has a post describing a pretty good step-by-step procedure install allegro on dev-cpp. Hope it helps.

Share this post


Link to post
Share on other sites
Quote:
Original post by alexxzius
dont have pointers which as everyone knows are pointless


When I first read this I thought you were just trying to be clever. I chuckled, but I'm a sucker for bad puns [lol].

Anyway, if you're at all serious about C++ development, get yourself a decent IDE. Dev-C++ is outdated and no longer being updated. I suggest MS Visual Studio 2005. The express edition is free, and pretty kick-ass in terms of features.

Share this post


Link to post
Share on other sites
Quote:
Original post by ExcessNeo
Quote:
Original post by alexxzius
dont have pointers which as everyone knows are pointless


Are you kidding?


Serously pointers aren't pointless. You should get to know them before you pre judge they make everything easier and better. Give you more control over memory and allow to do a ton of stuff.

Share this post


Link to post
Share on other sites
Quote:

dont have pointers which as everyone knows are pointless

This is far from truth. It can be very difficault to manipulate
a string directly, for example, without pointers.

Memory allocation is impossible without pointers.

Not using pointers (or refrences) when passing objects to routines
can cause dramatic slowness because of its heavy use of the stack.

It is impossible to do almost anything low level without them.
(ie, memory access, assembly, etc...)

File handling is done either directly or indirectly by file pointers.

Im sure other members here can add more to this list[smile]
Quote:

I suppose that C creates .exe files instead of .jar or .jnlp which is more portable, so here is one advantage.

This is not entirely true. C (and C++) compiliers do not generate
executable files, only object files. For example, Elf, coff, obj, etc..

The Linker generates the executable file. The format might not
even be EXEs. It depends on what platform you are developing for.

Quote:

But the game that i wanna write will require a 60x2000 array of bytes and since c/c++ is a memory hog

If this was true, I dont think C or C++ would be used in game development.
The only libraries linked into C and C++ are the libraries that you use, and
no more.

Also, if you never use pointers, the array of bytes will be on the stack,
not the heap.

Quote:

"C/C++" does not really exist.

I type "C/C++" as a force of habit--representing either C or C++; not both[smile]

Hope this helps.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!