Talk:Petit Smash Bros/@comment-21364788-20130921175742

Okay so today I've decided to clean up the code a bit and get to work on stages. Yes that's right. Stages will come before adding more characters though most of the ones I want are sort of roughly added since in V1.2 LITE I promised atleast one new stage.. or atleast I think I remember doing that.

So here's what I'm going to do. I have to create the CORE engine first since that hasn't really been done yet.. hm. I'll be writing an interpreter of some kind.. well more like.. a system loop. Which branches out to different calls based on game events.

So here is an example

if game_events(currentevent)==5 then gosub @event5

that sort of thing. :/ I'm not sure if I can use gosub to call a subroutine stored in a string instead but if I can that'd make this a whole lot easier.

So.. pretty well here's how it's going to work. Events will be things like, killing a player, playing a sound. Beggining a respawn of the player.

Etc.

I'll be using a stack for all the game events so they can be processed on a per frame basis

This gives me a way to add new events to the engine as well without really having to try that hard.

For instance.. say I only have 3 events.

If I want to add the spawning of a new item. I could simply do

game_events(currentevent)=8 'where 8 is spawn item

itemspawn=4 'let's just say homerun bat kay? cool. (That'll be a hard item to add)

so now later in the code we have this

if game_events(currentevent)==8 then gosub @spawnitem

'there that's easy right?

Anyhow I'm not sure what events will qualify but I'm making a list today and sorting out some bugs hopefully I can fix mario's pallete glitches today to! Among other issues... pretty well back on track with working on petit smash daily but as I said the codebase needs a huge overhaul which is where I'm at right now still designing better psuedo code that can be expressed as REAL code. So.. enough talk. -gets to work- See you all later this evening maybe I'll have an update >_> MAYBE! No promises.