Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

FPSC Classic Scripts / 2d-Shooter reward-system possible?

Author
Message
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 22nd Jun 2011 11:31
Hi @all,

question is about the wellknown reward-system of classical 2d-shooters like r-type, that when there comes a wave of enemies, if you kill the whole formation then a reward pops up (money, upgrades, healthpack etc.). if you don´t kill all enemies of this one wave, then no reward appears.

i don´t think that its possible at the moment, but i am a noob so could be that anyone of you will get that.

logical way to do this would be working with cloned enemies, lets say 1-time cloning of 10-20 copies. that is the only way i can imagine how this eventually could work.

any clues from your side? would be great.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 22nd Jun 2011 11:57
A rewards system, like you describe, is possible within FPSC. It will just depend on what you are planning.

Easy things to use as rewards are health, cash, etc. as these can simply be added automatically to the player.

Adding guns, or a time limited strength bonus or immunity bonus, is probably a little more complicated, but still possible.

Cloning 10-20 enemies, however, will be difficult pure on the basis that this will sap your frame rate. Cloning waves of 5 enemies would be very possible.

For my SmashTV remake, i spawned Microwaves, gold-bars, VCRs, health packs and the odd weapon when a wave of enemies were completed.

What ideas do you have?

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 22nd Jun 2011 12:40 Edited at: 22nd Jun 2011 12:44
in main i thought about healthpacks, so they shoot the sh*t out of you and you can only survive the level if you are good enough when you kill, lets say 20 out of 30 waves.

i managed to get 10-20 cloned enemies at a time with level/graphicdesign and simple scripts (game is set in siluettes without shaders, textures or big lightmapping, it will get something "pure" in design so you can fully concentrate of what shooters are for > masses of enemies ending in heavy gunfire^^).


i still like speedy 2d-shooters more than the most fps, they are more fun and through the fact that they are so hard to master in searching the right way to move through the enemy-waves, the replay capability is much more given (remember gladius, r-type, ikarus, turrican or x-out? great times. i try to convert game feeling of these into a 3d-surrounding, so easy moveforward-shoot scripts and straight level design, armed-satelites and BIG (scripted) bossfights with massive heavy-weapon fire )

i clued the most problems, also most scripts i need. i have only to learn how to throw them in and then the simple thing about char-meshing/animations in blender & co (yes, this was sarcastic^^)

see picture attached for the "simplified" graphic style (pictures are out of the x10-demo, but i managed to get this 95% converted into x9). hope i can create a good electronic-noise-soundtrack, but that is on a good way, i have some experience in that.

would be great if you can help me/push me into the right direction with the question about how to script "enemy-wave-rewards", because i am totally new in scripting / programming). the easiest would be to create leveldesign where you have to pass each enemy, but the reward system would give more fun and a wider range of possibilities in level-concept.

Attachments

Login to view attachments
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 22nd Jun 2011 12:52
nice looking level. I'm happy to help you script. Best thing to do first is get it clear in your head, or better, on paper, exactly what you want to happen. Something like:

Quote: "At the end of each wave, spawn 2-3 health packs.
After every 20 enemies, spawn a better gun.
After 10 head-shots give the player 30s of immunity from damage.
After 3 kills without recieving damage open a secret door."


This will help you create the script.

I'm looking to create something a bit fresh looking so I may be asking for your help

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 22nd Jun 2011 14:10 Edited at: 22nd Jun 2011 14:17
thank you ched.

the given samples sound great if doable and very complex, but basically its the thing about health-reward, i didnt integrate a points-ranking or something like that, and char-development (weapon/vision,speed-upgrades) are given through the storyplot, but this opens completely new ways to the game and many easter-eggs to include.
give me time until weekend to think over. it would be great if you can help me or give me a hint how to create an easy enemywave-script with health-reward so i can test it. i have no clue where i have to start with this, i only rewrite normal mainscripts at this time (as said i am totally new to this).

very cool that my thinkings and much more are basically possible in fpsc, thats awesome.


if you need help in graphic design & concept art, give me a mail-punch, i will help you if i can.
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 22nd Jun 2011 17:10 Edited at: 22nd Jun 2011 17:17
maho76,

