This week I’ve been continuing work on GFR2. I updated the collisions so they were slightly more sophisticated than the version that I managed to get in in about 30 minutes when I first made the game, and added some new gameplay elements that I think turned out quite well.
While working on GFR2 I of course found faults with Radnom that needed to be fixed. One of which was the overall structure of the whole thing. A small fault then. As it was, every plugin was registered with RadnomCore, which you could request module instances from. This was fine, but getting plugin instances from sources that were definitely going to be there was a bit long winded, and involved finding the plugin, calling the creator, returning the instance, casting to the type.
I decided to completely remove RadnomCore and ditch the whole plugins thing for now, since most components of Radnom are actually just mini projects built as DLLs. At some point I’ll create a plugin manager DLL which will do the same as RadnomCore, but for now I’m just going to call functions directly in the DLL.
I also started changing all the Radnom components from raw pointers to tr1::shared_ptr, something I should have done (and wanted to do – I couldn’t because I had a different VS version on laptop) from the start. For each module, a shared and weak pointer type is available. Makes things a lot easier, since I don’t have to care about when things get deleted now. One thing I did have to take into account was where the pointer was being deleted – I had to make sure that it was in the same place (EXE vs DLL) as the allocation, but tr1::shared_ptr provides a constructor which you can pass a deletion function to.
I finally got round to setting up version control too, so I can actually work on laptop and pc without endless copy pasting over the network.
I’ll be working on the characters and the UI in GFR2, and hope to have character creation done soon – if all goes well it will be quite good.
On a side note, the local shop is offering 6 double dip for 50p. Great Justice.