PDA

View Full Version : Tetris, Brickout and other games question


Taxxodium
2002.11.08, 05:58 PM
Just out of curiosity. Some question on these "classic" games:

- Is Tetris made using a 2D Array-based tile system (what a word eh?)?

- Does Brickout, you know that game where you use a rectangle to catch and rebounce the ball to a wall of bricks, use a 2D array aswell or is it more like a collision detection game?

- How on earth do you make a game like Lemmings?

and last but not least:

- How are racing games done? Do you need to write a 3D engine or kan it be done by using some kind of tile system?

Thank you for your time

Feanor
2002.11.08, 11:26 PM
Damn, that's some bunch of questions. You got a few hours?
Originally posted by Taxxodium
Just out of curiosity. Some question on these "classic" games:

- Is Tetris made using a 2D Array-based tile system (what a word eh?)?
It's going to require two data-structures: one for drawing, and one for collision detection. The latter would probably work as a 2D-array, sure. But for drawing, I think it will require individual 2d tiles with centre and rotation information.
- Does Brickout, you know that game where you use a rectangle to catch and rebounce the ball to a wall of bricks, use a 2D array aswell or is it more like a collision detection game?
No real collision detection, that's all faked. An array remembers where the bricks are (and aren't) -- and a pseudo collision detection system would say if the path of the ball will cross the face of an existing brick, using some pretty simple trigonometry.
- How on earth do you make a game like Lemmings?
I can only begin to guess. Genetic algorithms? :) It's been so long since I've seen lemmings...
and last but not least:

- How are racing games done? Do you need to write a 3D engine or kan it be done by using some kind of tile system?
Old-school racing games didn't use 3D engines, but current ones do. Old games used to just use a bunch of billboards, and the trees and stuff were, I think, already pre-shrunk to various sizes to suggest distance. Doing that on the fly would have killed performance. The road would have also been a bunch of tiles for different views of the road.
--FÎanor

Carlos Camacho
2002.11.10, 07:52 PM
We should have examples of Tetris and Pong clones on our site, so you might want to check out their code.

ededed
2002.11.13, 05:17 PM
> How on earth do you make a game like Lemmings?

Just a minute...

ededed
2002.11.13, 05:28 PM
I have put a start on a java version of lemmings type game on my site,
http://www.geocities.com/ed72678954/index.html

Lemmings is probably quite similar to worms, I think they both have two pictures 1 for a mask and one for the terrain, they wont have any genetic algorithms though.

Carlos Camacho
2002.11.13, 07:28 PM
ededed, nice little code snippets there.

There is a uDG game entry that uses this approach. A mask to set the boundaries and a foreground picture for the eye-candy.

What else do we need?
* A timer
* The ability to set the jobs of each Lemming
* Collision detection for falling lemmings, or lemmings hitting walls, etc
* variables which must be met in order to clear the level, ie NN lemmings rescued, etc

Would be neat to see Inkubator work on a Cocoa version of Lemmings. A good project I think to teach many aspects of game dev.

Taxxodium
2002.11.14, 09:40 AM
Count me in Carlos! Besides programming, I can do graphics, sound/music and I can put some ideas.

ededed
2002.11.14, 03:22 PM
Thanks, That would be fun to make and play, and probably not that hard. I have Cocoa code for checking the RGB color of a pixel in an NSImage for the masking. If anyone did make this type of game it could be extended to build a worms style game too. If anyone can make some graphics that would be great because I think I will have a go at this...
Who is with me?

Josh
2002.11.14, 06:30 PM
I would go in with you in programming. Would it be Obj-C Cocoa?

Carlos Camacho
2002.11.14, 10:55 PM
I'll lend a hand with sound and graphics. Can you make some sort of simple design doc? I think Lemmings is a good start, but like Airburst, you want to ADD to the game so it isn't a 100% clone. (Better in legal view too.)

I would like to see some things introduced in the environment, like water, waterfalls, cave-ins, etc...

w_reade
2002.11.15, 09:38 AM
I'd be very interested in being involved in something like this, but my personal vision is of something a bit more like the PC shareware game Molez. Anyone ever play this? It's basically Worms in real time, and it's pretty good, although I'm sure we could improve on itÖ 'cos we're all so damn good. Maybe :D.

