Commit Graph

42 Commits

Author SHA1 Message Date
Simon Forman be64b90652 Minor cleanup. 2024-04-16 16:06:06 -07:00
Simon Forman 59b0241616 Show/hide/toggle reticule. 2024-04-16 14:04:47 -07:00
Simon Forman 8e88347e37 Reticule lines to extend through the whole window.
They are mostly meant to help locate the focus when scrolling through
the large star map: scroll x (or y) until you see the line then scroll y
(or x) to find the focus; so they should extend to the scrollregion.
2024-04-16 13:30:43 -07:00
Simon Forman b04472619b Cache x y to deal with resizing canvas. 2024-04-16 12:21:00 -07:00
Simon Forman 8eab96431d A simple reticule for highlighting current star. 2024-04-16 11:57:39 -07:00
Simon Forman 65aa99c883 Precomputed easing values.
When panning the star map it would be well to have a smooth animation
for the movement.

THese values are from easeInOutQuad at:

=> https://gist.github.com/gre/1650294
2024-04-16 09:35:55 -07:00
Simon Forman 97178b84a3 Bind the mouse to the scan methods.
Now you can scroll the star map by "grabbing" the background with the
left mouse button and dragging.  Super-cool that Tk(inter) makes this so
simple.
2024-04-15 21:48:30 -07:00
Simon Forman 7331580bfd Update canvas width and height when window changes.
I don't know why Tk(inter) doesn't do this?
2024-04-15 21:18:24 -07:00
Simon Forman de1a55de5e Only reproduce on world in home stellar system. 2024-04-15 20:12:25 -07:00
Simon Forman c432d3c6a7 Minor cleanup. 2024-04-15 19:56:43 -07:00
Simon Forman 54bfd924b8 Blacken some code. 2024-04-15 15:32:16 -07:00
Simon Forman 8dd8ed9bca Move SQL tables into data module.
I think it makes more sense to be able to see them together in one
place, eh?
2024-04-15 15:19:42 -07:00
Simon Forman 1eaf8d5e9b A crude but servicable growth cycle.
Bio grows, populations consume bio and grow or consume too much and
crash.  THat could set up the first main game dynamic or challenge:
don't let your people eat everything and die.

How to draw off population?  Send them to the stars of course!

We can worry about controlling the growth rate later (either directly
under user control or affected indirectly though factors the user can
control? Something else?)

Remember that by Insect Law populations can only reproduce on their home
worlds!  That constraint isn't in the DB nor the "server" code yet
though.
2024-04-15 13:40:22 -07:00
Simon Forman d59145f78f Put all the stars & planets in the Treeview?? 2024-04-15 11:59:23 -07:00
Simon Forman 5ebcb27009 Minor cleanup, comments. 2024-04-15 11:51:41 -07:00
Simon Forman 8109192d7f Add life and people.
10% of habitable planets have life on them and 12 of those have people
on them (named after their star.)
2024-04-15 10:59:49 -07:00
Simon Forman b049f588ab Display planet info in a Tree widget. 2024-04-14 20:56:07 -07:00
Simon Forman 7219d6b336 capacity 2024-04-14 18:25:42 -07:00
Simon Forman 3d5a490c32 Generate names for the stars.
I kinda like these names.
2024-04-14 16:53:47 -07:00
Simon Forman 52fb54054e Don't make weird id ints.
I thought I could generate names from these but it's just more cruft.
2024-04-14 14:36:23 -07:00
Simon Forman 157a0b8c60 Notes, Roman numerals. 2024-04-14 10:16:39 -07:00
Simon Forman 41860ace77 Star System tab
It's janky (I used the canvas item id for the ovals rather than the DB
id column values!) but it kind of works.

It's a little too dramatic to switch tabs, I think it would tend to
undermine or at least not support spacial memory?

It seems like a reasonable thing to bind the details of the stars when
we draw them, because we have them then, eh?  The other thing to do
would be just bind the DB id and look up info in the DB as needed in
event handlers and such?
2024-04-13 22:25:29 -07:00
Simon Forman 0e0117e6be Notebook
Easy.
2024-04-13 21:38:56 -07:00
Simon Forman f40d466df1 Generate planets. 2024-04-13 17:39:02 -07:00
Simon Forman ddd68e2cb6 Give the stars large id numbers.
Then when you display them they can be mapped to a deterministic human
readable format, like letters or some Unicode symbols? Name generators?

 🌑 🌒 🌓 🌔 🌕 🌖 🌗 🌘
            
2024-04-13 15:06:32 -07:00
Simon Forman 59f0681494 Minor edits. 2024-04-13 14:10:47 -07:00
Simon Forman 6a5c1b4c2b K.I.S.S. 2024-04-13 13:51:40 -07:00
Simon Forman cd37abbeff Move stuff I'm not using to attic. 2024-04-13 13:22:37 -07:00
Simon Forman c59f341e91 Stars and galaxies? 2024-04-13 13:20:48 -07:00
Simon Forman 4c905e3aa2 A little exploration of proc gen. 2024-04-13 12:01:12 -07:00
Simon Forman 3b99a65499 some notes 2024-04-13 11:30:01 -07:00
Simon Forman c28d1be0f5 minor cleanup 2024-04-12 20:34:06 -07:00
Simon Forman be55cc5432 minor cleanup, mess with bind tags 2024-04-12 19:39:09 -07:00
Simon Forman effc940235 Move stars code into own module for now. 2024-04-12 19:11:50 -07:00
Simon Forman 9ba1c7fb31 Use SQLite rather than Pickle. 2024-04-12 13:21:07 -07:00
Simon Forman 25e5723661 copyright notice 2024-04-11 21:58:21 -07:00
Simon Forman e4020119e7 Some ah coo tray monts. 2024-04-11 21:54:52 -07:00
Simon Forman 1c0b6af550 ignore pycache dir 2024-04-11 21:48:30 -07:00
Simon Forman 9b59fee1fb Separate state generation from UI.
Now the UI loads instantaneously (the starfield takes noticable time to
generate with the Poisson process.)
2024-04-11 21:46:43 -07:00
Simon Forman 410ebbf428 Use Poisson process to lay out stars.
It actually looks better the other way?
2024-04-11 21:19:34 -07:00
Simon Forman b1fa56ddad Poisson process for 2D random points. 2024-04-11 21:05:10 -07:00
Simon Forman 0cdc3d2b0e A simple star field. 2024-04-11 20:54:55 -07:00