Getting started with programming again/

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Mugworm_Griblick
Moderator
Moderator
Posts: 974
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Fri Aug 16, 2002 7:12 pm
Location: afghanistan
Has thanked: 0
Been thanked: 0
Contact:

Getting started with programming again/

Post by Mugworm_Griblick »

I wanna get into game development. What are the best languages/compilers to get the job done? I'm not new to programming (I know a moderate amount of c, c++, html, java) but not much beyond that.
Image

?@ Cheatah? whats the thing called that you plug things into, the power socket?

<Dilbert> Cheatah
<Dilbert> have you heard the jokes they dont tell fags?
?@ Cheatah? no
OneThirty8
Damn Dirty Ape
Damn Dirty Ape
Posts: 5031
Joined: Thu Nov 07, 2002 11:11 pm
Location: Saugerties, NY
Has thanked: 0
Been thanked: 0

Re: Getting started with programming again/

Post by OneThirty8 »

Assuming you're talking about development of Dreamcast games... Best languages are C and C++. Best compiler is GCC 3.4.x (I believe I use 3.4.1). You'll also want KOS and some of the other add-on libraries for it. If you're a Windows user, check out the DCDev ISO. Otherwise, check out http://gamedev.allusion.net/softprj/kos/setup.php
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5660
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Getting started with programming again/

Post by BlueCrab »

OneThirty8 wrote:Best compiler is GCC 3.4.x (I believe I use 3.4.1).
These days, actually, GCC 4.4.x might be a better bet. I've been using 4.4.0 for a while now without any issues (other than the batch of them that I fixed in the repo right when I switched to using 4.4.0). Also, IIRC, 3.4.x versions less than 3.4.3 were not suitable for use due to a rather major bug that got fixed around that time. Anyway, I'd say either 4.4.x or 3.4.6 would be your best bets.
User avatar
not just souLLy now
DCEmu Respected
DCEmu Respected
Posts: 4070
Joined: Sun Jun 13, 2004 5:53 pm
Location: UK
Has thanked: 2 times
Been thanked: 3 times

Re: Getting started with programming again/

Post by not just souLLy now »

Objective C!
User avatar
Neoblast
DC Developer
DC Developer
Posts: 314
Joined: Sat Dec 01, 2007 8:51 am
Has thanked: 3 times
Been thanked: 1 time

Re: Getting started with programming again/

Post by Neoblast »

Objective C is a nightmare...
They force iphone developers to use it, you should at least have a choice, or just use C/C++.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5660
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Getting started with programming again/

Post by BlueCrab »

Neoblast wrote:Objective C is a nightmare...
They force iphone developers to use it, you should at least have a choice, or just use C/C++.
The only thing you have to use Objective C for, much like GUI programming with Cocoa on Mac OS X, is for interacting with the GUI. Main program logic can be in C or C++.

That said, I actually kinda like Objective C a bit more than C++...
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Getting started with programming again/

Post by Chilly Willy »

BlueCrab wrote:
OneThirty8 wrote:Best compiler is GCC 3.4.x (I believe I use 3.4.1).
These days, actually, GCC 4.4.x might be a better bet. I've been using 4.4.0 for a while now without any issues (other than the batch of them that I fixed in the repo right when I switched to using 4.4.0).
Sorry to bump this, but I just recently updated to Xubuntu 10.4 and rather than just copy the toolchain and KOS over, I'm rebuilding from scratch. Is the latest KOS in the base of the repo, or the 1.3.x branch?
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5660
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Getting started with programming again/

Post by BlueCrab »

Use the trunk. That 1.3.x branch was created a long time ago and never really has been touched since then.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Getting started with programming again/

Post by Chilly Willy »

That's what I thought, but I thought I'd better ask to be sure. Thanks. :mrgreen:
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Getting started with programming again/

Post by Ex-Cyber »

