doodle/docs/Milestones.md

5.0 KiB

Milestones

As a rough idea of the milestones needed for this game to work:

SDL Paint Program

  • Create a basic SDL window that you can click on to color pixels.
    • Connect the pixels while the mouse is down to cover gaps.
  • Implement a "screenshot" button that translates the canvas to a PNG image on disk.
    • F12 key to take a screenshot of your drawing.
    • It reproduces a PNG image using its in-memory knowledge of the pixels you have drawn, not by reading the SDL canvas. This will be important for making the custom level format later.
    • The PNG I draw looks slightly different to what you see on the SDL canvas; maybe difference between Renderer.DrawLine() and my own algorithm or the anti-aliasing.
  • Create a custom map file format (protobufs maybe) and "screenshot" the canvas into this custom file format.
  • Make the program able to read this file format and reproduce the same pixels on the canvas.
  • Abstract away SDL logic into a small corner so it can be replaced with OpenGL or something later on.
  • Implement a command line shell in-game to ease development before a user interface is created.
    • Add support for the shell to pop itself open and ask the user for input prompts.

Alpha Platformer

  • Inflate the pixel history from the map file into a full lookup grid of (X,Y) coordinates. This will be useful for collision detection.
  • Create a dummy player character sprite, probably just a render.Circle(). In Play Mode run collision checks and gravity on the player sprite.
    • Create the concept of the Doodad and make the player character implement one.
  • Get basic movement and collision working. With a cleanup this can make a workable ALPHA RELEASE
    • Ability to move laterally along the ground.
    • Ability to walk up reasonable size slopes but be stopped when running against a steeper wall.
    • Basic gravity

UI Overhaul

  • Create a user interface toolkit which will be TREMENDOUSLY helpful for the rest of this program.
    • Labels
    • Buttons (text only is OK)
      • Buttons wrap their Label and dynamically compute their size based on how wide the label will render, plus padding and border.
      • Border colors and widths and paddings are all configurable.
      • Buttons should interact with the cursor and be hoverable and clickable.
    • UI Manager that will keep track of buttons to know when the mouse is interacting with them.
    • Frames
      • Like Buttons, can have border (raised, sunken or solid), padding and background color.
      • Should be able to size themselves dynamically based on child widgets.
    • Windows (fixed, non-draggable is OK)
      • Title bar with label
      • Window body implements a Frame that contains child widgets.
      • Window can resize itself dynamically based on the Frame.
  • Create a "Main Menu" scene with buttons to enter a new Edit Mode, play an existing map from disk, etc.
  • Add user interface Frames or Windows to the Edit Mode.
    • A toolbar of buttons (New, Save, Open, Play) can be drawn at the top before the UI toolkit gains a proper MenuBar widget.
    • Expand the Palette support in levels for solid vs. transparent, fire, etc. with UI toolbar to choose palettes.
  • Add a "Canvas" widget that will hold level drawing data and abstract it out such that the Canvas can have a constrained width and height, position, and "scrollable" viewport area that determines rendered pixels. Will be VERY useful for Doodads and working on levels smaller than your window size (like doodads).

Lesser important UI features that can come at any later time:

  • MenuBar widget with drop-down menu support.
  • Checkbox and Radiobox widgets.
  • Text Entry widgets (in the meantime use the Developer Shell to prompt for text input questions)

Doodad Editor

  • The Edit Mode should support creating drawings for Doodads.
    • It should know whether you're drawing a Map or a Doodad as some behaviors may need to be different between the two.
    • Compress the coordinates down toward (0,0) when saving a Doodad, by finding the toppest, leftest point and making that (0,0) and adjusting the rest accordingly. This will help trim down Doodads into the smallest possible space for easy collision detection.
    • Add a UX to edit multiple frames for a Doodad.
    • Edit Mode should be able to fully save the drawings and frames, and an external CLI tool can install the JavaScript into them.
    • Possible UX to toggle Doodad options, like its collision rules and whether the Doodad is continued to be "mobile" (i.e. doors and buttons won't move, but items and enemies may be able to; and non-mobile Doodads don't need to collision check against level geometry).
  • Edit Mode should have a Doodad Palette (Frame or Window) to drag Doodads into the map.
  • ???