Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#Actualpunkcoders

Posted 22 September 2013 - 07:48 PM

P.S.2 :

 

If you're not comfortable with OOP, you can do exactly the same with a procedural approach. I suspect the first pop-like were developed in C so were fully procedural.

 

So, each character and state methods are replaced by global functions (  walking_start(), walking_routine(), etc  ), with an argument "object" (or a small table) replacing "this". For each state, just make a small table with global function references.

 

I personnaly prefer the procedural approach, it makes shorter code, but wrapped in a static class to avoid name conflicts.


#2punkcoders

Posted 22 September 2013 - 09:24 AM

P.S.2 :

 

If you're not comfortable with OOP, you can do exactly the same with a procedural approach. I suspect the first pop-like were developed in C so were fully procedural.

 

So, each character and state methods are replaced by global functions (  walking_start(), walking_routine(), etc  ), with an argument "object" (or a small table) replacing "this". For each state, just make a small table with global function references.

 

I personnaly prefer the procedural approach, it makes shorter code.


#1punkcoders

Posted 22 September 2013 - 09:18 AM

P.S.2 :

 

If you're not comfortable with OOP, you can do exactly the same with a procedural approach. I suspect the first pop-like were developed in C so were fully procedural.

 

So, each character and state methods are replaced by global functions, with an argument "object" (or a small table) replacing "this". For each state, just make a small table with global function references.

 

I personnaly prefer the procedural approach, it makes shorter code.


PARTNERS