Neoblast wrote:Objective C is a nightmare...
They force iphone developers to use it, you should at least have a choice, or just use C/C++.
IIRC, developers are allowed to use C, C++, and/or Objective-C. Reportedly, any other actual code language is not allowed (unless you count JavaScript on WebKit), even if it compiles to one of the allowed languages.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
cube_b3
Ex-Newsposter
Ex-Newsposter
Posts: 4038
Joined: Tue May 28, 2002 6:51 am
Location: pakistan,karachi
Has thanked: 13 times
Been thanked: 6 times
Contact:

Re: Getting started with programming again/

Post by cube_b3 »

How useful is HTML in game designing?
Ex-Cyber
DCEmu User with No Life
DCEmu User with No Life
Posts: 3641
Joined: Sat Feb 16, 2002 1:55 pm
Has thanked: 0
Been thanked: 0

Re: Getting started with programming again/

Post by Ex-Cyber »

BILAL_XIA wrote:How useful is HTML in game designing?
HTML5+JavaScript can do more than you probably think it can. There's even an NES emulator (which I won't link because it has ROMs on the site), though that's arguably not an optimal use of the APIs.
"You know, I have a great, wonderful, really original method of teaching antitrust law, and it kept 80 percent of the students awake. They learned things. It was fabulous." -- Justice Stephen Breyer
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5660
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Getting started with programming again/

Post by BlueCrab »

Just in case anyone's trying to build a new toolchain for the Dreamcast, I've noticed that (at least on my machine), GCC 4.5.0 fails to build properly for sh-elf. I'd be interested to see if anyone else can recreate the issue (and possibly confirm it on the GCC bugzilla). Here's the bugzilla report if anyone cares to try: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44531

Also, for reference, I was using binutils 2.20.1, and a clean GCC 4.5.0 (with no patches applied, since I was only trying to build the 1st pass of the compiler when I ran into that issue). I'd appreciate it if anyone could try building on a different system (Linux, Cygwin, etc) and see if they can recreate the issue there (I'm building on a 64-bit Mac OS X 10.6.3).
nymus
DC Developer
DC Developer
Posts: 968
Joined: Tue Feb 11, 2003 4:12 pm
Location: In a Dream
Has thanked: 5 times
Been thanked: 6 times

Re: Getting started with programming again/

Post by nymus »

gcc-4.5.0 won't compile on my openSUSE 11.2 because my latest MPC library/dev is 0.7.x whereas it wants 0.8.

I'm wondering if the reason you can't get m4 et al is because you specified --with-cpu=m4-single-ony? If gcc-4.4. worked that way, then I guess my interpretation of the option is incorrect...

(I would expect m4-single-only to exclude m4)
behold the mind
inspired by Dreamcast
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5660
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Getting started with programming again/

Post by BlueCrab »

--with-cpu=m4-single-only specifies what the default will be if nothing is specified. That's how GCC 4.4.x worked anyway, and the documentation hasn't changed of it.

The --with-multilib-list specifies which targets to support in general.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Getting started with programming again/

Post by Chilly Willy »

Do you have new patches? I've just got patches for binutils 2.19.1, newlib 1.15.0, and gcc 4.4.0.
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5660
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Getting started with programming again/

Post by BlueCrab »

Well, for what I tried to do with that, newlib never got built (so no newlib patch). Also, I never have patched binutils (thus no binutils patch). Since I wasn't building the 2nd stage (C++) compiler, I didn't need to patch GCC at all with 4.5.0.

