Some progress towards multithreading

Alright,

I’ve made some good progress today. I’ve got a super basic new/load title screen that loads…well so far it only loads one new thread, but it will handle the two threads that I can think of right now, the GUI and Logic thread.

It’s been tough going to get to this point because I was really having trouble figuring out the proper module structure, but what I’ve done is kept most everything in the global space of each of the 10 or so modules I’ve got, and just use a ludicrous amounts of module.attribute calls, which means I do a lot of imports over from module import. I can’t see that being a good thing in the future, but for now it’s what I’ve got.

The project doesn’t have shooting, GUI beyond pygame or enemies yet, because the modules haven’t been fully updated yet, but so far it just looks like I’ve gotta keep renaming certain objects, which Wing makes crazy easy. I’d really like to take the time here to outline all the positives, but I really don’t have anything to compare it to, other than notepad 1. It’s got just about everything you’d need

Anyways, like I mentioned I need to update those other parts before I can start making forward progress. I imagine I’ll need to learn how to use Queues to properly sync my threads, but I’ll have to leave that for another time.

So what I’ve learned today is that globals do not need to be at the start of a function, despite what I used to think, imports are sort of tough to get right, but fairly easy once you get the hang of it, and that it still feels really good to see what you’ve made work, despite little visible change.

Leave a Reply

Your email address will not be published.