Unfortunately I am getting married this weekend and today is my last day where i can access the forum. I will be back in 3 weeks when I can help you out a lot more.

In the mean time, to create a general wave script - you will need to create the following:

* Create and position your enemies as you wish. It is important so given them individual names and set the "spawn at start" to NO.
* The other spawn commands are fairly obvious, but i would recommend playing with them so you see what they do and what you like or don't like.
* Place a trigger zone at the location of the player you want the enemies to spawn. In my game, i had a single entrance door, so i placed the trigger just in front of the door. the zone then triggers the door to close and the enemies to appear.
* Then you need to create you script to spawn the enemies. To trigger each enemy i typically use:
:plrwithinzone=1:settargetname=BigBadEnemy,activatetarget=1


The limitation of this method is that once the enemies have been activated, you cannot stop the spawning so endless waves of enemies will be created.

To get around this you need to create 1 enemy for each wave. For example, say you want two waves; 5 enemies in the first and 20 enemies in the second.
What you would do is create one enemy, called EnemyWave01, and set their spawn parameters so that only 5 enemies are spawned. Next create another enemy, called EnemyWave02, and set the spawning parameters for 20 enemies.

You then need to modify the trigger script so that you only activate the 2nd wave when the first wave is complete. The best way to do this is with variables. Variables are your friends in FPSC. They enable you to do lots of cool things.

Many method for waves was to create a variable called "EnemiesInWave", which i declared at the top of the trigger zone

:state=0:dimvar=EnemiesInWave,setvar=EnemiesInWave 0,state=1