I intend to (in the next few days), put up the patches that I have for GCC 4.4.4 and Newlib 1.18.0. That said, its not terribly hard to manually apply the earlier version patches (which is basically what I did). The GCC patch for 4.4.0 basically can be applied as is to 4.4.4 (as long as you aren't trying to do something silly like add support for C++0x threads (yes, I have a patch that should do that, but its untested)). Newlib required a little bit more work, but nothing too drastic.
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Getting started with programming again/

Post by Chilly Willy »

BlueCrab wrote:Well, for what I tried to do with that, newlib never got built (so no newlib patch). Also, I never have patched binutils (thus no binutils patch). Since I wasn't building the 2nd stage (C++) compiler, I didn't need to patch GCC at all with 4.5.0.
The patch for binutils was for the ARM binutils - there was a bug in 2.19 that didn't compile for ARM without changes (found it on a site for the NDS after looking around when 2.19 failed in the ARM pass). Maybe it's fixed in 2.20. I'd need a patch for gcc since some of the things I'll be working on are c++ - I don't like working in c++, but if a project is already in c++, there's not much you can do. :cry:

I intend to (in the next few days), put up the patches that I have for GCC 4.4.4 and Newlib 1.18.0. That said, its not terribly hard to manually apply the earlier version patches (which is basically what I did). The GCC patch for 4.4.0 basically can be applied as is to 4.4.4 (as long as you aren't trying to do something silly like add support for C++0x threads (yes, I have a patch that should do that, but its untested)). Newlib required a little bit more work, but nothing too drastic.
I'll wait for those patches, but try building the 4.5.0 in the meantime just to see what happens. I'm in Xubuntu 10.4 (32 bit). In the end, I'd prefer to have the same versions as what you use since you're the one the maintenance on the KOS repo lately. :grin:
User avatar
BlueCrab
The Crabby Overlord
The Crabby Overlord
Posts: 5660
Joined: Mon May 27, 2002 11:31 am
Location: Sailing the Skies of Arcadia
Has thanked: 9 times
Been thanked: 69 times
Contact:

Re: Getting started with programming again/

Post by BlueCrab »

Chilly Willy wrote:
BlueCrab wrote:Well, for what I tried to do with that, newlib never got built (so no newlib patch). Also, I never have patched binutils (thus no binutils patch). Since I wasn't building the 2nd stage (C++) compiler, I didn't need to patch GCC at all with 4.5.0.
The patch for binutils was for the ARM binutils - there was a bug in 2.19 that didn't compile for ARM without changes (found it on a site for the NDS after looking around when 2.19 failed in the ARM pass). Maybe it's fixed in 2.20. I'd need a patch for gcc since some of the things I'll be working on are c++ - I don't like working in c++, but if a project is already in c++, there's not much you can do. :cry:
I didn't have any trouble using 2.20.1 for ARM... So, I suppose its not needed.

I intend to (in the next few days), put up the patches that I have for GCC 4.4.4 and Newlib 1.18.0. That said, its not terribly hard to manually apply the earlier version patches (which is basically what I did). The GCC patch for 4.4.0 basically can be applied as is to 4.4.4 (as long as you aren't trying to do something silly like add support for C++0x threads (yes, I have a patch that should do that, but its untested)). Newlib required a little bit more work, but nothing too drastic.
I'll wait for those patches, but try building the 4.5.0 in the meantime just to see what happens. I'm in Xubuntu 10.4 (32 bit). In the end, I'd prefer to have the same versions as what you use since you're the one the maintenance on the KOS repo lately. :grin:
Well, I'm really interested to see if anyone can get 4.5.0 to build properly, since I can't seem to make it work. I'll try to commit the patches for GCC 4.4.4 and Newlib 1.18.0 to the KOS repo (in the dc-chain stuff in there) tomorrow, but I can't promise that I'll be able to do so...

That said, the only reason I was even trying to build a new toolchain is because I recently got a new computer, and hadn't built a toolchain on it yet...
Chilly Willy
DC Developer
DC Developer
Posts: 414
Joined: Thu Aug 20, 2009 11:00 am
Has thanked: 0
Been thanked: 2 times

Re: Getting started with programming again/

Post by Chilly Willy »

That's the way I usually do it too - get a new system (or major update on the OS), and start out clean. Build the very latest toolchains when possible. :lol:

I'm not in any rush... tomorrow is fine... or the day after... or whenever. 8-)
Post Reply