Friday, 2 December 2016

Adventopolis #2 - Friday NMS

Strangely enough, sometimes I do more work during the week, coming back tired from work, than the weekend. There is this illusion that if I can produce stuff in 1-2 hours after work, imagine what I could do when I have two and a half days for free without the dread that the next morning I have to get up early.

But that's what gets me. I am more relaxed. I know that if I spend the whole night into something else, I can do things tomorrow where I will have 16 hours at my disposal. And then Sunday. And then Sunday comes and I feel that dread of another weekend ending and I don't want to spend my last hours before the work-week dreadfully pushing some code.

Thankfully it didn't happen today. Well, I am writing this and I don't want to procrastinate fully yet, and also I am working in easy straightforward parts of code where I know what to do next. But anyway, No Man's Sky has the Foundation update and I wanted to play it and thought to start playing but had to finish some code and now I am gonna start at midnight and not have much sleep for tomorrow. But I did more than I planned which is good.

In my base framework, I finished some of the automation code even yesterday. Yeah, annoying string manipulation (either on C or C++ I always found that part confusing) but now the automation works like a charm. It's a separate command line tool, I give it as argument the part name, for example "Plasma" and at various places in code there is the class PartPlasma, the enums PART_PLASMA, the code that inits Part *partPlasma = new PartPlasma(); and few more stuff. I have done it in a way with markers that works like a charm. Now all I need is run the command line tool with argument the part/effect name, it uses a partDummy.cpp/h template to replace, I copy the generate files partPlasma.cpp/h in my Demo folder, but also the Demo folder has Part.cpp/h with the Enums, so that also was coppied in Template folder and it's updated and I copy back, and then I add the two files in VS. Maybe I can automate some more but that's for now.

I also fixed a bit the input, I do have a logic now with JUST_PRESSED, PRESSED, JUST_RELEASED and RELEASED, four states. I try to integrate that with SDL Input. I think in SDL2 Input, SDL_KEYDOWN has a bit different logic than classic SDL (it's not a JUST_PRESSED but a fully PRESSED, but I need to check) which can lead one of my next tasks, to also make hook with SDL2 and see how things work different there.

There is more to do. One of my other plans is to add multithreading. The Corelib init will enable/disable multithreading, setting the number of cores, and I will have to think of a way each PartEffect will have a function which splits by cores.

Few more things and it could get more interesting. Maybe I'll leave this soon though, to go into other stuff. CPC? Or maybe some video things? Not sure..

No comments:

Post a Comment