Program project planning
#1
Sometimes I actually plan a project before I start coding. That can involve actual diagrams and notes for myself. Here's a planner sheet for just one tiny part of a project; the attached image is the firing arc options for a spaceship combat game somewhat like super-trek but using hexes for a different look.  


[Image: firing-arc-chart.png]

Sometimes I'll even draw a flowchart.
Reply
#2
The main thing I ever find myself planning for, before just sitting down and starting to code, is the data structure I think I'm going to need for my project.

TYPE whatever
   x as integer
   y as integer
   width as integer
   height as integer
   kolor as _unsigned long
   background as _unsigned long
   xmove as _float
   ymove as _float
   and so on...
END TYPE

Of course, I'll often have to expand or alter that type as I actually get into the project, but it gives me a starting point for the minimum of what I want my code to be able to accomplish.  A good data structure is a good roadmap to knowing what needs to be implemented on piece at a time into your program.  I find them even more useful than any sort of flowchart or whatnot that Ive ever personally created for myself. Wink
Reply
#3
(03-04-2023, 12:13 AM)SMcNeill Wrote: The main thing I ever find myself planning for, before just sitting down and starting to code, is the data structure I think I'm going to need for my project.

TYPE whatever
   x as integer
   y as integer
   width as integer
   height as integer
   kolor as _unsigned long
   background as _unsigned long
   xmove as _float
   ymove as _float
   and so on...
END TYPE

Of course, I'll often have to expand or alter that type as I actually get into the project, but it gives me a starting point for the minimum of what I want my code to be able to accomplish.  A good data structure is a good roadmap to knowing what needs to be implemented on piece at a time into your program.  I find them even more useful than any sort of flowchart or whatnot that Ive ever personally created for myself. Wink

Yep, that's how I usually start out too, by road mapping the UDTs that I may use in the project. Amazing how the UDTs morph and change though as new and better ideas come to mind while setting down the road. Smile
Software and cathedrals are much the same — first we build them, then we pray.
QB64 Tutorial
Reply
#4
When I do use flowcharts it looks more like a story about what happens to the data as opposed to the functional control flow they taught me in school.  Sometimes you discover you over planned, other times you realize oops I need this piece too.

Just working on that chart I posted I realized... do I want to have combined firing arcs or not since I'm doing 3-D space battles in 2d?
Reply




Users browsing this thread: 1 Guest(s)