Thursday, 8 December 2016

Adventopolis #8 - the editor

Yes, still some CPC essential coding. Or of course not CPC but PC SDL code for the editors of my Wolfenstein RPG/FPS games. I already had an editor I showed before to draw the level map and select textures. But I was inspired to start carefully building the whole infrastructure for the rest, sprite drawing, texture with column editing and weapon drawing. Well, I am still at 2% of course, but I started cleaning up code and making some functions to be used from all. These are mainly to draw a grid, returning from mouse to grid and back, so I'll have big cells where I will draw but they will be translated forth and back to real mouse pos and sprite pixel pos.

Lot's of things have to be done, but these editors are easy to do, nothing complex, just some tedious work. And I need to thing of the structs and what I will save in files. Right now for example, when the editor starts, map1.bin is loaded with 256 values for a 16*16 bitmap. And I draw and with mousewheel switch between 4 textures. But they are default textures, I cannot edit them or load new. F6 saves back to disk, both the map1.bin and extracts .asm files with the byte definitions. It's so simplistic. I added switching with F1-F4 between the four editors. The others are just displaying an empty grid and in the sprite I can draw random colors, although not from CPC palette.

I should also have a palette editor, as sprites, textures, floor/ceiling and weapons will use the same palette. So, maybe it will be a full struct of a level, combining struct of a map, many structs of textures, sprites, etc, appearing only on that level. For a different level I will use different set of data, different palette and drawing graphics especially for that palette. On the weapon side, I already have an old code converting weapon rendering to very fast unrolled assembly. For the textures, it will be a list of 256*32 pixels, with 256 columns I can edit and then I have to think of a nice way to let me select which columns will make a texture, so that I can make the wall texture tricks or compressed textures I was discussing before. Lot's of work here and there, easy stuff, but I will need continuous motivation and enough days to complete it.

So, yeah, I kinda managed to motivate me to continue with this project, even though I end up writing this earlier as I need to rest the last hour. I will see what I can do tomorrow, as there might be a pause in the weekend, depending whether I want to switch again to participate in the Ludum Dare contest. I might be inspired by the theme and try to do something (maybe a good opportunity to continue developing on of my PC frameworks and test it in a gamedev attempt) or maybe not. There are not enough days left, so I want to push as much development as possible. Maybe near the last week I will start thinking of the one/two projects before the end of the year. A small Sam Coupe release but especially a primary focus into start attempting my youtube project plans (won't manage to release a video, but will see how easy it is to make fragments of a proper careful video).

I was even thinking to start posting images in these posts (pretty boring with only text?) but I don't have something worth it most of the time. Maybe tomorrow if I finish the sprite editor and try to transfer the bat graphics? I also thought of making this editor to draw some more, like a projectile, to test with the slow for now zoom engine and fire button, if I can press and the hero throws projectile that travels and hits the wall (lot's of work to be done for this too). Babysteps..

No comments:

Post a Comment