Wednesday, July 23, 2025

 Hey, I'm alive!


I haven't posted in a while, a long time, a very long time - having a newborn kinda saps your life when it comes to coding especially when it's one of your hobbies and work takes up a lot of time too.

But I'm happy to say I'm back, and back in a big way with an almost finished version of my Proxy Studio for Magic the Gathering.

It takes on board a lot of functionality from various websites I used to use for proxying but I'd like to think it add some features to make it a little easier!


Whats supported:

  • Loading XML from MPCPrint, automatically downloads (and caches) images locally.
  • 300,600,1200 DPI printing support, 1200 is way overkill 😂
  • Parallel processing of images and PDF creation for speedier output.
  • Drag and drop re-ordering of cards
  • Automatic bleed support
  • drag your own images in to create cards the right size automagically
  • 3x3 or 4x2 automatic arrangement for printing
  • Customised cut lines


It's Windows only for now, but hopefully, once it's ready for release, it will get ported to Mac and Linux.




Wednesday, October 28, 2020

ASP.NET Core(porate) , yup I'm hilarious :|

 So, lately, I have been in full corporate mode. That means looking after my team of engineers and when I have some gaps in my calendar working on business apps. 

The latest one of those was quite fun incorporating some ASP.Net Core 3.1 and OIDC for authentication via our corporate provider OneLogin.

It's not as exciting as Unity for sure, but it's probably seen/used by more people than my game coding!

https://github.com/jponter/FundingDashboardAPI  if anyone is interested.


