PDA

View Full Version : Asteron


DM6
2004.07.05, 06:48 AM
Hi all.

http://student.bard.edu/~dm488/Asteron.dmg

This is an early stage of Asteron, which is to be my first "real" game. It's an Asteroids game that goes for the vector look made recently popular by the 21 Days Later contest. Let me know what you think of it so far.

Keys are the arrow keys to turn and thrust, and spacebar to fire. There is no hyperspace right now. Enemy ships, powerups, etc. are also yet to come.

-Duncan

Corun
2004.07.05, 07:10 AM
Wow, nice!
I love the way all the liness have a sort of glitter.
Looks great and no bugs at all!

One thing though, make sure to make it different to Asteroids in some way... maybe bouncing off the side instead of wrapping or something. Try to distinguish yours.

DM6
2004.07.05, 07:21 AM
Wow, nice!
I love the way all the liness have a sort of glitter.
Looks great and no bugs at all!

Thanks! Glad you like it.


One thing though, make sure to make it different to Asteroids in some way... maybe bouncing off the side instead of wrapping or something. Try to distinguish yours.


Oh, but of course! Like I said, I'll be adding enemy ships, powerups, bosses, as well as a few other "modern" innovations. This is what I'd call a starting point.

Question: do you have SDL installed on your machine? I tried running the app from another powerbook that I know doesn't have it, and it didn't run. I think I have a few things to learn about Xcode...

Corun
2004.07.05, 07:27 AM
Thanks! Glad you like it.



Oh, but of course! Like I said, I'll be adding enemy ships, powerups, bosses, as well as a few other "modern" innovations. This is what I'd call a starting point.

Question: do you have SDL installed on your machine? I tried running the app from another powerbook that I know doesn't have it, and it didn't run. I think I have a few things to learn about Xcode...

Yeah, i have loads of SDL stuff on here.

(this is iirc):

To make people not need sdl i believe you have to create a folder in TheApp.app/Contents called Frameworks. Then just put any new frameworks in there.

I do it with an app i am writing and it seems to work fine.
it also ups the size a bit though...

DM6
2004.07.05, 07:39 AM
you have to create a folder in TheApp.app/Contents called Frameworks.
Huh? How do I get in there? Is this in Xcode? I can't find "Contents"
Sorry if I'm being a dumb newbie.

Mazilurik
2004.07.05, 08:42 AM
You can access you application's bundle contents by control-clicking/right-clicking on the application in the Finder and choosing "Show Package Contents." There is also a way to set up the bundle contents in Xcode, though I'm not sure about the specifics; this would save you the trouble of having to manually copy frameworks, data files, etc. for each build. In addition to SDL, I'd suggest moving the Soundfiles directory into the Contents/Resources directory inside the bundle, unless there's some compelling reason to leave it separate; this would make the game application entirely self-contained, making a separate folder for it unnecessary.

DM6
2004.07.05, 09:37 AM
Ok, done and done. Everyone should be able to run it now, and there is no longer a pesky Soundfiles folder to tag along with the app. So awesome! Thanks for telling me how it's done.

While we're on Q&A, I have a few more newbie questions I've been struggling with. Many many thanks for any answers:

1) I'm using SDL_mixer for sound, and it seems that either I'm using it wrong, or it's a very glitchy library. You may notice in the game if you fire steadily at a certain rate, the laser sound gets played twice for a single shot. Why does this happen? I call the function only one time per keydown event.
The tutorials I've found on SDL_mixer have only demonstrated how to play a sound repeatedly when a key is pressed (which is of course not what the laser gun requires; it fires one shot at a time). However, the engine thrust sound DOES need a looping sample. That works fine except for when the thrust key is released, whereupon you hear a noisy click from the sound stopping. In no tutorials or documentation for SDL_mixer have I found a way to stop a looping sound without causing a click. There is a FadeOut function, but it seems mainly geared toward slow fades (3 seconds or so), and even then you still hear faint clicks.

2) My other question deals with menus. How to do it in SDL/C++? Is an SDL app a Cocoa app? Should I use a .nib file for menus? If so, how do I write code to make them function? Do I need to use Obj-C for that?

Thanks so much for your replies.
-Duncan

applekid
2004.07.05, 10:00 AM
That is pretty impressive graphically. Better than the average Asteroid-clone. I like the squiggly of the vectors, and I like the glow of the laser gun. Very awesome looking.

JW Sipkes
2004.07.10, 04:02 AM
I like it, the laserbeams are impressive, same thing with the explosions.
It makes the game fun.. !

On bug, at one moment i was hit by an asteroid but the collision detection wasn't
there... (good luck for me)


JW