XCode particle engine

Apprentice
Posts: 10
Joined: 2008.08
Post: #1
Hello, MoltenWhale again. After my previous question when up in flames, Im going to try something different. Im gathering together ideas for a simple(but powerful) Particle Engine Im going to build in XCode, using OpenGL, and Objective C. What I would like to do is have is program set up using layers, ex: Layer 1 is a movie or picture, and Layer 2 is the particles, how would I set up to have a particle emitter.
Quote this message in a reply
Moderator
Posts: 3,579
Joined: 2003.06
Post: #2
There are a million ways to answer that question!

Learn how to make simple games using Cocoa (or even GLUT for that matter) and OpenGL first, then we'll be able to help you better. Go buy some books, study up and do some coding. We understand your enthusiasm, because we've all been there, but your questions are too hard to answer specifically in a forum thread(s).

As a general hazy reply to your question though, the particle emitter itself is just implemented as a class (or equivalent C construct) which manages the release of particles and their subsequent update and destruction. Particles could be as simple as a point, or as complex as a 3D mesh. Often times, particles are just 2D sprites. Generally the emitter class just times when to spawn a new particle and gives it some initial direction, rotation, scale, etc. and then updates those properties during the update thread, sometimes taking into account physics and collision with the surrounding environment.

As far as layers, yeah, you can layer things however you want using OpenGL. It's up to you to define what a "layer" is though.
Quote this message in a reply
Member
Posts: 26
Joined: 2008.08
Post: #3
An engine — though (by no means) an easy task — is certainly feasible. It's not that your post had gone up in flames, just that (as were to be expected of a first attempt at such an involved and complicated task) your initial concept for an engine was, well, unrealistic, and your question rather broad in scope.

I don't mean to discourage, but as far as a particle engine is concerned, it'd be better if you'd start with a math library / SDK — which would, in the least, serve as an impetus for eventually developing such an engine.

(Concerning your previous post)
As for supplying a library of assets? Game developers certainly will want to supply their own, and, for another thing, to supply a library of assets, at any rate, (less they should be in some way or another part of an executable itself) would require you to implement some sort of file I/O that could just as easily have a front-end for the developer.
Quote this message in a reply
Member
Posts: 26
Joined: 2008.08
Post: #4
If it hasn't already been suggested (I had attempted to do so, but I believe my post in question was lost), by the OpenGL Red Book. Sure, it's expensive (I paid a hard-earned $60 for the fifth edition), but well worth it. All the examples are cross-platform, since they use glut, and most, if not all, are comprised of a single C source file.
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #5
You might like to play with Quartz Composer a bit to plan out your engine. There are a few good examples that come with the developer tools.
Quote this message in a reply
Apprentice
Posts: 10
Joined: 2008.08
Post: #6
maximile Wrote:You might like to play with Quartz Composer a bit to plan out your engine. There are a few good examples that come with the developer tools.

Thats a good idea
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  osg::Particle how to change de texture of each particle zinbawe 1 2,982 Jul 14, 2009 12:46 AM
Last Post: DoG
  XCode OpenGL Game Engine MoltenWhale 20 13,084 Aug 17, 2008 07:10 AM
Last Post: ThemsAllTook
  Particle Engine Musings WhatMeWorry 5 3,073 Nov 30, 2005 09:01 AM
Last Post: KiroNeem
  Particle groups unknown 4 3,321 Nov 4, 2005 10:27 AM
Last Post: Zekaric
  Particle Engines Nick 18 6,569 Sep 8, 2005 12:24 PM
Last Post: TomorrowPlusX