I hope to get back into Unity starting next year, I really miss helping people in the Mr Taft Discord :( 


Stay Safe & Happy Coding - PappaP x


Friday, June 26, 2020

I'm not dead!

No, I'm definitely still here!

Baby is taking up a lot of time (who knew!!) - I am coding but in much more bite-sized chunks as and when I can.

Right now I am taking a bit of time out from Unity and working on getting my ASP.NET Core 3 up to date. I'll probably cover some of that in here too but likely will be posting only once or twice a month for a while.

Happy Coding!

PappaP x

Wednesday, May 13, 2020

Added a Tilemap based 2D map generator!


The plan for this is to start working now on area detection, then on to connecting any isolated rooms!

Obviously very early development days, with much beautification to add once the actual functionality is completed.

Saturday, May 9, 2020

Procedural!

some time ago I worked on a procedural cave generator using cellular automata with C++ and SFML (Cave Bunny)

I have been wanting to explore that within unity too and so have been following along with the tutorials from Sebastian Lague, I haven't stopped on the Mr. Taft tutorials and in some way there is a plan to link everything up at some point, but whilst there are some ideas, these aren't yet tied into specific gameplay features - however - it's probably fairly obvious that I'm going to add some kind of procedural element!

For the mesh creation, that's a bit of a learning curve for me - probably overkill for my 2D needs but nonetheless, it's good to keep learning new things! Who knows maybe one day I'll break into 3D!

Stay Safe & Happy Coding

PappaP x


Saturday, April 18, 2020

Been busy, actually coding!

So been a quiet couple of weeks in lockdown, some (more) exciting personal news which I will be able to share soon but also working on implementing A* within the Mr. Taft Zelda-like series.

As usual, my code for this is fully shared on Github but is yet to be properly documented! That is the next task.

Anyway, for a sneaky preview of the finished article.

Features: 


  • It only starts pathfinding if the player is inside the grid, will also stop pathfinding once the player exits.
  • Unwalkable grid positions are calculated at runtime start based on the tilemap colliders (via a layermask)
  • pathfinding runs every x seconds as to not be continually calculating paths

Thank you!

Wouldn't have been possible without the excellent grid tutorials from CodeMonkey and of course Mr Taft! and his amazing Zelda-like.




Wednesday, April 8, 2020

A Unity experiment - Boss!

I wondered just how much of a Trinexx type boss I could make without much code, this is my WIP so far!

Uses: Hinge Joints x LOTS!, DoTween for movement and an FSM per head and body.

Still lot's to do but it's getting there!
Janky WIP Boss

Mr Taft FAQ 2 - Player Movement Speed is Choppy/Slow

This is the second in a series of FAQ articles to accompany the Zelda Like Tutorial Series from Mr. Taft. 


The Question:


"Hi guys my player is moving choppy like it is slowing down then going faster after a few seconds I'm not sure what I did wrong?"


The Solution(s):


1. The quick one!


Toggle VSync on in your game options.

Vsync On!

2. The longer (better?) one!


The issue is related to having the movement and animation updating from well, Update(). Update() is called once every frame and by its nature is variable in when it is called unless you are locked in with a VSync which limit's the calling of Update to the refresh rate of your monitor and is why the quick fix above works.

It is better, in my opinion for this tutorial series, to keep the input code within Update() but move the animation/movement code to within FixedUpdate() this occurs at a fixed interval determined by your project settings. Some sample code from my own PlayerMovement.cs is below. 

Excerpt from PlayerMovement.cs



Happy coding! :D

PappaP x

Thursday, March 26, 2020

Mr Taft FAQ 1 - Signal

This is the first in a series of FAQ articles to accompany the Zelda Like Tutorial Series from Mr. Taft. This question comes up a lot on the Discord Server.

The Question:

Hey guys - I've come to a complete standstill when implementing Signals in this Zelda for Unity project. My code for Signal & SignalListener are exactly as they should be with no errors, but I can't seem to drag my "Signal" over to my Signallistener. Any ideas why? Using unity 2019.1"

Or.

"im doing the signal system but seems like it doesnt recognize the object as an scriptable object, what can cause this?"


The Answer:

Unity 2019 already has a Signal, your one and the Unity one are being confused with each other. There are two fixes.

1. Don't use Signal as the name of your scritpable object, use Notification or TaftSignal for example instead!

2. You can create an object called signal but place it in a folder in the asset menu, that way Unity will treat it as a separate entity. 

in the Signal.cs file modify the CreateAssetMenu directive to read as follows.


When you want to create a signal as directed by Mr Taft, be sure to select the signal from your Scriptable folder!



Happy coding! :D

PappaP x

Sunday, March 22, 2020

Serialization of Scriptable Objects in Unity (Nesting) pt2. Binary!

In my last blog I said I wasn't going to do a binary saver, well - actually I was asked on the Mister Taft creates Discord server to post up a binary version, so here it is!

Disclaimer: I am in NO way a professional Unity coder, I am hacky and this might not (probably isn't) the best way to do this! But it works for me and I and hopefully, this is useful to someone, if so or if you have any questions please come to the Discord channel and let me know!

Not one to shy away I have modified the classes from <Part 1> to allow a flip between JSON and binary based on a selection in the editor!

Thanks again to my friend Ashfid from the discord server, we had a discussion on utilising an approach which was also featured in a GameGrind video.

I have again left out a lot of error checking for sake of clarity, but make sure to put some in your own code :) 

Thanks, Ashfid, MisterTaft, Bomara and all on the Mister Taft Discord.

Much love to you all, this is an absolutely crazy time, stay safe!

PappaP x

ps. I'm moving to Pastebin for the code, whilst not as pretty - it supports cutting the code out directly!

Downloads:



First up, a change to our SerializeListString class!

I have moved the Struct out into its own class SerialItem. There is no other change to this class.

Exceprt from SerializableListString.cs




The BinarySaver class.

Almost completely a shameless rip off from the GameGrind video mentioned above, I'd suggest having a watch if you want to understand the nuances. The methods in this class are static, so we can call them from anywhere.

Essentially I am utilising a generic method to ensure I can save out my SerializeListString class object. I'll let the code speak for itself as it's quite simple - there are some comments inline to explain where I think it's required.

For the binary save, I'm using the ./saves/ directory in our application persistent data path.

BinarySaver.cs



Meat and potatoes, again! Or How to actually use the BinarySaver!

As promised here we actually get to control whether we want to save out in JSON or Binary.

I am creating an enum to represent the two different save states and creating a public variable in the inspector to allow us to switch between states.

Exceprt from InventorySaver.cs




Switch for Saves! (and loads...)

OK, that was an awful pun, did anyone else get it? I didn't think so.

So, what we need to do now is this. We know from part 1 that our SL object is all we care about as we recreate/or save our inventory from that object; therefore BuildSaveData() and ImportSaveData() don't need to change at all! Nice!

In fact, the only things we actually need to change are the two functions LoadScitpables() and SaveScriptables(). That's a little misleading, as what I'm also going to do is break out the code for saving and loading via JSON into their own methods. The code inside the method is the same as we created in part 1.

JSONSave()


JSONLoad()

And next, I'm going to create a couple of complementary methods for BinarySave() and BinaryLoad(). I'm sure there are loads among you who can see where I'm going with this, hold on to your hats we are almost there! :D

BinarySave()



BinaryLoad()



Having the static methods saved earlier in the BinarySaver class really help to make this more readable! I should really go back and pull out the JSON methods into their own static method class too. Feel free to do that if you want!

Igor, Flip the switch!

These are the last couple of changes, first up, SaveScriptables. We take advantage of the enum saveType we have set in the inspector, depending on which one is set we either call JSONSave or BinarySave()!

SaveScriptables()

LoadScriptables()


And that's really it! You can now choose between using JSON or Binary to save your inventory object!

Hope you enjoyed!

PappaP x

Monday, March 16, 2020

Serialization of Scriptable Objects in Unity (Nesting)

Whilst continuing with the tutorials from Mister Taft I came across an odd situation whereby his tutorial didn't actually work.

<This is the tutorial in question>

I can only assume that Unity has changed the way they work with SO's and serialization as no matter how hard I tried to follow, I couldn't replicate the saving of the SO's.

What follow's is how I worked around it to make a working saveable inventory that works along with Mister Taft's series. This may be useful to you as a general concept, but will be of most use to students of Mister Taft!

I will be using Total JSON to convert my serializable list into a nice pretty JSON string that we can save out, available on the asset store for free. The built-in JSON utilities will NOT work for this as it doesn't like more complex data. Total JSON is pretty lightweight so the tradeoff for me is negligible, you could also do this with a binary formatter but it's not something I'll be covering.

I haven't put much if any error checking into this as I wanted the concepts to be clear, you SHOULD be adding your own!

If this helps anyone, let me know! :)

