Saturday, 30 July 2011

Introducing the wasabi engine


http://sandbox.deviantart.com/?fileheight=500&filewidth=640&filename=fs70:f/2011/211/1/7/wasabi_engine_by_flippinmental-d425wz6.swf

Woo! So here's the first prototype of the game engine. I'm pretty pleased with this actually. So as you may notice this is just a recreation of the opening scene from Jades last game. It's a fairly limited demo in that you can only pick up one item and then once you've done that that's about it. It may not look like much put I like how efficient this is. For example the button for the inventory screen I only created once, that's automatically added to every scene (except for of course the inventory scene were a bit of code prevents it from appearing). Also each scene is designated a number, so that when you press the go back button on the inventory screen it will go back to the last number created, so its easy to create lots of scenes and not having to change the code for the button. Changing the code for clickable areas is real quick as well. Unfortunately its not as quick or as streamlined as I was hoping to make it. I was using a different system for the click able areas before, as time went on I began to realise this was going to be time consuming to set up, but I figured at least once its set up that's it. But then I realised it would take a REALLY long time to set up and probably wasn't worth it as its kinda inflexible too and I was pretty sure some conflicts would arise later in development. So I learnt a valuable lesson that sometimes the simplest solution is often the best, so I basically used the same system as TKON for that (I realised why I didn't use that originally as flixel hates it, you'd think it would be really easy to implement but flixel was being a pain and just refused to let them work) But it works now, and the code can get a bit long winded at times as there are certain things you have to repeat but I think I've managed to cut it down as much as I possibly can. Good news is is that once you've set up the clickable areas for each scene its done, and you can change the actions of them and how they interact with ease.

Oh yeh I was working on two prototypes, one made using the flixel library and another made using   just as3. The as3 one has decided to stop working, for whatever reason. I'll try and get it working but I don't like it as much, the code gets very long winded. With the flixel version for the most part if you want to change what something does you only need to do this in one place. In the as3 version you could have to end up re-doing it in several places. Also the code is a bit all over the place in as3 so its harder to keep track of. Also I've called it the wasabi engine.

Features
  • Can load external SWF files for the cut scenes, so you make them in a separate file, export them and load them into this so no need for it to be on the timeline. (It's a bit buggy at the mo but I've got time to fix those.
  • Multiple dialog when you click on something more then once. In the demo this is only seen when you click on the main characters reflection more then once. (I'm sure this basic technique can go on to be used in creating dialog trees
  • Scrolling dialog, nuff said. Again can be a bit glitchy but only if you do something carazzy with it.
  • Does all the stuff you'd expect it to do.
  • It works! .. sort of
Features to add
  • Interaction with items. So far you can click on the item to read a description but you want more with this. So I will add a look/use function.
  • Support for all the other stuff that needs to be added like the code for each puzzle but we'll have to do that as we go along.
  • Save feature.
  • Better graphics for the buttons and stuff and a proper interface
 Known Bugs
  • Sometimes the music from the opening cut scene will start playing again. Not sure why this is.

2 comments:

  1. - Adding external .swf = brilliant idea. Would save a lot of time and that means that other ppl can work on the animation while we work on the coding. Will just need to tweak it here and there because it seems to skip and that. Great news is that the sound works so that's good XD.

    - Multiple dialogue = win, will just need to start implementing the script

    - Not sure what you mean by scrolling dialogue :/

    Cool beans!

    Would also like to add volume slider and a mute function but again, once that's figured out, it should be easy to implement.

    The music is intended to just be looped over the cutscene and the game itself, it probs starts playing again because the trigger is still there of when it goes in game. I seem to remember adding the music start on that frame because you can skip the cutscene. Or I could be utterly wrong because I haven't been doing flash in ages XD

    Once again thank you!

    ReplyDelete
  2. By scrolling dialog I just mean its like its getting typed out, honestly I was just trying to make it sound more fancy then it is XD

    AND I think it might be skipping because it hasn't actually loaded properly, in which case that can be fixed by implementing a preloader, if not that :{ - I figured out how to more or less do the same thing with the as3 prototype so either way we can use it. The mute function will probably be really easy to add, the slider not too sure about but I'm sure it will be possible, as most things are with flash. What I'll do tomorrow is try and sort out what went wrong with the as3 version and if I can get it working. Or I might just start from scratch with that one as there wasn't a whole lot of code and it just randomly stopped working, have no idea why.

    ReplyDelete

Note: only a member of this blog may post a comment.