I would then add to this variable when an enemy way spawned (by modifying the enemy's appear script)
:state=0:addvar=EnemiesInWave 1

Then reducing this variable when an enemy was killed (by modifying the destroy script).
:state=0:subvar=EnemiesInWave 1

The trigger zone script then had something like this:


that should be enough for you to start. Once you have the waves working, we'll work on the rewards. Think as big as you like about the rewards - i like the challenge of being able to script them

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 22nd Jun 2011 17:15
I'm here to help as well.

@maho76
I can get this coded for you pretty quick, but I want you to give this one a shot first. If you get stuck just let me know.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 22nd Jun 2011 18:17
guys, you are great.

at first @ched80: replace the "Unfortunately I am getting married this weekend" into something that sounds better or dont let your wife see this have fun, my congratulations and all the best wishes.

thank you for your post, i will try my best to catch this. i will post here if get it or if i need help.

thanks, 2beastmode4u, i am sure i get stuck^^, but i will try and let you know then.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 22nd Jun 2011 23:13 Edited at: 23rd Jun 2011 01:09
had a little time now to test it and it perfectly worked out of the second try (sorry beastmode^^).
thanks to ched80, you are right, variables give a much greater dimension to the scripts. dont get how to not spawn a health-pack with each dying copy , but i think about it the next days.

any help with this or pushing mew in the right direction would be desirable
Wraith Staff
17
Years of Service
User Offline
Joined: 3rd Apr 2007
Location: Hamilton, OH
Posted: 23rd Jun 2011 06:41
Quote: "Unfortunately I am getting married this weekend and today is my last day where i can access the forum. I will be back in 3 weeks when I can help you out a lot more.
"


Ched80 Congrats on getting married! Though you don't get to read "Unfortunately I am getting married this weekend" too often, so it's pretty funny if you don't mind me saying

New sig in the process of being made
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 23rd Jun 2011 20:11
Oh dear! Just popped in and noticed what I had written. It is pretty funy. I was tempted to edit it, but it makes me laugh too much.

For the record (and the future mrs. Ched80 if she's reading this) - I am very happy to be getting married.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 25th Jun 2011 10:56 Edited at: 25th Jun 2011 10:58
update: ok, get the health/normal rewards done with another settarget/activatetarget-setting as for the next waves in the triggerscript.
i dont manage to get them set to the location the last enemy died, that would be awesome, but i cant imagine how this should work. any clues?

big thanks to ched80 for explanations.

i will get some thoughts about more complex things like crossfire- and clusterbombs, satelites and so on, you said you want some challenges, i will see what i can do.

gz & have a nice WE
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 13th Jul 2011 08:09
maho76,
How are you getting on with this?
I see you're wanting the enemy to spawn in different locations - this, i'm afraid, is not possible. Enemies will only spawn at the location you place them in the editor, so you may have to change your idea with that one.

You mentioned some interesting concepts in the post above - do you have any more details?

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 13th Jul 2011 19:06 Edited at: 13th Jul 2011 19:17
hey, chad, welcome back. i have now 3 days holliday (also from family ) to work on the testlevels, so ideas are incomming.

so some thoughts:

- bombs: decal or entity appears (trigger). when activated, 2 or more named enemies are destroyed completely in a big bang decal, even with unlimited spawning. alternative: deals x damage in radius, but player dont receive damage.

- crossfirebombs: decal or entity appears (trigger). when activated, "endless" crossed laser-decal deals x damage on all entities in crossed zones around the bomb. player dont receive damage.

.........[]
.........[]
.........[]
.[][][](x)[][][]
.........[]
.........[]
.........[]

- satelites: 1 or more satelites appear, cirlcing around player(/follow player) and shoot each enemy in range until destroyed(i did this once with a darkai with mesh and texture of a vickers^^, but it only works on darkai-enemies because of team-rules)


- i asked this one in the request thread of 2beast4you, but get no reaction yet: character appears when player enters zone. character dissapears when player leaves zone so no processing is needed anymore, but reappears when player enters zone again. would be very usefull to save performance for everyone of us, but i think we would need a reversal of "destroyed" or something like that. if not, i have to work with different entities of the same char.

what do you think?

the thought about appearing the healthpack where the last enemy of a wave dies would be great to get that 2d-shooter feeling, but is not that neccesary. some thoughts around the destroy-script and remaining decal with adding variables up to number of enemies in wave destroyed and then trigger special effect in destroy-script, but i had no time to get this running, and i dont get the thing with the variables yet
another one to get this could be triggerzones with variable-activation all over the map, but that could be too much^^

i will be up with more soon.

gz
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 14th Jul 2011 15:27
Some great ideas there! I suggest you tackle one at a time, otherwise you'll be overwhelmed by the amount of scripting needed.

Here are my thoughts:

BOMBS: Killing off enemies is doable, but you won't be able to stop them re-spawning. You'll need to set up a global variable to instantly kill any respawned enemies.
The damage radius is easier to implement.

CROSS-FIRE BOMBS: This seems quite doable, I'd suggest tackling this one first.

SATELLITES: This is tough to do given the command set in FPSC. It may be easier to animate an orbiting object and get it to follow the player.

CHARACTER CULLING: WASP Mod does this (sort of) automatically, but there is no way to do it using stock FPSC and scripts. Once you trigger a spawning object, the spawning is then automatic and un-stoppable so the culling of object like you describe is not possible. I had a similar idea some time ago and wasted a lot of time finding out it wasn't possible.

HEALTH PACKS: This is quite simple to do, but if you're not so interested in this feature i'd suggest you ditch it for later.

OK, so i would start by looking at the cross-fire bombs. I think you could do it with two long trigger zones (one NS and another EW) that are activated when the cross-fire bomb is collected. you would also spawn two laser beam entities to indicate where the trigger zones are, but the enemy damage would be done via the trigger zone scripts.

So what you need to do is:
create a 'pickupcrossfirebomb.fpi' script that sets two trigger zones and two laser beam entities as its targets and then activates them. You'll need to set the target and activate each entity is sequence because you can only target one entity at a time. Once the entities have been activated, the bomb can be destroyed. This script will go in the bomb's main script placeholder.
You'll also need to create a 'crossfirebomb.fpi' script that...ah. We need to find a way of determining if an enemy is within the zone and then hurting it. I'll have a think about this.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 14th Jul 2011 15:31
Got it. You'll need to use "activateallinzone=X" to set the enemies activation level to a particular number. I usuall use 666 for destroying enemies.

You'll then need to modify the enemies' main script so that if it's activation level is equal to 666 it is damaged. You'll need to reset the activation level to another number, just after the enemy has been hurt, otherwise the enemy will be continuously hurt even when they are far away from the cross fire beam.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 14th Jul 2011 16:00 Edited at: 14th Jul 2011 16:01
answered by yourself, this could be something we can use:

http://forum.thegamecreators.com/?m=forum_view&t=181263&b=23



as said in the thread, only dead objects activate the trigger, so integrating a spawning invisible object into the enemy-script could be the solution, but i have no clue how to integrate that.

EDIT: oops, too late^^. thanks, i will try that one out.
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 14th Jul 2011 23:32 Edited at: 16th Jul 2011 02:24
you are my hero, ched80!

ok, got the bombs to work

so the same thing with only 1 bombzone for clusterbombs, i see why you wanted to start with the crossed ones. to destroy endless cloning enemies would not be neccessary at the moment, and i think i can manage this out of what i learned from you yet.

crossfirebomb-entity main script:


main script bombzones (named "zzone1" and "xzone1"):



and the snippet to integrate into the enemy-script:




so there is one left so far, and i think this will be the hardest one. i havent start modelling, so no orbiting-object from my side. but i think for testing the scripts out this is not neccessary at the moment. if you have another clue than using darkai for all enemies and satelites would be great, i dont like the darkai very much, and i only used it because of the team-buildings to get the satelites firing on the enemies. but i cannot get the clue how you want to get this done (have to learn the script-vocabularies, jjeaarrrk )

another thing is to appear new weapons as reward, but that should be no problem with a var-condition in the normal weapon-appear-script.


you showed me so much options with the variable-system and the activate=x (thought the whole time there is only 0 or 1 for x, dont know that we can use activate as another variable-setting).
drives me forward to get a good game build.

thankyouthankyouthankyou, you are my god until tomorrow morning ^^
2Beastmode4u
13
Years of Service
User Offline
Joined: 14th Feb 2011
Location: Loading...
Posted: 15th Jul 2011 00:10
Orbit around the player constantly? Or just orbit in the sky? If in the sky, I can do that but for the player... Dark AI could somewhat work.


Cheers.

God help me, Please.

Come on down to my site at Unleashed FPSCreators
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 15th Jul 2011 00:21 Edited at: 15th Jul 2011 00:27
hi beast. no its about orbiting around the player (functions also as a shield) and shooting at enemies.
i have seen the plane flying

this is a video of gradius V, at about 1 minute playtime you can see the satelite.

http://www.youtube.com/watch?v=i-bViNdLDu8

it doesnt constantly orbiting the player, but dark ai would only follow the player, and i want to get the satelite move in front of me so you can see him while player moves forward. but i think constantly in front is much harder to script than orbiting, and it would be a better effect because of 3d-surrounding (also enemies appear from everywhere). hard one is that once the satelite set a target, it has to stop firing when passing by behind the player^^
any clues to get this?


another thing for the 2d-shooter-system is:

how to get slow big bullets done? have to check out the gunspec-options for that i think
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 15th Jul 2011 10:39
Yeah the orbiting ally will be hard, may be too hard in the end, but we'll give it a go.

I've tested two ideas already without success, but I've got a few more ideas i want to test before i admit defeat though.

The 'big bullets' is a cool idea. i agree a custom weapon is your best bet. probably setting the weapon up as a 'big' grenade is the best way as you cannot define the bullet speed with gunspec commands.

[url="http://raptr.com/No_Turn_Right?src=em_forum"][/url]
maho76
13
Years of Service
User Offline
Joined: 31st May 2011
Location: universe-hub, playing the flute
Posted: 15th Jul 2011 22:07 Edited at: 15th Jul 2011 22:16
i have done a satelite-entity we can work with so we dont have to modify anything from the stockones. its a "dark-ai vickers" using the original ai-main-script so i hope this is a start for the movement/how-to-shoot-building. many errors (muzzle-position etc) and very uggly, and you have to push it directly into the enemy^^, we have to get this thing much more aggressive. i will take a hand on this, but works as a little first step.

EDIT: oh, tried around with flaks today for the big bullets. used a bazooka, but the rocket, as said here, is only affected by ambient light, so a dark point moving towards player. but dodging works, thats the main part, get them glowing later or change level designs to make them clearly visible.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-24 06:27:00
Your offset time is: 2024-11-24 06:27:00