Making N64 Games?

Moderator:Moderators

User avatar
Mario
Posts:1383
Joined:Mon Mar 05, 2007 7:20 pm
Location:Sunny California
Making N64 Games?

Post by Mario » Tue Dec 23, 2008 3:17 pm

I want to get into making N64 games and I need a nice tutorial. I've seen marshallh's website, 64dev, and it looks promising. Unfortunately, the sections on how to actually program games are dead.
I realize the easiest way to program games is with C, I have not learned this language but I do know BASIC. Don't tell me that this a bad starting project, I don't really care. I'll learn as I go along. :wink:
Got any tutorials?

User avatar
Neildo_64
Portablizer
Posts:852
Joined:Sun Jan 29, 2006 9:09 pm
Location:Iowa

Post by Neildo_64 » Wed Dec 24, 2008 2:01 am

Start off making PC games, then port that to N64 - way easier.
Image
Current projects:
Ultimate N64 Guide
N64 Portable (x2)
NES Portable

User avatar
Fenrir
Posts:14
Joined:Wed Aug 27, 2008 9:20 am

Post by Fenrir » Wed Dec 24, 2008 9:23 am

These things always end in tears...

Information on programming for the Nintendo 64 tends to be fairly thin on the ground - which is understandable, because Nintendo are an extremely proprietary company, the N64 was (and is still considered to be) an extremely complex beast (you would have a far easier time writing PS1, GCN and Xbox games), and we're 2 generations past it now. Developers typically devised custom formats for all sorts of data in their games (file formats, text formats and the like), and ofcourse directly manipulated an extremely complex and I'll add dynamic hardware platform on the lowest levels (machine code/assembly, microcode) to write their games. For these reasons, N64 game programming tends to be nowhere near as cushy as writing games on other platforms, and certainly a far stretch from PC game development.

That said, I'd stick with Neildo_64's advice - you will need to learn how to develop a game in the first place before you start complicating the process with MIPS assembly, leaked technical specifications and format details reverse-engineered by underground homebrew scenes. You'll learn as you go? You'll spend a good year or so learning before you even get an N64 to print "Hello world!" to the screen - if you're particularly gifted, and lucky.

For your current experience, I tend to point everyone in the following direction, but Steve Heller should be able to help you - particularly his book, C++: A Dialog, which is geared towards absolute beginners but picks up in pace very quickly. C++ probably isn't directly relevant to N64 programming, however since I've never actually found an N64 compiler, C probably isn't going to be a lot more useful either. However, C++: A Dialog will give you a good introduction to programming in the high level, and a good general understanding of what's going on at the low level on any platform. If you don't understand how computers behave on the low level in general, you have no hope of taking on the N64.

Anyway, I might start digging soon, and see what information on the hardware and possibly programming utilities I can dig up. Me and a friend have been dabbling in the thought of working on an N64 emulator as a long-term undertaking, so I'm going to have to look this stuff up anyway. More soon.

User avatar
Neildo_64
Portablizer
Posts:852
Joined:Sun Jan 29, 2006 9:09 pm
Location:Iowa

Post by Neildo_64 » Wed Dec 24, 2008 9:43 am

I've never actually done (or even seen) N64 code, but I did do a lot of assembly in college and believe me, if you've never programmed anything before, its pretty insane.
Image
Current projects:
Ultimate N64 Guide
N64 Portable (x2)
NES Portable

User avatar
palmertech
Senior Member
Posts:3225
Joined:Sat Feb 02, 2008 1:40 am
Location:California, land of the homeless and hippies
Contact:

Post by palmertech » Wed Dec 24, 2008 11:34 am

I have no idea on how to make N64 games, but try looking back at a lot of later reviews of the system, late in its lifespan. They often make a point that aside from great first party titles, there are really not many third party title, especially in comparison to the PSX.

You know why? Because the N64 was incredibly hard for devs to wrap their heads around. :lol: Nintendo was able to struggle through it, using their superior knowledge of the console.

If professional publishers are not able to make it work, I doubt that you will be able to do much (As said by the above post).

Also, do you have an N64 backup unit? No other way to play N64 games you make on the N64.

If you want to make games that run on a real system, I would suggest dreamcast or GBA.
Image

Excellent

User avatar
Mario
Posts:1383
Joined:Mon Mar 05, 2007 7:20 pm
Location:Sunny California

Post by Mario » Thu Dec 25, 2008 11:24 am

Thanks, guys, for trying to protect my sanity. I know the N64 is a very difficult system to code for, but I want that challenge. I don't care what I have to learn, or how long it takes. If you know of a guide, please link me to it! The N64 is my favorite game system, and I want to make something for it.

As for testing my stuff - I wasn't planning on testing it on actual hardware for a while, just emulators.

Neildo, if making a PC game then porting it to N64 is easier, could you give links on how to do those two things?

b_w_johan
Posts:72
Joined:Mon Dec 08, 2008 12:43 pm

Post by b_w_johan » Thu Dec 25, 2008 5:06 pm

try writing an XBOX game instead, if you use microsoft XNA studio, you can create a game for both XBOX and PC.

if you start to understand how this works evolve from there, there are loads of howto's if you google on microsoft XNA studio and well its the only free devkit available,else you would have to make all the mess arround it and then make the game and hope you where right in making the mess else youre game won't run on the console.

trust me, i've been programming for years and making a gameengine and gamedesign is freaking hard. played a little with xna, and all those howto's really do help. nintendo doesn't really help indy that much...

