Care to offer some advice?

Apprentice
Posts: 5
Joined: 2008.01
Post: #1
Hi, Im a highschool senior whos been writting useless C programs for the past
5yrs. My prediciment is that I will soon be entering the working world without
any real programming experience. Understandably I feel like my all this time
has been wasted in my attempts to understand the language completely. ( Note
for you beginning programming dont learn C first and fall into the same trap).

Besides writing a game because I've always wanted to I'm hoping to expose
myself to the basic paradigm of software development.

(sorry for the unnecessary background story )


Now that I got that off my chest, Here is my idea of the game I want to write:
(conceptually based off 2d zelda games)
1. 2d top-down
2. simple world with enemies
3. dungeons with treasure
4. written In C


Now my questions about how I decided to approach this:
1. Is openGL overkill for this project, if so what would be a good alternative?
(SDL maybe?)
2. Should I learn to use Xcode or is VIM and GCC acceptable?
3. Quicktime for sound? ( I think this should be fine )
4. What kind of time frame is reasonable to commit to learning and applying the
above


I bet some of you are snickering about how you could write the desired game in
about a week but I've never put together anything other than simple programs
that express a certain functionality of a program. ( similar to those sample
programs you see in programming books.)
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #2
blowFish Wrote:I bet some of you are snickering about how you could write the desired game in about a week...

That's the opposite of the usual response here. Lots of people come along with big ideas (3D mmorpgs with lasers) and no experience. Seems like you have a reasonable scale of project and at least some experience.

While lots of people could get something similar to your description working in about a week, it takes much longer to add content to the game and polish it and test it and so on.

As for OpenGL versus SDL, you could use SDL's graphics but it's old and slow. It might limit you if you change your idea in the future. And not that much easier than OpenGL either. If you do choose OpenGL, you can still use SDL for setup - if you're used to C it's a very quick way to get straight to the C coding (without having to worry about setting up a window and OpenGL context). Don't try to learn all of OpenGL (i.e. working your way through the Red Book) - for moving 2D sprites around it doesn't take much learning.

I'm sure others here will be able to answer the rest of your questions better than I could. Good luck with the project.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #3
1) No, OpenGL's a reasonable choice. You might find SDL's 2D routines easier to get started with, but OpenGL is more powerful and more flexible (and people around here are more likely to know answers to questions!)

2) If you're happy with the command-line, there's absolutely no need to use Xcode. You'll want a decent build system (SCons or the like) though. Make is barely acceptable. Please, for the love of god, don't use VIM... at least *try* TextMate or SubEthaEdit...

3) QuickTime is not suitable for playing sounds. If you're using SDL, SDL_mixer is probably fine. OpenAL is also reasonably easy.

4) Depends entirely on your current level of programming skill, your motivation, the amount of time per day you can spend on this, etc. The actual code required is probably not *that* complex, a few months work for someone experienced. The content is a lot more than that.
Quote this message in a reply
Member
Posts: 72
Joined: 2006.10
Post: #4
1. As the others have said, OpenGL is perfectly appropriate.

2. XCode is pretty much a text editor on top of GCC in the first place. However, if what you are after is marketable skills, being able to operate an IDE is a must.

3. OpenAL hands down, especially if you'll be using OpenGL. OpenAL has been built from the ground up to look and "feel" as much like OpenGL as possible.

4. It depends on sooo many factors. Knowledge is one thing, but experience trumps all here. In the end you are the only one who could ever estimate that.

The good news is: You are going at this in the exact perfect way:
- Reasonable scope
- Clear objectives
- Learn by gaining hands-down experience

If you keep it up, you'll go far with this!

--
Sohta
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2008.01
Post: #5
Well I started programming because I wanted to make a game so I've had a while. Anyways... whats the matter with VIM its sooo warm and cuddly ( I live on the command line for the most part its Fabulous )..

Ok, so:
OpenGL, and OpenAL
and hopefully I can maybe get a beta or something out in no time (hopefully)


On another note I have no idea how to use make other than building things I found off of sourceforge and whatcha but I guess I better learn it (and/or SCons) if Im going to become anything of a decent developer.

Also Im glad you someone said not to go through the entire red book ( I was plannng to. ) So where should I look for OpenGL otherwise?

edit: im currently looking at NeHe's tutorials for OpenGL.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #6
NeHe's OpenGL Tutorials are a reasonable place to start. They're not fantastic, and are sometimes Windows-centric, but they are better than their competition Wink
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2008.01
Post: #7
Alright, how about a common place for OpenAL yes? (sorry Im lazzy.)
Quote this message in a reply
Member
Posts: 715
Joined: 2003.04
Post: #8
Why not try to modify the Inkubator project to suit your game design,
instead of reinventing the wheel from scratch?

