#9666 - IAMTHEEVILBEAN - Tue Aug 12, 2003 11:03 pm
was talking to one of my friends and he told me something at you can create graphics via C++ and animate them...Is this rue and if so do you know where i can learn how
_________________
Moose
#9670 - Mr. GBA - Wed Aug 13, 2003 9:21 am
You can use the visual c++ IDE to create images which are tailored right down to the pixel. However, it isn't posibile to combine images to create an animation. To create a new image: 1)Incorporate a resource file (i.e. Bitmap or icon) 2)Open it and edit the image and (3)if you wish to use it in your program, then be sure to explicitly include the resource file).
_________________
my dev/business site:
http://codebytesdev.afraid.org
#9753 - sajiimori - Sat Aug 16, 2003 5:34 am
C++ is a hard language, and it's not for beginners. It sounds like you probably have little or no experience with programming. If this is so, and you truly wish to develop for GBA, I'd suggest following these steps:
1) Learn BASIC. Search on amazon.com for a good book...check the user reviews. Sorry, I don't have a reccommendation.
2) Learn assembly language for some processor, such as x86 or ARM. No need to learn it backwards and forwards...just enough to do some basic operations. Remember that anything you can do in C or C++ you can do in assembly. Those languages just make many things easier to do. If you have a PC, get the book "The 8088 and 8086 Microprocessors".
3) Learn C. Get the "C Primer". Memorize it. Know C. Do many experiments. Try programming with SDL (www.libsdl.org). Write a version of pac-man or something else simple.
4) Optional: Learn C++. Get "Thinking in C++", which is a free book downloadable from www.bruceeckel.com, but I'd suggest buying a hard copy anyway.
5) Read the pern tutorials, the CowBite spec, and any other GBA material you can get your hands on.
6) Get Paint Shop Pro or similar to draw graphics, and write software to bring them to life.
Yes, it's hard work. If you're only interested in animating things, learn Macromedia Flash. It doesn't require real programming.
#10368 - marcmccann - Wed Sep 03, 2003 2:26 pm
Thats rubbish. I am 16 and STARTED with C++ when i was 14. I knew nothing of any other languages or programming. I just wanted to make games and did some research, saw C++ was the main language and picked up a book on it. Alright, Ive found it hard at times but everyone is different, I can now use C++ just as well (and maybe better may I dare to say it) than some people who have transisted from C and assembly.
Just for the record I use assembly and C as well but I learned them afterwards.
What i do suggest though is that you start out with a very basic compiler e.g Watcom C++ because the IDE's in borland and visual studio can be very distracting because their main focus is windows programming and they arent intended for beginners. Check out the price of them if you dont believe me!
_________________
The GBA is one Lean and Mean machine!
#10373 - funkeejeffou - Wed Sep 03, 2003 4:12 pm
I agree.
You can start directly in C, it is not hard understanding the basics but coding properly and efficiently takes time (there are many articles on the net about optimisations, read them). C++ is just a modified C and is a "fake" object language. Most games use C rather than C++ for speed, as C is "nearest" to the machine. ASM is really optional, but coding in this language makes you understand all C optimisations techniques (organisation of variables in RAM and aligning them, avoiding loops, why using pointers, prefering bitshifting rather than mul and divs, low parameter functiuns are betterand much much more...).
But the most important thing here is that I don't think that IAMTHEEVILBEAN was talking about that, maybe he knows C coding and was asking himself how to create graphics with an IDE...
#10404 - sajiimori - Thu Sep 04, 2003 7:31 am
marcmccann: No need to be hostile. I was just sharing my viewpoint. I'm glad things worked out for you.
funkeejeffou: Please explain how it is possible for C to be closer to the machine than C++, considering that C++ retains every low-level feature that C has.
Also, I think if somebody doesn't know the difference between an IDE an a language, then it's pretty obvious that they don't know much about programming. But hey, everybody starts as a beginner.
#10407 - funkeejeffou - Thu Sep 04, 2003 8:40 am
Quote: |
Please explain how it is possible for C to be closer to the machine than C++, considering that C++ retains every low-level feature that C has. |
By using the C++ routines and instructiuns.
C must be faster than C++ because Id software coders' say it(sounds dumb hun...), and I bet they know what they are talking about as their engine always exploits to its best the machines.
C was faster than C++ for sure some years back. Today, for a coder wich knows what he exactly does in C++, C++ will be as fast as C.
But I prefer C, it is more straightforward and you can do almost anything as well as simulating objects.
#10411 - marcmccann - Thu Sep 04, 2003 9:56 am
Sorry if i came across wrong sajiimori, i want trying to prove you to be wrong.
If there are any newbies that want to get into GBA development, the best book I have ever read is Game Programming all in one. It teaches you from the very beginning of C++ and by the end of the book you are programming DirectX! Although it is not a GBA book it teaches you the basic game programming fundamentals which will be more than priceless once you are comfortable programming a GBA.
Also I am thinking of setting up a web page which has tutorials on it, it will be geared towards beginners in c/c++ and vb and will cover tool writing in VB and game programming in C++ and C.
Sorry again sajiimori
_________________
The GBA is one Lean and Mean machine!
#10434 - tepples - Thu Sep 04, 2003 8:01 pm
A single-seat VB license would be too expensive for many novice programmers.
My setup: tool writing in C++ with MinGW, and GBA programming in C++ with DevKit Advance.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#10439 - sajiimori - Thu Sep 04, 2003 9:09 pm
funkeejeffou:
I also prefer C, but not because it's faster or lower level. I like it because I don't have to maintain so many headers (since it doesn't require prototypes for everything). ;-)
One of the most irritating things about doing a large project in C++ is when you're working on a module, and you have to go back and modify the header and recompile a dozen other modules, just because you changed the signature of a *private* method! And "Pimpl" just adds more code that is not related to what I'm trying to accomplish.
If a language is going to have static typing, inheritence, etc, it had better have a compiler that is smart enough to manage those features automatically. C++ adds those features, but the compilers are still as dumb as C compilers, only considering a single source file at a time.
Ok, enough ranting. Suffice to say I use a smarter language (C# or Python) when I don't need the efficiency of C.
#10450 - Lupin - Fri Sep 05, 2003 2:33 pm
I would love to see an new language coming up, maybe the time is going to be over for C++, I would love an new language wich is an mix of the power of C, the class-management of C++ and the simple syntax of VB ^^
#10454 - Sweex - Fri Sep 05, 2003 2:47 pm
Pascal? (with OO, delphi style)
...And there is C# nowadays...
_________________
If everything fails, read the manual: If even that fails, post on forum!
#10457 - Lupin - Fri Sep 05, 2003 4:16 pm
nah, none of the new languages is as simple to understand as VB, because VB handles all the memory management stuff for strings and arrays (in C++ you've to use these odd vector structs if you want arrays wich are really dynamic...) even though VB's memory management is a little bit scary :)
I don't think that VB is so slow because it uses an simple syntax or because it handles everything for you, it's just because the Authors of VB weren't interested in speed and they forgot some important features like inline asm (wich could be enabled by using an Add-In though), short operator notation (eg *=) and of course the missing inc/dec and shl shr equivalent operator :(
I'm really thinking of writing my own basic programming language without all these problems :), but I know like nothing about x86 programming. ARM ASM is much better though....
#10460 - tepples - Fri Sep 05, 2003 5:38 pm
It takes at least 200 hours to begin to learn Visual Basic. This includes the cost of working to earn money to pay the over-$1,000 one-seat license fee for the Microsoft VB compiler.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#10461 - Lupin - Fri Sep 05, 2003 6:59 pm
I dunno where you live, but you could get the "Microsoft Visual Basic.NET Std. 2003 CD" license for 135? here in germany (I'm sure as an student it'd be even less) - I just looked that up at amazon.de
#10469 - sajiimori - Fri Sep 05, 2003 11:22 pm
Lupin,
C# seems to meet the requirements you mentioned earlier.
You can use low-level features like pointer arithmetic (if you declare the class or method "unsafe"), just like C.
Obviously, it has the OO features of C++ (but without the cruft).
And like VB6, it runs in a managed environment with garbage collection.
I find C#'s syntax pleasant and useful, but that's a matter of preference. I happen to think VB has atrocious syntax.
If you decide you want some *really* low-level stuff like assembly code, you can import unmanaged .DLLs and call functions from your C# code.
Oh, and you can download the MS .NET tools for free (including C# and VB compilers), as long as you don't need a GUI. If you don't like MS (or don't use Windows), there's Mono as well.
#10576 - marcmccann - Tue Sep 09, 2003 1:49 pm
About this hoping for a new language business. The idea sounds nice and all but surely it would cause a lot of annoyance to developers as well as consumers.
Firstly c/c++ developers would be out of a job UNLESS they slaved away at learning yet another difficult programming language (And lets face it, to get efficiency and speed which is a requirement for todays games and graphical programs, you have to use a pretty low level language which are generally harder to learn and work with). The problem is that C and C++ have been the main languages for a long time and a lot of companies have invested in the tools in order to use them and so changing the languages would cost a lot of money and probably wouldnt happen!
The consumer would suffer due to the lack of experience with the programmers, no programmer will be perfect at the language for a long time and the quality of products will surely suffer.
If they released an upgrade of C++ such as C = C + 2(ha ha, c+++ cant be used remember!) and made the language in general more powerful, faster and easier to use it would be the sweetest thing since the sugarlump and its surely something to look forward to.
This is my opinion ny the way and I am not trying to impose it on anyone else.
_________________
The GBA is one Lean and Mean machine!
#10579 - Lupin - Tue Sep 09, 2003 2:49 pm
ok, but why should an low level language be hard to learn? Where's the difference between:
void Test(void) {
short bla;
}
and
Sub Test()
Dim bla As Integer
End Sub
I find the VB version much more simple... I just want to say, that it doesn't depend on the language, it depends on the compiler. So, everyone who says VB is an bad language - it's not! It just has an bad compiler :)
#10581 - sajiimori - Tue Sep 09, 2003 6:51 pm
Lupin:
Actually, I prefer C-style syntax regardless of the compiler. Even if there were a VB compiler that was highly portable, and produced the most fabulous output (comparable to the best optimized C compilers out there), I would still prefer the C syntax.
My preference has zero to do with the compiler, and everything to do with the language. In fact, I don't think your VB snippet is even easier to read than the C one. But as I said earlier, it's personal.
Edit: To answer your question about why low-level languages are often harder to learn, remember that the term "low-level" means that it corresponds more closely to the hardware. If you are not familiar with the hardware, or if you have trouble thinking in terms of the hardware, then it will typically be harder to learn.
But the most important difference between lower- and higher-level languages is not ease of learning. It's the trade-off between the productivity gained from not having to think about the hardware versus the efficiency lost because you aren't thinking about the hardware.
marcmccann:
You know, you're right. If a new language came out that was sort of like C++ except it had features such as garbage collection and reflection, nobody would use it because it would reduce productivity.
Oh wait, it already happened. Several years ago. It's called Java, and it's been quite successful. Ever heard of it?
#10713 - Omega81 - Sat Sep 13, 2003 5:10 am
sajiimori wrote: |
Oh wait, it already happened. Several years ago. It's called Java, and it's been quite successful. Ever heard of it? |
Java is not as powerful as C so it can't count. frankly I feel javas selling point is that it is platform independent. Apart from that it would not be so successful. I feel Java is a more application type language but C is more a Hardware and speed type language.
_________________
Keep it real, keep it Free, Keep it GNU
#10716 - sajiimori - Sat Sep 13, 2003 7:51 am
Excuse me Omega81, Java can't count as what exactly? marcmccann said that if a new language were developed as an alternative to C and C++, nobody would accept it. He says that a new language would only be accepted if it were "more powerful, faster and easier to use". Java is not necessarily any of those things for a given situation (though garbage collection could be viewed as powerful, development time could be faster, and the higher-level nature of the language might make it easier to use), but it's been highly successful anyway.
Quote: |
The problem is that C and C++ have been the main languages for a long time and a lot of companies have invested in the tools in order to use them and so changing the languages would cost a lot of money and probably wouldnt happen!
|
Obviously, it *has* happened for many developers, whether you think it "counts" or not.
#10733 - tepples - Sat Sep 13, 2003 3:49 pm
sajiimori wrote: |
Excuse me Omega81, Java can't count as what exactly? |
I think Java(tm) technology is said not to count because it's not well suited to writing device drivers. See, GBA programmers have to write their own device drivers, and any language that forces the programmer to remove herself too far from the hardware tends to just get in the way. In addition, Java platforms tend to have more memory than the GBA, which has only a 256 KB heap.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.
#10737 - sajiimori - Sat Sep 13, 2003 6:38 pm
tepples,
If marcmccann were specifically referring to gba, I would agree, but it didn't seem that way.
On the other hand, Java is currently one of the the most popular languages for developing games on mobile devices such as cell phones, which often have very limited memory. This probably only works out because these devices don't have such specialized graphical hardware, so direct hardware access isn't necessary.
#10803 - marcmccann - Tue Sep 16, 2003 1:21 pm
I wasnt just referring to any Platform. As for Java being used and accepted I cant disagree. However, ask yourselves, how long did it take for the technologies to be appreciated. Also Java is a very easy language to learn, the syntax is basically C++ with the hard parts removed. This is my opinion and i dont expect any of you to argue over it.
Also if java is so good I would love to see it be used for GBA development and stand the test of time. There was nothing before Java for it to replace. C++ on the other hand is the standard Multi-use language and I believe that a transition would be lengthy and gruelling time for developers as well as publishers.
Also you quoted a c++ code snippet compared to a vb code snippet. Could you have picked an easier example?? That is such basic code, as you should all know the hard things in c++ are anything but easy to learn.
_________________
The GBA is one Lean and Mean machine!
#10821 - sajiimori - Tue Sep 16, 2003 9:58 pm
Quote: |
...how long did it take for the technologies to be appreciated.
|
Compared to C++? Maybe the same, though it might be argued that C++ didn't really take off until Microsoft made it the standard language for developing Windows applications by releasing Visual C++ 1.0 in 1993, a decade after the inception of the language.
Compared to C? Much faster. C was introduced in 1973, and only spread as fast as Unix did initially. It only got really big after it began platform-hopping in the 80's.
Java was introduced in 1995, and was immediately put to use in Netscape Navigator, the standard browser of the time, becoming the standard language for interactive web applications. Honestly, I don't know of any other programming language in history that has spread so quickly. Can anybody offer a comparable example?
Quote: |
...if java is so good...
|
Hey, I never argued that it's particularly good! ;-) I just said that it's been accepted, despite the fact that it *is* a different language, though it may share a lot of syntax with C++.
Quote: |
There was nothing before Java for it to replace. C++ on the other hand is the standard Multi-use language and I believe that a transition would be lengthy and gruelling time for developers as well as publishers.
|
I don't understand your point. Are you saying that nobody has ever chosen Java over C++, or are you saying that Java doesn't completely replace C++? The former is obviously untrue. The latter is obviously true, but irrelevant because the only issue is whether anybody would move to a new language, not whether *everybody* would move to a new language.
Edit: I assume the comment about code snippets is directed at Lupin...? I agree that C++ is a bitch, to put it lightly. :-P
#12070 - Sharpfish - Tue Oct 28, 2003 10:34 pm
"If they released an upgrade of C++ such as C = C + 2(ha ha, c+++ cant be used remember!)"
Surely 'C+=2' would be snappier (and faster) ;) (C++ syntax)
#12071 - tepples - Tue Oct 28, 2003 11:06 pm
how about (C++)++? how about putting those pairs of plus signs on top of each other:
++
++
No wait, that looks like a # sign, as in Microsoft's C# language.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.