Create a simple 2d sprite based game

Member
Posts: 64
Joined: 2005.06
Post: #1
Cocoa : Objective-C

I want to create a simple 2d sprite based game (some drawn using pre-made images, and others made with a NSBezierPath, or anything else that would substitute), but I have no idea where to begin. I've created an NSView and made a custom class for it, but past that, I'm pretty much lost. I've done several tutorials before on drawing a sprite with NSBezierPath, but they never really help much in the long run.

Can anyone help me out? Tell me the steps I need to go through, and how I would go about doing them? (One thing I know I'm going to need a lot of help with is collision; not only will I have to do collision of round objects, but they will misshapen and such when you compress yourself to bounce around, making collisions even more difficult)

P.S.
For the game (code-named and possibly permanently named: GOOP), your a green little blob of, well... goop. While your standing still or moving slowly, your gooey and stick to objects (floor, walls, ceilings, ect). In addition to that, you can compress yourself down smaller and propel yourself at high speeds, but at these high speeds, you become solid and act like a bouncy ball.

Your enemies are different colored balls of goop (like you), and your all competing for each others goop. You gain their goop by propelling yourself at them; if you hit them enough, you break through their membrane and get inside them, and devour them. You gain whatever abilities they had, and grow a little stronger and bigger. However, they too can do the same to you...

This is just a little game which I'm using to teach myself how to program a game in Cocoa (without any luck so far).
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #2
how about you learn how to get key input so you can move around your sprite on screen
Quote this message in a reply
Member
Posts: 64
Joined: 2005.06
Post: #3
Well, before I can do that, I have to learn an effective, clean and hopefully fast way of creating, drawing, maintaining and keeping track of sprites and a game world. Like I said, about the only thing I can do right is create an NSView and giving it a custom class.
Quote this message in a reply
Member
Posts: 64
Joined: 2005.06
Post: #4
Well, if no one wants to post how too, is there any tutorials out there that can actually help, and not just give me a small part of a big picture?
Quote this message in a reply
Moderator
Posts: 608
Joined: 2002.04
Post: #5
So basically what you want is someone to show you how to do sprite organization and making a sprite system? I am afraid I am a bit confused at what you are looking for. Collision detection? Physics? Images? I will try my best to help but I can't guarantee anything.
Quote this message in a reply
Member
Posts: 75
Joined: 2002.04
Post: #6
Hello jbrimm, maybe the Cocoa Sprite Kit would make your life easier.

That is a cool game idea, by the way.

Chris Burkhardt
Quote this message in a reply
Member
Posts: 64
Joined: 2005.06
Post: #7
What I need is like a guideline on how to tackle creating a game. Getting more in-depth than that, I need help on how I go about creating, drawing, maintaining, ect. sprites and a game world, and how I do things like physics, levels, and about everything you would expect in a game. My problem is, I don't know exactly how I should be doing stuff.

I have plenty of concepts of how to go about doing things, as a matter of fact, I have several concepts of how I could actually make parts of a game more complex while keeping the programming and structure simple, but getting that beginning base is where I'm stuck.

I have concepts of how to make layers for drawing in the game world, and how to handle sprites and many other things, but getting to the actual coding and maintenance of all that, is where I'm hanging up and getting stuck.

I don't know if any of that made sense, but I hope it did. Shock
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #8
How about an introductory C book, or a few Cocoa tutorials if that's what you're into? I'm beginning to suspect that your issues are to do with lack of programming experience rather than lack of game-specific tutorials.
Quote this message in a reply
Member
Posts: 64
Joined: 2005.06
Post: #9
haha... ya, a lot of both. I understand most of the code fine, I just have no clue where to tackle it. I can put together a simple sprite system on my own (among other things), but it ends up being an ungodly creation that is nearly impossible to use effectively.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Have Hierarchical Sprite Tree, Need To Transform Screen X,Y To Determine Which Sprite kalimba 5 6,160 Mar 16, 2009 06:31 PM
Last Post: AnotherJake
  Module Based Game? KiroNeem 5 3,124 Nov 30, 2005 09:17 AM
Last Post: ThemsAllTook
  Simple Physics Game Zenith 8 5,614 Jan 13, 2004 10:01 PM
Last Post: Josh
  Anyone has Cocoa tutorials or simple game sample code? Achenar 5 6,716 Nov 26, 2003 12:06 PM
Last Post: Sohta
  Cocoa Hex Based Game question akinnie 5 5,729 Jun 12, 2002 06:40 AM
Last Post: akinnie