Starward Rogue:XML - Overall Organization

From Arcen Wiki
Jump to navigation Jump to search

Overall Organization

There are a few key words that are important to understand for purposes of the API documentation.

GameEntity

  • This is most things in the game. But, specifically:
  • GameEntityCategory.Shot
    • These are actual individual bullets moving around. They might be part of some larger pattern or who knows, but the important thing is that this is one bullet moving around.
  • GameEntityCategory.Ship
    • Good or bad, this is either a player or an enemy.
    • Ships CANNOT attack directly. They have to have guns mounted on them (see below), and then the guns do the attacking.
      • If a ship looks like it has no gun, it is using an invisible gun.
  • GameEntityCategory.ItemPickup
    • These are actual item pickups that you can step on and pick up. You can also drop these.
    • If you are doing item design, probably this is where you will do that.
  • GameEntityCategory.Obstacle
    • This is a very strange category and likely you won’t do much with. These include things ranging from mines to interior walls to those floor-mounted lasers to the shootable and bombable wall bits, etc.

EntitySystem

  • These are things that do stuff when mounted on a ship. Usually that means shoot something, but it could also be a system for healing or who knows what.
  • Typically when an item is picked up by a player, it’s going to add a new system to the ship of the player, and/or remove some. Well, maybe half the time. That leads into...

EntityModifier

  • These are not things that you can define directly, unlike all the things above. But they’re so central that I’m going to go ahead and mention them here. You will be asking us for new modifiers all the time, and we’ll code them and then you can use them, so it’s not like these aren’t relevant for you.
  • A modifier can be applied either to a system or to a ship, and it causes some sort of behavioral change or other effect. These might last for a little while or forever.
  • For example these might cause the bullets from that one system to ricochet from now on, or might cause all bullets from all systems on the ship to move past non-wall obstacles for the next 30 seconds.

PeriodicMovementMode

  • This is another thing that you can’t define directly, but again is super central and something you’ll be asking us for now and then. These are things that you’ll attach to various enemies to make them behave in very specialized ways for a little while.
  • For example they might do an “insane through-wall charge,” or a “shadow dash,” or a “freakout.” We’ll be adding to this list with time.

BulletPattern

  • This is incredibly important and something that is not to be confused with shots. A bullet pattern is basically defining scripted behavior in a SHMUP-like fashion for one bullet that comes out of a system of a ship.
  • The original bullet typically dies immediately on being fired, but spawns a bunch of other bullets that then do a bunch of other insane stuff, which might include spawning yet more bullets.
  • I’m using the word shot and bullet interchangeably here, but the actual word in code is shot.

BulletPatternVariables

  • These are not actually a game thing, but rather are a convenient way for setting up far-more-complex bullet patterns without having to repeat large sections of code repeatedly.
  • An individual bullet pattern variable is something that does the bulk of the logic for a bullet pattern, but it can take in variables that you define, and one bullet pattern can call the same variable multiple times with different arguments each time, or multiple bullet patterns can call the same variable with different arguments and get hugely different results.
  • Individual variables can even call other sub-variables in order to avoid duplicate code.
  • Basically: if you find yourself copy-pasting a large amount of bullet code that will be largely identical except for some numbers here and there, then you’re doing it wrong. ;)
    • You need to make one bullet variable that contains that block of code, insert variables for those numbers you want to have vary, and then call the variable with those numbers passed in differently each time.
    • Why do this? It’s easier to read, for one. It’s also easier for you to fix bugs or make other tweaks in, so it saves you time. It’s quicker to type out in the first place, once you’re used to it.
  • If you’re a programmer, you may note that the word “variable” is actually kind of inappropriate here. These “variables” are actually a bit more like methods or functions at this point, to be honest. They started out more variable-like, sorry about that.

FloorGeneration

  • There’s some various stuff in here relating to how dungeon floors get created.

Image Folders

A lot of this stuff uses images, of course. There are a few things to explain about these folders:

  • RuntimeData/Images/Items
    • Anything that is an ItemPickup will have an image in here.
    • Subfolders are arbitrary, and are defined just for organizational purposes.
    • Chris will be the one defining most of the actual images in here, so if you are making a new item pickup that doesn’t yet have an image, you can just reference some other item image temporarily.
  • RuntimeData/Images/Ships
    • Anything that is a Ship goes in here.
    • Subfolders are arbitrary, and are defined just for organizational purposes.
    • Chris will be the one defining most of the actual images in here, so if you are making a new ship that doesn’t yet have an image, you can just reference some other item image temporarily.
      • THAT said, if you are making a variant of a ship that combines a base with some other attachments that already exist but not in the combination you want to use them, then you can do that. That won’t actually require you adding any new images, but you would want to look in these folders and see what’s available to you.
  • RuntimeData/Images/Shots
    • If you want to see what the various shot shapes are, this is where you come look. It’s a really good idea to do so that you can properly design bullet patterns -- or even individual gun shots -- that “feel right.”
  • RuntimeData/Images/Systems
    • Any entity systems that are defined will be referencing someting in here. Either that will be a visible turret or other attachment, OR it will be referencing “Invisible,” which is a tiny transparent image. A lot of systems will do that.
    • Subfolders are arbitrary, and are defined just for organizational purposes.



Starward Rogue XML Documentation Main