A big thank you to Ashfid on the Mister Taft Discord for giving me the idea on how to solve this issue!

You can download the whole InventorySaver.cs file below and refer to my GitHub for other scripts if required. Come to the Mister Taft discord server if you have any questions!


Download the complete InventorySaver.cs file


Item Database

I'm going to be utilising the idea of not actually saving a scriptable object at all, I don't think Unity wants you to either! Instead what I did was save a reference and recreate the inventory when loading!

To that end what we first have to start with is an item database, this in itself is a simple scriptable object with a single method built-in.


Create this Scriptable Object in Unity and drag over the Red & Green Potion SO's so they appear as elements in the Items list.



We are going to use this database to recreate the player inventory when we load the save file!


The Serializable Class 

or, where I'm planning on storing data before and after serialization!

As mentioned I'm not actually going to store the Scriptable Objects, I'm going to create a snapshot if you will of what is in the player inventory when we want to save and I'm going to recreate the inventory at load time from that snapshot!

To visualise imagine a hand of cards from a normal deck, if I wanted to record an inventory my hand mid way through a game to recreate later I might write down "7 of clubs, 3 of hearts, 4 of diamonds". I'm not storing the actual cards anywhere, but when I come back later I can pick the recorded cards back out of the deck to recreate my hand.

I'm going to do exactly the same with this list, additionally I'm going to store the count as well so we can have multiple of the same item!




