Skip to main content
Update wording, add period after abbreviations, add tags
Source Link

I have been inspired by several other posts on the topic of OOP implementations in VBA to try and create a Pacman clone. I think this task is not all that hard in most languages; but, I first learned how to code via VBA and I, perhaps, have a masochistic fondness for the framework. VBA comes with a host of challenges (lack of inheritance, single thread environment, etc.) that I seek to overcome.

There is going towill be a lot to go over, so I hope you don't mind me breaking this into multiple code review posts, each with some smaller scope of focus. For this post, I'd like to get feedback on my overall architecture plan, and give you a very general look at the game logic class and how I intend to make it interface-able to a UI. (The first UI implementation will be an Excel Worksheet).

enter image description hereMVC diagram of classes

enter image description hereRubbberduck folder structure

I welcome any critiques on my architecture plan, naming conventions, and even nit picks! One of my specific questions is this: at some point I need to configure the game controller by setting its player, viewAdapter, ghosts, map, etc. properties. It seems to me that the ViewAdapter should be injected from the outside. Should the other components also be injected? or should I just let the controller configure all of these internally?

I have been inspired by several other posts on the topic of OOP implementations in VBA to try and create a Pacman clone. I think this task is not all that hard in most languages; but, I first learned how to code via VBA and I, perhaps, have a masochistic fondness for the framework. VBA comes with a host of challenges (lack of inheritance, single thread environment, etc) that I seek to overcome.

There is going to be a lot to go over, so I hope you don't mind me breaking this into multiple code review posts, each with some smaller scope of focus. For this post, I'd like to get feedback on my overall architecture plan, and give you a very general look at the game logic class and how I intend to make it interface-able to a UI. (The first UI implementation will be an Excel Worksheet).

enter image description here

enter image description here

I welcome any critiques on my architecture plan, naming conventions, and even nit picks! One of my specific questions is this: at some point I need to configure the game controller by setting its player, viewAdapter, ghosts, map, etc properties. It seems to me that the ViewAdapter should be injected from the outside. Should the other components also be injected? or should I just let the controller configure all of these internally?

I have been inspired by several other posts on the topic of OOP implementations in VBA to try and create a Pacman clone. I think this task is not all that hard in most languages; but, I first learned how to code via VBA and I, perhaps, have a masochistic fondness for the framework. VBA comes with a host of challenges (lack of inheritance, single thread environment, etc.) that I seek to overcome.

There will be a lot to go over, so I hope you don't mind me breaking this into multiple code review posts, each with some smaller scope of focus. For this post, I'd like to get feedback on my overall architecture plan, and give you a very general look at the game logic class and how I intend to make it interface-able to a UI. (The first UI implementation will be an Excel Worksheet).

MVC diagram of classes

Rubbberduck folder structure

I welcome any critiques on my architecture plan, naming conventions, and even nit picks! One of my specific questions is this: at some point I need to configure the game controller by setting its player, viewAdapter, ghosts, map, etc. properties. It seems to me that the ViewAdapter should be injected from the outside. Should the other components also be injected? or should I just let the controller configure all of these internally?

adding link to the github repo
Source Link
ArcherBird
  • 401
  • 3
  • 7

Finally, if there is any interest, I can publishhave published my entire project to a github repogithub repo so that you can build and run what I have working so far. There are so many parts in this project, so please forgive me as I attempt to balance completeness with overbroadness in my posts. In forthcoming posts, I plan to ask for code review on these topics: Moving game piece models and moving them at different speeds, map/maze building and interaction, animating game action in the view, and probably some others as I further development. Thank you for reading this whole thing!!!

Finally, if there is any interest, I can publish my entire project to a github repo so that you can build and run what I have working so far. There are so many parts in this project, so please forgive me as I attempt to balance completeness with overbroadness in my posts. In forthcoming posts, I plan to ask for code review on these topics: Moving game piece models and moving them at different speeds, map/maze building and interaction, animating game action in the view, and probably some others as I further development. Thank you for reading this whole thing!!!

I have published my entire project to a github repo so that you can build and run what I have working so far. There are so many parts in this project, so please forgive me as I attempt to balance completeness with overbroadness in my posts. In forthcoming posts, I plan to ask for code review on these topics: Moving game piece models and moving them at different speeds, map/maze building and interaction, animating game action in the view, and probably some others as I further development. Thank you for reading this whole thing!!!

added 63 characters in body
Source Link
ArcherBird
  • 401
  • 3
  • 7
  1. Everyone's favorite VBE addin, Rubberduck!
  2. This SO questionanswer which got me thinking about all this VBA OOP viability in the first place.
  3. This excel version of Battleship from which I have mimicked the Adapter-events-passing pattern.
  4. Pacman Dossier has very detailed analysis of the inner workings of pacman.
  1. Everyone's favorite VBE addin, Rubberduck
  2. This SO question which got me thinking about all this in the first place
  3. This excel version of Battleship
  4. Pacman Dossier has very detailed analysis of the inner workings of pacman.
  1. Everyone's favorite VBE addin, Rubberduck!
  2. This SO answer which got me thinking about all this VBA OOP viability in the first place.
  3. This excel version of Battleship from which I have mimicked the Adapter-events-passing pattern.
  4. Pacman Dossier has very detailed analysis of the inner workings of pacman.
deleted 120 characters in body
Source Link
ArcherBird
  • 401
  • 3
  • 7
Loading
added 8 characters in body
Source Link
ArcherBird
  • 401
  • 3
  • 7
Loading
added 8 characters in body
Source Link
ArcherBird
  • 401
  • 3
  • 7
Loading
Tweeted twitter.com/StackCodeReview/status/1300946570423267332
adding some more example code; adding a screen shot of my VBE folder structure; adding some acknowledgements;
Source Link
ArcherBird
  • 401
  • 3
  • 7
Loading
added 14 characters in body
Source Link
ArcherBird
  • 401
  • 3
  • 7
Loading
Source Link
ArcherBird
  • 401
  • 3
  • 7
Loading