DaFalcon
2002.11.15, 11:00 AM
Worms! I'd love to get in on creating a cocoa worms game! I would also help out in a lemmings game if needed, but worms has to be one of my favorites :-)

Who doesn't like exploding sheep? (don't answer that)

Of course, I can only really offer graphics, testing and ideas (not code, sound, music), but if you'd like me to supply anything, let me know!

Maybe we could make both a lemmings and a worms game simultaneously with the same codebase?? Or am I getting ahead of myself? :)

Ice Cream Joe
2002.11.15, 08:03 PM
Maybe we could make both a lemmings and a worms game simultaneously with the same codebase??


Perhaps it could be the same game? You would have the lemmings with the standard jobs, like blocker and builder, but also have jobs like grenadier, mortar, drunken boxer, etc... you'd get the standard number of lemmings, say 20 or whatever, and another player will be on the other side of the board with the same. The object could either be to simply be the last team left alive, or get your lemmings to the exit, which could be somewhere behind where the other player starts.

Might make an interesting real time strategy...

Joe

w_reade
2002.11.15, 10:34 PM
Lemming RTSÖ Oh yes! You could have one lemming under your control at all times with the keyboard, use the mouse for selecting different lemmings and giving them orders and switching to controlling them - or possibly you could be a super-lemming, with certain special abilities (the ones we want to do but can't write good AI for ;)).

Basically, you'd be a boss with hordes of slaves doing your bidding, and so would your opponentÖ

Big 2d side-on maps with, if it's feasible, a terrain engine that can handle cave-ins, and explosions that conserve debrisÖ I think it could be done, but I'd need to try it to see if it was actually doable. Fog of war would cover places you haven't observed, so you'll need to actively search for people mining the roof of your home cavern, sending it crashing down to bury everyoneÖ it'd be great.

We might need some sort of resource-collecting thing going on so players could get new lemmings and uses of abilities, but shorter games - with strictly limited (maybe no) extra resources - would be good too. Those games would probably usually come down to the two super-lemmings hunting each other through damaged tunnels. Which would also be a good thing. Those would be simple "kill the other super-lemming" affairs, but slightly more varied objectives could be managed in single-player.

For 1P, you could be fighting some sort of monsters (bigger/tougher than lemmings?), but would be able to have wars against other lemming armies for 2+ players?

Comments?

DaFalcon
2002.11.16, 01:55 AM
hah!

Perhaps it could be the same game?

That is *exactly* what I was thinking as I sleepwalked (sleptwalked??) to my Stats class after posting that message this morning. It would be so great to have a worms/lemmings combo game, and w_reade really did a great job of starting to describe how such a thing would work. I am very much infatuated with this concept :-) I'm going to go start a new thread in Game Design...

ededed
2002.11.17, 03:56 PM
I like these ideas. It sounds like we will end up with a proper game!
:D

> I now have a basic lemming thing Cocoa/ObjC and it uses a big image and splits it up. It basically draws a bouncing ball that "walks" from left to right. It will probably be best to use the tried and tested two images thing (or possibly use the tiff alpha channel instead of a mask) instead of this idea:

> I don't know how possible this is but at least on a CRAY super computer it would be fun...
www.sodaplay.com
Have a play then read on:
If all the terrain was made of these springs then the whole world would be elastic and for example if a worm/Lemming was standing on a platform then another worm blasted it the platform would spring up and send him flying, or if there were several on a bridge then it would bend and pull then all into the center.

> If it is image based we will need an editor that supports some sort of object file so that we can implement moving/animated hammers, catapults, escalators etc..

> I guess an important list of things we need are:
Some nice music, like hooptie
Sounds for explosions etc
Our thoughts gathered
Graphics for the "Lemmings" or "Worms" or whatever, I think 32*32 for each cell of a big image. I plan to use a vertical line from the center of a 32*32 block as a collision area.
More graphics... Backgrounds, weapons etc
And a general brainstorm..

;)

DaFalcon
2002.11.17, 04:17 PM
ededed, join us at http://www.idevgames.com/forum/showthread.php?s=&threadid=1319 ... I basically continued the thread over there.