Archived

This topic is now archived and is closed to further replies.

i'm about to make space shooter game can you help me with ideas pls?

This topic is 5494 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, i was thinking of making a very simple scriting language to control the game''s content, each level has it''s own script, something like this, SPAF Level Script Version 1.0 Level = 1 MeshCount = 3 ID 1 = Load "MeshFilename1.x" ID 2 = Load "MeshFilename2.x" ID 3 = Load "MeshFilename3.x" WavesCount = 2 // number of enemy waves for this level On Wave 1 StartTimer // sets timer to 0.0 { // i have a timer that controls everything from movement of the ships to etc.., ie other events, On Timer 5.0 // on 5 seoncds Launch 10 of ID 1 // launch 10 ships LaunchRate = 0.5 // interval of ships on launching in seconds Velocity = 1, 1, 1 // arbitrary velocities On Timer 8.0 ID 1 Velocity = 2, 2, 2 // change velocity ID 1 Rotate = 40 // in degrees On Timer 11.0 SetTimer to 5.0 // so it would make the same movement again /// and so on..., } I saw some other space shooter games that they have an editor that defines that movement path of the ships but i don''t really understand how it works or how is it presented in a text file(once save), here''s one of them, the way i see how the ship moves is limited in changing the velocity or rotation of the ship, also, all i know are these spaceships really doesn''t have any AI but are just moving on their defined paths as well as firing dumbly, so anyway back to my topic, how do i go by generating the ship''s movement paths? those sine waves, circling around etc.., many thanks,

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Instead of using a velocity (and ''real'' physics) to script your ships (and using next_position = position + velocity*time_change) you could just draw a curve (in the editor) that the ship would follow (no need for velocity)

ie position of ship
= f(time - time when curve came onscreen )

when f is the (vector) function defines the curve.

More than likely this will be something like bezier curves or something like that.

Sorry this isn''t very clear - look up bezier curves and you''ll see how the parametrization method works (and that gives your f).

Basically you''ll end up specifying points than you want the curve to go through so you text file format will look like:

...

When player reaches position 343
{
Launch 10 of ID 1
LaunchRate = 0.5
Follow Curve
(1, 2) // these are the co-ordinates the curve
(23, 23) // goes through
(34, 6)
...
[action when finished]
}

action when finished if probably repeat or explode or something

Hope that helps!

Share this post


Link to post
Share on other sites
hi ap,

thanks for your insights,

i was also thinking about bezier curves but by just changing the velocity of the object, i could also mimic those movement and is less complicated.., i think,

anyway, if i do use bezier curve.., ehm.,
quote:

Follow Curve
(1, 2) // these are the co-ordinates the curve
(23, 23) // goes through
(34, 6)



are those enclosed in parentheses are the control points? anyway, wouldn''t it also be harder if i use bezier curves, i mean, it would be harder to construct(type) the movement of the ships if i''m to use bezier curves..,? imaging placing these control points compared to my other method.., i dunno, maybe not

also, if i''m to use bezier, then i should use catmullrom interpolation so i could get the smooth movement right?

i''d still like to hear from other people''s opinion though..., thanks again ap,

Share this post


Link to post
Share on other sites
hiya,

any other opinions?

how about the map editor for the paths of this ship? do i still need it if i''m to have my own very simple custom scripting language?

i just liked to know what/where''s the best way to start or the right tools to create/use,

Share this post


Link to post
Share on other sites
well as far as the game goes I suggest useing Quaternions to handle your ships rotations and such, as for the bezier curves you can learn those at NeHe linked too by the main page under Hosted Sites. as for Ideas for a neat game I kinda like Big Glowing Engines that like Spray out ward in random ways . Just an idea. As for the map editor having ship paths Im not really sure its more or less your preference but it may be more usefull to say in a script FOLLOW PATH (A); because it is more or less made to be fitting for your envuroiment. then it would to say GO TO POINT (0,0,0); TRAVEL CURVE (0,0,0. 1,0,0. 0,1,0. 20,12,1); but that would be usefull for something that relates to another object such as a mother ship or something. like

GO TO (SHIP(PLAYER_MAINSHIP).x,SHIP(PLAYER_MAINSHIP).y-40,SHIP(PLAYER_MAINSHIP).z); WHEN REACHED {DOCK WITH (PLAYER_MAINSHIP); }

Heh, Just a (few) ideas and suggestions

hope your project turns out cool. Good Luck, Xero-X2.

Share this post


Link to post
Share on other sites
hiya,

thanks for the thoughts! anyway,

if it's going to be bezier curve, can i use a catmull-rom interpolation then to move between these control points?

and another, how do you call a function within your code from your scripting language?

thanks,

edit: Xero-X2, i couldn't find the bezier topic on nehe's site,

[edited by - mickey on November 26, 2002 6:45:08 AM]

Share this post


Link to post
Share on other sites
here is a link to it Its called Bezier Patches but it teachs Bezier curves to make the patchs. Good luck with them.

http://nehe.gamedev.net/tutorials/lesson.asp?l=28

Share this post


Link to post
Share on other sites