00:00
00:00
Maxiecole

Male

Norway

Joined on 8/8/10

Level:
3
Exp Points:
86 / 100
Exp Rank:
> 100,000
Vote Power:
3.34 votes
Rank:
Civilian
Global Rank:
> 100,000
Blams:
0
Saves:
20
B/P Bonus:
0%
Whistle:
Normal
Trophies:
1
Medals:
236

Unity kingslayer

Posted by Maxiecole - July 10th, 2016


3460017_146817898732_Screenshot_13.png

I have completed my first year taking a game programming bachelor.

I have now a greater understanding on object orientated programming, as well as some knowledge about Unity.

I will now re-make Kingslayer in Unity.

Looking back at the way I did it in AS2, I now cringe on how hard I made it for myself to add new content.

If I wanted to make a new weapon, for instance, I would have to:

  • Draw the sprite (duh)
  • Edit the main code in like eight different places, which are scattered over 5000 lines of code
  • Edit code in the smithing code. 
  • Manually adjust an icon for the item
  • Add a new button in the smithing menu
  • ... and like sixteen other annoying things.

Making the Mithril armor/weapon set took an entire day and more.

If I do it correctly in Unity, all I would have to do is:

  • Draw the sprite
  • Create a new Item prefab and set all the propertiers in the inspector panel
  • Create a new Anvil-Recipe prefab and set the propertiers in the inspector panel

With this system, making a new armor/weapon set would be a matter of quick copy pasta and the only labor would be editing the names and the recipes and requirements in the inspector panel. If I'm fast that would take less than an hour.

The Unity version will be made with a fast resizeable and expandable approach right from the get-go. It will probably end up having much more content than the Flash version. 

I will make an update blog in a month.


Comments

I remember the first Kingslayer and I really liked it :-)
About re-making it in Unity and probably WebGL: test it well before submitting the full game, because for some reason those Unity games are having weird issues especially with Firefox. The games are even not loading or the browser is displaying weird security communicates.

Thanks man! I remember you giving me feedback :) and thanks for the tip, will do!

I recently learned that this loading problem - the security issue - is mostly caused by 3rd party cookies. Sometimes to play the game you need to enable the 3rd party cookies - always, but obviously it can affect the whole browser, not only the game and if somebody - for security reasons - would like not to have a browser set in this way, would have to change the setting every time before starting the game and after pausing playing the game. So the biggest challenge here is to how to set the game so it would not cause that problem?

I'm doing my best to test often on Newgrounds. Unity can export as HTML5, and it seems like the HTML5 version is stable on everything I have tested on. I'm optimistic :)