Author Topic: Want to start SCPing but don't know where to begin  (Read 3692 times)

0 Members and 1 Guest are viewing this topic.

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Want to start SCPing but don't know where to begin
OK.  School is nearing completion for me, and I'll have a lot of free time this summer (I still have finals this week and I'm going away the next week but after that I'm free).  The ship limit (in particular) has really been bugging me, so I figured I might as well take a look at this.  Shade said that the best way to do this would be through a linked list.  After looking through the parse code, this seems like it would be pretty straightforward with creative use of pointers etc.  The question is what to do with that linked list after it is parsed.  There are a number of solutions to this problem.  One is just to leave the list, and have a new function to look up ships based on index (instead of Ship_info[something] you would use ship_info_at_index(something)).  This could potentially create a minor performance drop, however.  The second solution would be to create an array of pointers from the linked list and use that to get random access to the list.  The third solution would be to copy the linked list into an array and free the memory used by the linked list.  This would bump up the parse time a little bit, but I'm not entirely sure it would be noticeable.  All three would require changes to everywhere Ship_info[] was used (for the last two, you would have to dereference pointers).

All you SCP guys are probably thinking that I'm forgetting something major.  How this integrates with everything else.  I know that many things, including the pilot code and multi, are dependent on MAX_SHIP_CLASSES.  If that was dynamic, it could cause strange things to happen.  This is the area that I don't have very much knowledge about, and also the area that could prevent this whole dynamification project from moving forward anytime in the near future.

So what are your opinions on this?  Is it even remotely possible at this point in time?


OK, its not possible ATM.  But I am looking to get into SCP and I don't know where to start.
« Last Edit: May 20, 2008, 08:26:31 pm by blowfish »

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Dynamification of the Parse Code
*facepalm*

If you need more ships, use an Inferno build.  Otherwise, wait for taylor's changes that are coming in 3.7.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Dynamification of the Parse Code
Otherwise, wait for taylor's changes that are coming in 3.7.

What changes would these be, exactly?

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Dynamification of the Parse Code
*facepalm*

If you need more ships, use an Inferno build.  Otherwise, wait for taylor's changes that are coming in 3.7.

All right, I'm sorry.  I'm just getting into SCP, and I don't really know where to start.  One of the biggest problems I have encountered was probably the first thing that came to mind.  Do you have any suggestions for something I could start working on?

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Dynamification of the Parse Code
Nah, that's okay.  It's just that this question comes up all the time and the answer is always the same.  It's like the FS3 of the SCP, except that you only have to wait for two years instead of for Godot. :p

If you want to start learning the code, take a look at the sexp section, since that's the most organized and easiest-to-follow part of the program.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Dynamification of the Parse Code
Well, I have already been through large sections of the code, particularly the table code, but I have also looked over the SEXP code once or twice.  I am just looking for something that needs doing.

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Dynamification of the Parse Code
You could eliminate the requirement that fighters have secondary weapons.  :)

http://scp.indiegames.us/mantis/view.php?id=1278
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Dynamification of the Parse Code
That's another one that sounds easy but isn't.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Dynamification of the Parse Code
Yeah but at least it's not already slated to be fixed in 3.7.  It was more of a joke anyway.  But if you do want stuff to do, you could look at other mantis bugs.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Dynamification of the Parse Code
Otherwise, wait for taylor's changes that are coming in 3.7.
What changes would these be, exactly?
As you saw, many things including pilot code and multi are dependent on this.  taylor has been working a long time on a big 'pilot file upgrade' (for lack of a better name), which reaches into so many things and has so many things tied together that it's taking quite a while (understandably so for such a big project).  As far as I know, this involves dynamification of limits like:
controls
number of ship classes
max number of primary / secondary banks
number of ships per wing
and surely more.  I'm sure looking forward to all that, but can hardly get my mind around the scope of the changes.

