Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.

New to the forum? Say hello in this topic! Also make sure to read the rules.

Why are the official survival maps scripts so complicated?

Share questions and tutorials related to the map editor. Share you maps in the Superfighters Deluxe Custom Maps section.
Forum rules
By using the forum you agree to the following rules.
Post Reply
User avatar
Mr Argon
Fighter
Fighter
Posts: 56
Joined: Sat Mar 09, 2019 2:22 am
SFD Account: Argón (steam)
SFD Alias: Mr. Argon
Started SFD: Pre-Alpha 1.8.2c
Location: Argentina
Gender:
Age: 20

Why are the official survival maps scripts so complicated?

Post by Mr Argon » Wed Jan 22, 2020 2:32 am

Don't minsunderstand me... maybe it's because I'm not very high-skilled with C#, even when it's used in SFD with it's own classes and codes.

But I've been taking a look at the script window of the official survival maps, and I found very complex things for something I think it's quite simple, just randomize some enemy spawners and give them random weapons. There's a lot of classes and voids referencing lists of weapon items and queues to spawn both weapons, enemies and bosses.

My question here is, by simple curiosity, Is all that because of a very complex randomizing-everything thing? or it's because of map optimization maybe?
0 x
I'м д Liттlэ оdd... sтill саи livе шiтн тнат.

User avatar
JakSparro98
Superfighter
Superfighter
Posts: 530
Joined: Fri Jul 15, 2016 7:56 pm
Started SFD: PreAlpha 1.0.5
Location: Rome, Italy
Gender:
Age: 25

Post by JakSparro98 » Wed Jan 22, 2020 2:19 pm

Mr Argon wrote:
Wed Jan 22, 2020 2:32 am
Don't minsunderstand me... maybe it's because I'm not very high-skilled with C#, even when it's used in SFD with it's own classes and codes.

But I've been taking a look at the script window of the official survival maps, and I found very complex things for something I think it's quite simple, just randomize some enemy spawners and give them random weapons. There's a lot of classes and voids referencing lists of weapon items and queues to spawn both weapons, enemies and bosses.

My question here is, by simple curiosity, Is all that because of a very complex randomizing-everything thing? or it's because of map optimization maybe?
All the code in there is for pure gameplay purpose.

Scripting gives you a lot of flexibility in coding features that otherwise should be all done hardcoded in the core game files, they get big really fast for that, and complexity in this particular case comes when you need to add custom structures, custom classes to manage said structures and so on (random events, wave manager, wave structure,etc...)

Just for saying, the official wave system it's not a simple random enemy chooser, it balances the number and what kind of enemies to spawn according to the current wave, it has some wave presets that gets partially or fully invoked based on said wave count, subwaves for managing the amount of spawns per wave followed by a multiplier that tweaks the final amount of spawned enemies, a random mini boss with a starting dialogue and death dialogue that spawns on regular intervals, and I omitted the scoring system... it's all made through code.
3 x

User avatar
Hjarpe
Lead Designer
Lead Designer
Posts: 480
Joined: Sun Feb 28, 2016 8:02 pm
Started SFD: The grey dawn of time
Gender:
Age: 33
Contact:

Post by Hjarpe » Wed Jan 22, 2020 7:03 pm

JakSparro98 wrote:
Wed Jan 22, 2020 2:19 pm
All the code in there is for pure gameplay purpose.

Scripting gives you a lot of flexibility in coding features that otherwise should be all done hardcoded in the core game files, they get big really fast for that, and complexity in this particular case comes when you need to add custom structures, custom classes to manage said structures and so on (random events, wave manager, wave structure,etc...)

Just for saying, the official wave system it's not a simple random enemy chooser, it balances the number and what kind of enemies to spawn according to the current wave, it has some wave presets that gets partially or fully invoked based on said wave count, subwaves for managing the amount of spawns per wave followed by a multiplier that tweaks the final amount of spawned enemies, a random mini boss with a starting dialogue and death dialogue that spawns on regular intervals, and I omitted the scoring system... it's all made through code.
Couldn't've explained it better myself. I'm impressed someone took the time to understand the code :)

It's a complex system, and most games would hide all that away behind the scenes. In SFD, we put a lot of the rules in the map script itself. Partly to allow us to make more varied survival maps (they all have slightly different quirks and rules) and to allow users to create their own crazy stuff.

This obviously comes at the cost of accessibility - making a survival map is a big undertaking because you have to understand how a whole bunch of things work. So understandably, not a lot of people are doing it. It would be cool if anyone could make a survival map, Mario Maker style, but that would require a lot of restrictions that SFD doesn't have by design. It's a tradeoff that we are very aware of, and have talked about a lot - for our next game, we want to try something a bit different. 'Nuff said for now...
2 x
Quinterball: Vigorously shaking a tile while rapidly tapping CTRL causes the selected tile to randomly flash red.
MythoLogic Interactive: By design.

User avatar
Mr Argon
Fighter
Fighter
Posts: 56
Joined: Sat Mar 09, 2019 2:22 am
SFD Account: Argón (steam)
SFD Alias: Mr. Argon
Started SFD: Pre-Alpha 1.8.2c
Location: Argentina
Gender:
Age: 20

Post by Mr Argon » Thu Jan 23, 2020 2:24 am

Thanks for the answer... one more thing. Does that means that you can't eventually do a sirvival map with a "simpler" style. I ask this because I'm finishing a survival map called "Siberia Zombie Crysis" and I used a lot of PlayerSpawnTriggers, that means waves got fixed amount of enemies carrying the same weapons. The map itself is intended to be played with always four players. I forced it to fill player slots with bots, which have some "buffs" to help them last more time in hard situations.

I'd like if one of the high-skilled programmers of this forum could take a short look to the map after or before I publish the full version on Steam Workshop, it would be a great opportunity to learn more about C#

Thanks in advance :)
0 x
I'м д Liттlэ оdd... sтill саи livе шiтн тнат.

Post Reply