Just a suggestion to prevent you from trapping yourself in the ground up approach.

I've been reading the same ten pages of "C in Easy Steps" for five years.
It puts me to sleep, so if you stuck with it for five years, kudos to you.
Quote this message in a reply
Sage
Posts: 1,199
Joined: 2004.10
Post: #9
Regarding OpenAL, IIRC Apple has some demo code that shows 3d sound + doppler. I imagine you can find plenty of demos on the net. For what it's worth, OpenAL is so "OpenGL-like" that I picked it up in an afternoon and had working 3d sound in a day or so.

The only complication with OpenAL is that it only loads raw wave data. No MP3s or any hoopla.

Also, get the Red Book, even if you're just doing 3d. The Red Book will make it all perfectly clear what's going on inside. Since 2D still requires you to understand stuff like ortho projection matrices.

Anyway, there's nothing wrong with VIM, if you're stuck on a Sparq from 1988. I was ( well, VI, not VIM ) for a job long ago, and I dealt with it. But for crying out out, it's the 21st century. TextMate can do pretty much anything VIM can do, and probably a lot better.
Quote this message in a reply
Member
Posts: 45
Joined: 2006.07
Post: #10
SDL + OpenGL is great. I use Emacs + SCons/gcc to build all my stuff. OSC -- why are TextMate/SubEthaEdit better than full-featured text editors like VIM/Emacs?

Just two pieces of advice even for your "simple" game: break it up into well-defined milestones and make sure the game is data-driven (i.e., the levels/sprites exist independent of the C files you use to compile it).

Milestones are good because you make sure you don't get too ahead of yourself. The first few might look like this:

- render a sprite on the screen
- move the sprite with keyboard, mouse, or joystick
- load a level from a data file and draw it
- move your main character through the level with proper collision checking for walls etc
- ...

The data-driven part makes life easy for two reasons: first, because it's nice to be able to change or add to levels without a full recompile; and second because it will encourage a more general programming style. The hard part is figuring out which aspects of the game should be code and which should be data -- on the most extreme end of the spectrum, you can embed scripting languages into your game; for a simple project, I would restrict the loaded content to be simple descriptions of levels and graphics.

Good luck, sounds like you'll have a good time!
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #11
VIM isn't a full-featured text editor, it's an abomination from the 70s Rasp

There's nothing "wrong" with emacs, unless you consider complete disregard for modern HI guidelines, an entirely different set of keyboard shortcuts, and extensibility only via its own dialect of lisp "wrong". TextMate adheres to most HI guidelines, uses standard shortcuts, and is extensible with any language you choose.
Quote this message in a reply
Member
Posts: 312
Joined: 2006.10
Post: #12
OneSadCookie Wrote:NeHe's OpenGL Tutorials are a reasonable place to start. They're not fantastic, and are sometimes Windows-centric, but they are better than their competition Wink
Video Tutorials Rock have pretty decent tutorials. Better than Nehe I think (but don't cover as much).
Quote this message in a reply
Apprentice
Posts: 5
Joined: 2008.01
Post: #13
lol, I was over at NeHe and the first tutorial didn't work. Im trying though.

VIM, on the otherhand is beautiful. it offers anything that you could possibly want, plus being on the command line I never once have to pick up my mouse to do something else.

to Igame3d:
yea C is really annoying to learn. In fact now that I have an understanding of it I hate the idea of learning a interpreted language. bleh.
btw its taken me 7 or so books till I finnaly understood basic concepts

bronxbomber92
thanks for the link I really like the tutorials so far Grin
Quote this message in a reply
Member
Posts: 312
Joined: 2006.10
Post: #14
The first Nehe tutorial doesn't work because it uses the Win32 API to create a window and context. Try using the bottom SDL or GLUT or Cocoa port of it.
Quote this message in a reply
Moderator
Posts: 623
Joined: 2007.09
Post: #15
blowFish Wrote:lol, I was over at NeHe and the first tutorial didn't work. Im trying though.

VIM, on the otherhand is beautiful. it offers anything that you could possibly want, plus being on the command line I never once have to pick up my mouse to do something else.

to Igame3d:
yea C is really annoying to learn. In fact now that I have an understanding of it I hate the idea of learning a interpreted language. bleh.
btw its taken me 7 or so books till I finnaly understood basic concepts

I love Objective-C, and I'm a newbie. Is it something that comes with experience, or is Obj-C just a lot better?(better as in easier to learn. You might not want to say one language is better than another around here.Sneaky(You haven't seen me…Ninja)))Rasp
Quote this message in a reply
Post Reply