I've got quite a few ideas and 'stuff I might want to do someday' type things... perhaps I could suggest a few for you to look into and see if you're interested.  Would you like me to PM, or post them here?

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Dynamification of the Parse Code
I've got quite a few ideas and 'stuff I might want to do someday' type things... perhaps I could suggest a few for you to look into and see if you're interested.  Would you like me to PM, or post them here?

I'm fine either way :)

  

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Want to start SCPing but don't know where to begin
Post them, so people can chime in if need be.

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Want to start SCPing but don't know where to begin
Speaking from a user's standpoint, I do think that Mantis would be a good place to start, as by finding and fixing bugs you can familiarize yourself with what's already in place in a specific area, then tweak it. It will give you more direction than just wandering through the code looking for things to do.
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...

 

Offline Backslash

  • 29
  • Bring Our Might To Bear
Re: Want to start SCPing but don't know where to begin
Speaking from a user's standpoint, I do think that Mantis would be a good place to start, as by finding and fixing bugs you can familiarize yourself with what's already in place in a specific area, then tweak it. It will give you more direction than just wandering through the code looking for things to do.
I only halfway agree here... while familiarizing yourself with what's already in place in a specific area is a great way to start (it is how I started), many of the bugs in Mantis end up being not so straightforward.  It can be hard to find where in the code the bug is actually happening, and you can drown in a vague search.  But by all means, if you see one you think you could handle, go for it.

Sorry to leave you hanging, had to go to work.  Here we go!  First, there's the idea of making Swarm work for primaries.  Take a look at the discussion in Mantis #1651 for details.  Basically you'd be making new routines for primaries, imitating the existing Swarm code for secondaries and/or turrets.

If you want to later tackle something bigger... well, my ultimate goal is to bring us to something like this, combined with tertiary weapons.   The coolest thing would be for weapons to be able to spawn another weapon as a next 'phase'... this would make my Death Star superlaser idea work, not to mention any other sort of 'charging' weapons.  But I can hardly ask you to do all this right away. ;)  Unless you really wanted to.

Instead, perhaps start with something somewhat simpler:  You know how beam weapons have warmup sounds and intervals before they fire?  Add table entries that add this feature for regular weapons, and of course modify the firing functions in ship.cpp .  So you'd need four new table entries:
$Warmup
$Warmdown  * don't really need this yet, but perhaps later if we add visual effects
$WarmupSnd
$WarmdownSnd
There would be two main modes of weapon firing:
1.  The trigger is clicked.  WarmupSnd plays and waits for Warmup ms.  Now the weapon fires normally, perhaps multiple times according to Spawn settings.  (You'd need the primary swarm feature in place for this, but I think to achieve this sort of not-fire-right-away timing you'd need to do something similar to how swarm works anyway.)  Then of course when it's done firing WarmdownSnd plays.
2.  If the weapon has the "stream" flag, the weapon behaves differently if the trigger is held down:  The weapon warms up and fires as above, but continues firing (looping, including the swarm if any) until the trigger is released, then it warms down.  Understand?

Some issues that I haven't considered yet would be how it works with the AI and possibly turrets, and also multiplayer.  Also, I know Marco on game-warden was looking into the warmupsnd part of this idea as a trigger "weapon thunk" for BSG guns... he might he have some input too.

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Re: Want to start SCPing but don't know where to begin
Understand?

Mostly :nervous:

This seems doable enough.  I'll see about implementing it (hopefully this week).

 

Offline Galemp

  • Actual father of Samus
  • 212
  • Ask me about GORT!
    • Steam
    • User page on the FreeSpace Wiki
Re: Want to start SCPing but don't know where to begin
This seems doable enough.  I'll see about implementing it (hopefully this week).

Man, I'm gonna love quoting this out of context.   :drevil:
"Anyone can do any amount of work, provided it isn't the work he's supposed to be doing at that moment." -- Robert Benchley

Members I've personally met: RedStreblo, Goober5000, Sandwich, Splinter, Su-tehp, Hippo, CP5670, Terran Emperor, Karajorma, Dekker, McCall, Admiral Wolf, mxlm, RedSniper, Stealth, Black Wolf...