Re-using previous projects knowledge

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
a_bertrand
Posts: 1537
Joined: Mon Feb 25, 2013 1:46 pm

Re-using previous projects knowledge

Post by a_bertrand »

As you may now all know, I'm working since more than half a year on my latest craziness ( https://www.dotworldmaker.com ). I had however an interesting question about how I recycled previous projects into this one. So I thought why not try to remember where I used previously some technologies or piece of code and here is an incomplete list which came out:

- Map editor: clearly I took the knowledge I had in Nowhere Else and Beyond (NEaB) which was my first map editor at that time. The technology behind is not the same (was using the DOM and JS while now I use canvas and Typescript), even the backend is completely different (was PHP now it's Node.JS). Still many concept like automatic tile transitions, or road painting are from the NEaB.
- Scripting language: when I wrote wsirc, I had the need to be able to customize it for some of it's usage. For this I created a language nearly like JS and its parser to be able to run it within my tool without having any security issue (not like if you let anyone put custom JS on your page). I had to learn how to build a tokenizer, parser, and AST and then execute it. While I had previous experience with YACC ( https://en.wikipedia.org/wiki/Yacc ) I never went as far in the direction of creating a full language. The same knowledge has been then ported to Ludiculus and finally to my latest project.
- Canvas & sound: the first thing I really made with canvas and html5 sounds was Cubicverse. While the project was somehow working it clearly didn't reach any useful market. People didn't liked so much the idea nor the art. Also the code was all JS, not easy to maintain at the end, and after 1 and half year I stopped.
- Maze generation: taken again from NEaB, I had the need there to have random dungeons generated daily. For that I made some script which was generating them, and part of it was a maze generator. The code has been then ported to Cubiverse later to Ludiculus and finally latest implementation in the current project.
- Path finding: guess what, again from NEaB to Cubicverse and to Ludiculus. I basically implemented a A* path finding and use that for my AI.
- Chat: This is not all that far from a simple socket.io chat, but with the path knowledge of what is needed from NEaB. On NEaB I was doing AJAX polling (as there was no web sockets at that time).
- NPC dialogs, and questing: The concept comes from NEaB and the quest / NPC system I had. There it was mostly working on the server side while here it works all on the client side.

I could go on for more details, but you starts to see that basically any past project (being a success or not) actually does increase your knowledge and your pool of usable snippets / ideas. You may then think that my latest project is just a copy / paste project with old code lying around. Or a Frankenstein project with pieces coming from overall. Actually no, all the code or nearly is rewritten. Why? Because I changed tech, I want some improvements, I can use some new design patterns and so on. Still the base ideas are mostly a re-use of what I did before, added a few new concepts and improved the areas which didn't work well before.

Have a similar or non-similar experience to share? Please do so and let us know how you work between your different projects!
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: Re-using previous projects knowledge

Post by vitinho444 »

Really true!

I also do that sometimes, and funny you mentioned you rewrite it all because that's what I do too, since I'm copying it to a new project, why not improve it with extra knowledge :D

Like halls says, you didn't fail if you learned something along the way.
Keep up the good work ;)
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Re-using previous projects knowledge

Post by Jackolantern »

Nice write-up!

And yep, this is pretty much how we become better devs. Any project you really worked on, whether it was a success or not, lends you all of those solutions you have found in the past. Even if they are years in the past and you don't remember straight-away what you did, you will find the answer again twice as fast if you have solved it before.
The indelible lord of tl;dr
Post Reply

Return to “General Development”