Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Nibelheim
Jul 7, 2006

Oi, hello Game Development Megathread.

I'm really looking into starting game programming as a hobby. I'm a college graduate in computer sciences, and I've done nothing but administrative programming so far. I've narrowed my first project down, and I had a few questions.

I'll be writing a simple platformer (two simple levels - to set me an attaignable goal for the moment). This is going to be for the Nintendo DS.

My main question surrounds the collision detection. After doing some research, I've found that a lot (if not most) of the projects done for the DS use collision maps (A hidden background that includes certain coloured pixels, and the engine verifies if the sprite hits a certain pixel). Is this really the way to go? What do most platformers outside of the DS use for detection?

Adbot
ADBOT LOVES YOU

Nibelheim
Jul 7, 2006

TSDK posted:

Collision detection has always been, and still is, about spatial partitioning. Use bounding boxes for quick checks to trivially reject collisions that can't possibly happen. Maybe subdivide the screen with either a kd-tree or quad-tree so that you don't check object versus object when they're completely contained in different leaves.

Once you've pruned out all of the collisions that can't happen at a high level, then you're left with those that may happen at a lower level. How you check those will depend on what sort of sprites you've got and what sort of collision you want.

It may be good enough just to subdivide the sprite down further and do overlapping box checks on a smaller scale. If you want to go pixel perfect, then you could alway render the overlap region offscreen using a logical-and mode and then scan through the vram with the cpu to check for non-zero results. Or you could store the min and max extent values for each line of pixel data in the sprite, and then for the overlap lines you're doing a 1d min-max overlap check.

Basically, there are loads of options out there, and you'll only figure out which one is best after trying a few, profiling and weighing the cost up against memory footprint etc...


I'm a little confused on the tree solutions. Care to elaborate?

Nibelheim
Jul 7, 2006

TSDK posted:

For more detail you could always check wikipedia, but the basic idea is this:

You can put your sprites into two lists - those on the left half of the screen, and those on the right. Note that the lists are not mutually exclusive, as you can have a sprite straddling both. When running through the sprite versus sprite checks for sprites evenly distributed around the screen, then you've cut your work in half. You don't have to check the sprites in the left list against those in the right list, because they're nowhere near each other.

For the quad or kd-tree, you recursively split the halves in two, then in two again etc... until you get a suitable level of granularity whereby you've cut down the number of sprite-sprite collisions, but not at too much of a cost in memory or overhead maintaining the list.

Note that there are some different flavours of quad-trees, and node storage varies between them. For instance, earlier I could have said make 3 lists: left only, right only, and straddling both. What this means is that instead of duplicating pointers by keeping the elements in multiple lists, you're trading CPU time for memory by adding a traversal step where you check the lists in all of the parent nodes as well.

Things are much clearer now. Thanks.

This though, is regarding sprite vs sprite collision. Can the same theory be applied to the game's map? The level itself is not a sprite per se, but rather a.. well, map.

Nibelheim
Jul 7, 2006

TSDK posted:

You can, but it might be overkill for static map data. For an old-school platformer, I'd go with a tile based approach and define the level as an NxM array of tiles.

Very much appreciated. I'll get back to this thread when things unravel :V

Nibelheim
Jul 7, 2006

I'm currently involved in the creation of a game development student club at my university. For a starter event, I've invited the other interested in a "weekend microgame challenge" where everyone is asked to create a simple game within a 48 hour period.

I participated last weekend, and I ended up with a neat minigame I like to call "Fire Coming Out Of The Monkey's Head". It's a single player game for the PC and Xbox360 that uses Microsoft XNA framework to thrust players into the role of a stranded villager during a volcanic eruption. Players must stay clear of the surrounding lava and from the falling molten boulders that can push them away from safety.

The game uses the Farseer Physics Engine for XNA.

Here's some footage: http://www.youtube.com/watch?v=DSwD7ddqzw4
I couldn't get the sound to work in the video, my apologies on that.

The game begins at an easy pace, but becomes incredibly difficult as the levels increase. Each level lasts 30 seconds, and with every level comes a great amount of boulders to avoid. It’s incredibly addictive. If the game’s development was to be continued, many things could be added to improve the overall experience. But to respect the idea of the challenge, I've closed the book on it.

It was definitely fun and I cannot wait to do the next challenge. I was amazed on how I could make an enjoyable game in a short amount of time. Granted it's not that great, but this was my first finished game. Fun stuff.

Nibelheim
Jul 7, 2006

Where could I find a collection of art assets for games that are free to use? (Sprites, Backgrounds, etc.). I've known of https://www.lostgarden.com, but are there any other packs out there?

I ask this because I'm going to propose a prototyping challenge to the student club I'm working with, and instead of sending them off in different directions I'd like to narrow the scope a bit.

Nibelheim
Jul 7, 2006

Strumpy posted:

Did anyone here go in the gamejam last weekend? I went to the sydney one with a friend and we made a pretty solid game in 48hrs. How was everyone's experience?

The group that I was there with were great. Everyone got along well and had a great time. Food was nice and the games fun :D

Our game was called ‘The Ferryman’. As the ferryman it is your job to escort souls across the river of the dead to either Hades or the Elysium fields. You do this by talking to the souls and deciding if they were good or bad souls.

Here is a pic of the game we made (2 man team programmer / artist). We are going to upload it to the internet for other people to play but we want to tune some gameplay first.



Looks good!

I went to the Jam in Ottawa myself along with five other programmers from my game development club. We split up into two teams, and I ended up on a team of three programmers / three artists.

We made a game called "Undoor the Lock" which is a hommage to the classic zelda-esque dungeon games. Only this time, your regular methods of solving puzzles will not be of help. For example, the first room contains a locked door and a key. To solve it, you must pickup the door and unlock the key.

We enjoyed the idea very much. and although the end product really isn't polished, still had a drat blast and ended up with a complete prototype. We used XNA and started the code pretty much from scratch.

Link to game: http://www.globalgamejam.com/2010/undoor-lock

Nibelheim
Jul 7, 2006

AskYourself posted:

Do you have a brother in India ?

Why yes, yes I do. Have we met sir?

Staying on topic, this little gem came out of the Sydney Jam: http://www.youtube.com/watch?v=QYPwYfbi8jA

It's called GNILLEY, and basically it's a zelda game that you control with a microphone. It made for a pretty hilarious show.

Nibelheim fucked around with this message at 23:42 on Feb 6, 2010

Adbot
ADBOT LOVES YOU

Nibelheim
Jul 7, 2006

Strumpy posted:

Yeah that was a really good one! It was kinda hard sitting 2 meters from a guy yelling into a microphone for 40 hours though!

I also just splashed out and bought unity pro... I don't know how they can get away without proper version control systems in the indie version.

Haha you were at the Sydney Jam? When me and my buddies were talking about GNILLEY the first thing that came to mind was "I can't imagine having to work next to that team all weekend."

@AskYourself: High five :V

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply