Thursday, 1 December 2016

Adventopolis #1 - Little struggles begin

I am still sort of working on something, I am just trying to post something just before midnight so that it's not posted on the next day in the blog as time stamp. So, I guess at around eleven it will be a good time to start writing something everyday.

It's the first day but not as bad. I felt the little struggles, the little dread, but I was ok, didn't cared and had few straightforward plans that are easy to code. So after binge watching youtube I start coding an hour or two ago. Still on that framework to hook any software rendering lib, just reorganizing folders. Now I am just trying to do something (which I might do tomorrow of course :). The idea to automate some other things, for example every time I want to try another effect or part for a demo, I copy paste the init/run functions, rewrite the class or function name (PartRotozoomer instead of PartPlasma all over), the header guards, etc, so it's tedious when I want to instantly try something on new file with all the basic functions necessary.

So, my first idea was to make an abstract Part class with virtual functions that have to be implemented, so when I make another class PartPlasma inheriting Part, I will be obliged to make an init and a run function, I will have few basic member variables (screen mode and ticks timer, although those are provided from main script when calling run for the part). Now, I don't want to type these, I want to do Add->Class with Base=Part in VS or Codeblocks and preparing everything directly. It doesn't fully work. It doesn't add the pure virtual functions ready. VS puts #pragma once also, Codeblocks does it with guards, and there are few member variables I have to add myself.

I might make a small tool to assist me, with a skeleton of the Part[Effect] class. And then go replace [Effect] to whatever. I might just do that tomorrow.

I don't know if I will continue with this project later on these 3 weeks. I might switch to CPC or something else. I also dream this framework for games, making generic well thought modules for sprite rendering, menu system (for options, etc), input manager where I won't write e.g. SDLK_SPACE but I will have some generic defines like KEY_SPACE and the person who hooks a library would somehow provide his own defines or mapping from SDLK_X to KEY_X. And for gaming purposes you could do KEY_JUMP, KEY_SHOOT assigned to those,.. I don't know, I don't know, I have to think how to do it. I want this time to design it better in every aspect. I dream of making a simple 2d game example and then porting it easily from PC to GCW Zero, GP2X, even DOS.

But I don't know how much I will work with this now. Maybe just finish this Part source/header creation tool, easy. And write one/two more hooks to test how easy it is, one for SDL2 and see how this works with SDL1 or 2 on GCW0 for example (everything should be similar, but maybe the button mappings to keyboard mappings, will see. Maybe separate hooks called SDL_GCW0 and SDL_GP2X, etc should be made, maybe not). Then, I don't have straight plans, some parts need more thinking and I want to work on something more straight forward.

Coded at nine or ten in the night, usually at that time after procrastinating I don't want to. I am like NOPE. When you start with binge watching youtube (do I do anything else these days? Oh wait,. NMS foundation update, shii...) and the time has passed and you feel the dread of not having worked and afraid to work, it's more easy to say fuck it I am doing it tomorrow. But because it's the first entries here and I have to work on even something I did. And it was few straightforward code changes anyway.

Tomorrow is Friday. I will have more time but will I work more?

No comments:

Post a Comment