Death of Everyman [uDG 2011]

Apprentice
Posts: 8
Joined: 2011.07
Post: #1
uDevGames 2011 Entry
Github Repo

I'll post WIP updates here.

The game will be a simple top-down shooter for Macs.
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2011.07
Post: #2
I've been trying to figure out some high-level technical constraints. Here's what I've come up with so far:

1. I'll draw using an extremely narrow subset of OpenGL. I'll use an orthographic projection and some discrete set of layers in the depth dimension. Each layer will be composed of geometric primitives, drawn without any texturing. I visualize myself relying mostly on rectangular elements but can see myself using point and line primitives as well. These choices are based on an intention to make my own minimalist custom editor for the visual content and also on the fact that I'll be doing the rendering by hand and don't want that part of the project to overwhelm everything else.

2. For physics, I'm looking at using Chipmunk. I considered two alternatives: (1) do the physics myself using crazy, ad hoc hacks; and (2) Box2d. I prefer Chipmunk over Box2d because it has a C interface. I prefer it over my own hacks because the results should be much more believable and the interface looks simple enough that I can figure it out in the time I have.

3. The levels will be hand-crafted rather than generated.

4. Enemies will wander about until spotting the player. Their response to seeing the player will be to charge him with guns blazing. Pretty typical.

5. The one visual aspect I really want to get right is the impression of damage. Characters should get bloodied, leave a blood-trail as they move if they are injured, and finally, gibs should be generated and they should be animated nicely. Another part of this is that bullet (and potentially, explosion) impacts should push characters around.

6. Sounds and music will be important but I'll focus on visuals and gameplay first.

So the next thing to do is probably to draw up some kind of roadmap. Early steps probably include implementing fullscreen mode and figuring out how to work with the Cocoa event loop.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #3
Chipmunk animated gibs look pretty sweet without being a lot of effort:
http://files.slembcke.net/temp/Splatter.mov

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2011.07
Post: #4
(Jul 7, 2011 12:34 PM)Skorche Wrote:  Chipmunk animated gibs look pretty sweet without being a lot of effort:
http://files.slembcke.net/temp/Splatter.mov

Hehe. Nice one!

I'm afraid that Chipmunk is one of the largest risks in my project. If I'm not careful, I can see myself spending all my time playing around with effects and forgetting to produce a game. Rasp
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #5
(Jul 8, 2011 10:38 AM)ericbb Wrote:  Hehe. Nice one!

I'm afraid that Chipmunk is one of the largest risks in my project. If I'm not careful, I can see myself spending all my time playing around with effects and forgetting to produce a game. Rasp

I once spent 8 hours one night playing with nothing but tweaking variables in a water simulator made with chipmunk...

It's REALLY addictive.
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #6
Hehe. That is one of the large reasons I never finished that racing game you see in the movie. I just kept fiddling with it instead of moving towards a finished project.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2011.07
Post: #7
Some more planning.

1. After considering some over-complicated designs, I've decided to
work primarily with plain C and to stick to one operating system
process.

2. I'll proceed in stages: (a) basic graphics code (b) basic audio
code © physics experimentation (d) gameplay and audio-visual design.

3. I started thinking about motion blur and came up with an idea for
simulating it by using simple 3d volumes to represent the sweep of
each 2d shape over an interval of time. Calculating volume thickness
per-pixel from depth buffers and translating to opacity should produce
a nice motion blur effect in my layered 2d world. I'm not sure
whether I'll be able to make it work but I'd like to try.

4. I read through the Chipmunk documentation, skimming the parts
about spacial queries, constraints, and joints.

5. While I was evaluating a bunch of communication protocols I
realized that it might be quite convenient to use google protocol
buffers for storing game objects.

6. I discovered that there is a play from medieval times called
Everyman. Oddly enough, it is about events preceding his death. So
my game's title has turned out to be very closely related to a
strange, and very old, play.

So the next step is to start on the OpenGL work.
Quote this message in a reply
Member
Posts: 338
Joined: 2004.07
Post: #8
ericbb Wrote:If I'm not careful, I can see myself spending all my time playing around with effects and forgetting to produce a game. Rasp

(Jul 11, 2011 01:49 AM)ericbb Wrote:  3. I started thinking about motion blur and came up with an idea for
simulating it by using simple 3d volumes to represent the sweep of
each 2d shape over an interval of time. Calculating volume thickness
per-pixel from depth buffers and translating to opacity should produce
a nice motion blur effect in my layered 2d world. I'm not sure
whether I'll be able to make it work but I'd like to try.

Wink

I'm really excited to play this year's shooters! Looking forward to a playable build Smile

Justin Ficarrotta
http://www.justinfic.com
"It is better to be The Man than to work for The Man." - Alexander Seropian
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2011.07
Post: #9
(Jul 11, 2011 01:35 PM)JustinFic Wrote:  Looking forward to a playable build Smile

Heh. Me too. I've been wandering around the Cocoa Framework Funhouse and feel approximately as lost as when I started. As a beginner to OS X coding, the ratio of making to exploring is pretty low.

Right now I'm experimenting with a design where one window alternates between an OpenGL view and a Webkit view. I've verified that both views are responding to events and I can export Objective-C methods into Javascript.

I have uncovered nextEventMatchingMask:untilDate:inMode:dequeue: and startPeriodicEventsAfterDelay:withPeriod: and I'm thinking that, to start with, I'll just poll all queued events after each vsync without worrying about periodic events unless I get time to experiment later.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #10
Why not just override the NSResponder methods? It's a lot easier, and a lot less likely to cause subtle or not-so-subtle breakage of other standard behaviors...
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2011.07
Post: #11
(Jul 20, 2011 12:30 AM)OneSadCookie Wrote:  Why not just override the NSResponder methods? It's a lot easier, and a lot less likely to cause subtle or not-so-subtle breakage of other standard behaviors...

When I was reading the NSTimer documentation, I found this: "Because of the various input sources a typical run loop manages, the effective resolution of the time interval for a timer is limited to on the order of 50-100 milliseconds".

Obviously, 10 FPS is not an acceptable frame rate. But then again, it appears that people *are* using NSTimer so maybe I will just ignore Apple's warning and try the simple thing.

In fact, I just discovered NSObject performSelector:withObject:afterDelay: so I'll try that and if the time resolution is good enough in practice, I'll stick with it.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #12
Setting an NSTimer with an interval of (say) 0.001 is completely standard. The accuracy is certainly not that good, but the end result is that you get called back essentially as often as possible.
Quote this message in a reply
Apprentice
Posts: 8
Joined: 2011.07
Post: #13
I've officially dropped out.
Quote this message in a reply
Moderator
Posts: 916
Joined: 2002.10
Post: #14
booooooooooo

=(
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Kung Fu Killforce [uDG 2011] JustinFic 34 33,691 Jan 14, 2012 12:49 PM
Last Post: skyhawk
  Your Story [uDG 2011] maximile 64 47,070 Oct 25, 2011 07:13 AM
Last Post: Skorche
  Flying Sweden [uDG 2011] WillMiller 59 49,045 Oct 19, 2011 08:05 AM
Last Post: ThemsAllTook
  uDevGames 2011 - Updates SethWillits 47 27,667 Oct 19, 2011 05:09 AM
Last Post: Carlos Camacho
  Same/Sane [uDG 2011] revelation 17 17,003 Oct 18, 2011 12:03 PM
Last Post: SethWillits