User avatar
Mario
Posts:1383
Joined:Mon Mar 05, 2007 7:20 pm
Location:Sunny California

Post by Mario » Thu Dec 25, 2008 9:29 pm

...

If anybody knows of a tutorial on how to make N64 games, please post the link.

User avatar
WhatULive4
Posts:329
Joined:Fri Mar 28, 2008 6:19 pm
Location:Saskatchewan, Canada

Post by WhatULive4 » Thu Dec 25, 2008 10:55 pm

Here are a couple of links I found that might put you on the right track.

http://n64.icequake.net/

http://www.dextrose.com/index.php?s=3

I'm sure a lot of it hasn't been updated for a very long time.

*edit

I'm going to give you a quote from Marshallh who has had a bit of experience.
N64 homebrew is also a real pain in the butt. After doing it for 2+ years I wouldn't recommend it unless you've already written lots of 3D code for PC. It is really fun though.
That is from this thread.

User avatar
Neildo_64
Portablizer
Posts:852
Joined:Sun Jan 29, 2006 9:09 pm
Location:Iowa

Post by Neildo_64 » Fri Dec 26, 2008 3:14 am

Sorry, but I really don't know where to find any info either. A couple times I've tried to get into N64 coding, but haven't been able to find enough info to even know what the hell I'm doing. Most of what I know about it is stuff that I've heard around here (mostly from marshallh) and the little info I have found scattered across the interwebz.
Image
Current projects:
Ultimate N64 Guide
N64 Portable (x2)
NES Portable

User avatar
Mario
Posts:1383
Joined:Mon Mar 05, 2007 7:20 pm
Location:Sunny California

Post by Mario » Fri Dec 26, 2008 11:15 am

Thanks for the links, WhatULive4.

Yeah, It's impossible to find information. Marshall has a site, but the pages that relate to the actual coding have some error and won't display...

User avatar
marshallh
Moderator
Posts:2986
Joined:Sat Sep 10, 2005 2:17 pm
360 GamerTag:marshallh
Location:here and there
Contact:

Post by marshallh » Sat Dec 27, 2008 11:16 am

Sometime I ought to get around to finishing that website. I have enough tips and tricks I've learned to fill a book :P

Probably the simplest way to get started is to start writing games in C for the computer, using SDL for I/O. SDL gives you direct access to the framebuffer, and lets you do whatever you want with it. And you'll need to be able to figure this out because it's cake compared to the N64 hardware.

Time spent learning C++ won't be wasted, but you'll have a heck of a time switching back to plain C (the N64 compilers used are all based on GCC so it's never gonna happen.)

And lastly, all N64 emulators (with the exception of the MAME port) suck and are horribly inaccurate for programming. While programming I'll do 5-6 compiles while messing around and test each in Project64. If that works, I test it on the real hardware. Most of the time it'll work but if I changed anything I/O related, it's easy to fudge something up and while the emulator runs it fine, the hardware does not and you have no idea where things went wrong.
This is to say you need some way of testing it on your own hardware.

A suggestion would be to start with some sort of 2d sprite engine. You'll use textured rectangles so you can rotate them and scale them. Here's a hint of the "gotchas" you'll run into: The n64's RDP has 4kb of texture memory. If you use 5551 16-bit RGBA, then you can fit a 32x64 texture in there. Since squares are easier to use, 32x32 it is.

Now say you want to draw a 320x240 background image. You have to split the texture up into horizontal strips (The RDP draws faster that way) of 320x6. And since you don't want to do that by hand, you have to write a PC tool to do that for you. I've written at least 6-7 tools just to help massage data so it'll work with the N64.
Image

User avatar
Mario
Posts:1383
Joined:Mon Mar 05, 2007 7:20 pm
Location:Sunny California

Post by Mario » Sat Dec 27, 2008 11:18 am

Wow. Sounds like a lot of work, but a fun challenge. I've read about the 4kb texture size limit, it's pretty crazy! Thanks for pointing me in the right direction.

User avatar
Fenrir
Posts:14
Joined:Wed Aug 27, 2008 9:20 am

Post by Fenrir » Sun Dec 28, 2008 11:35 am

marshallh wrote:Time spent learning C++ won't be wasted, but you'll have a heck of a time switching back to plain C (the N64 compilers used are all based on GCC so it's never gonna happen.)
I dug up a thread in the archive of dextrose.com, where someone noted that they had managed to make PsyQ compile C++. Thread's here.

GCC is designed to handle a number of front-ends (ie. languages), what's to stop a GCC targetting MIPS from compiling Java or FORTRAN for the N64?

User avatar
Mario
Posts:1383
Joined:Mon Mar 05, 2007 7:20 pm
Location:Sunny California

Post by Mario » Sat Jan 03, 2009 11:02 pm

Okay, I've thought about this more, and I realize this is a really ambitious idea. I mean, I'd have to learn an entire new language, for one of the trickiest systems to code for, and It's my first real coding experience.

But, I still want to try.

I know I must sound like just a noob to you guys, thinking I'm out of my mind, trying to get started on this stuff. But instead of making a game engine straight away, I just want to try displaying graphics. That can't be TOO hard, can it?

Those websites WhatULive4 linked me to helped a lot, especially the second one.

Marshallh, do you have any of your tips/tricks actually typed up? If so, could I have them? If not, please don't wast your time typing them for me. :wink:

So, what language do I have to learn specifically for the N64, and how do I compile it?

Post Reply