Putting it all together, the InventorySaver class.

The inventory saver is where the real work gets done. It needs a reference to the PlayerInventory and The Item Database we created earlier.

It needs to be attached to the GameSaveManager created during Mister Tafts earlier tutorial.



Saving:

for Saving there will be 3 steps and all of them will occur on the OnDisable() call from the script.



BuildSaveData() is performing the snapshot discussed earlier.

and finally writing the file to disk


I have used the pretty string format option just for ease of reading the saved files, speaking of which when you exit out and have any of the potions in your inventory you should end up with a json file in your persistant data folder similar to the following.



Loading:

Loading is almost a reverse of saving of course but there are 4 steps this time. We additionally want to clear the playerInventory before we recreate from the snapshot.

For my example I will be performing the loading in the OnEnable() method.


for the LoadScritables() we are taking the text json from disk and placing it into our JSON object. then deserializing into our snapshot.


with the snapshot in memory, it's time to recreate the inventory and this is where our Item Database really comes into play!




It's official I moved development to Unity!

I have made some decent progress so far and will be uploading a few observations and idea's intially following along with the excellent Unity tutorials from Mr Taft Creates!

https://www.youtube.com/channel/UCZczqDvepgNqy80gTMGnUXw

stay tuned!





Wednesday, October 2, 2019

DE-BUGGGGER


How many hours did it take to end up getting this to work properly?? Answer: about 10 - time well spent , but extremely frustrating!! (The arrow does actually hit the tree and give a nice debug rect; but the screencap is too low fps to show it!)

Monday, September 30, 2019

OLC, How could I forget!

Mentioning OLC in my previous post, I realised I had been totally remiss in not explaining about OLC from Javid.


Javid, from OLC Is a really spectacular guy who has some amazing tutorials on YouTube! These break down the algorithms for coding with examples using a very cut down OLC Pixel Game Engine (or even initially the OLC Console Game Engine!!!) so that the emphasis can be on the algorithms and not the normal massive stumbling blocks that can be associated with developing on modern systems. Platform agnostic, and really one of the best resources I have found in my coding adventures.

A small example of what I have created after watching the OLC videos and working through the algorithms is Cave Bunny - https://github.com/jponter/Cave-Bunny This project makes use of both cellular automata and A* pathfinding amongst others.


Sunday, September 29, 2019

Into SFML

Been following the amazing tutorials by Robert Wells at http://thatgamesguy.co.uk/game-engine-dev/ if you haven’t checked these out you are doing yourself a disservice!

These are c++ and SFML and quite a nice step up from the One Lone Coder tutorials in terms of being more engine specific.

I’m about 3/4 done with them at the momemt, but here’s a dump from codetrail from a bit earlier in the series.




Tuesday, September 24, 2019

Woo a blog!

... and today it's not even about code - :|

changed the toner on my Lexmark c746 today by refilling with toner from China, that is not a fun job - yes it saves a lot of money, but the toner is extremely messy. Also needed to melt some holes in my toner cartridges to get the toner in and replace the kill chip. Would I do it again, probably - 50 quid to replace all 4 cartridges or 200+ for compatible replacements and 400-500 for official!!!


Officially (again) this blog will be putting up some code soon; I'll be working mostly with OLC Pixel Game Engine (https://github.com/OneLoneCoder/olcPixelGameEngine/wiki) and possibly SMFL too having just installed that today.

If you want to skip any articles and just have a look at what I'm up to (and when I say you, I mean me, as I don't expect anyone to read any of this! However, when I forget how/what/why/when I did something; this might be a handy resource for me :D ) then feel free to jump over to https://github.com/jponter

That's it for now!

 Hey, I'm alive! I haven't posted in a while, a long time, a very long time - having a newborn kinda saps your life when it comes to...

Most Viewed