My PVZ Development Log #1

The project is based on C language, mainly focusing on C++. The IDE I used is Visual Studio 2022.

This is the first day of the development, I am looking forward of reproducing a well known 2D tower defense game Plants-vs-Zombies. I am new to C so I would’ve to learn all the basics and perhaps some deeper concepts of this programming language during the development. So for me basically this project is a pretty good preview of those bunch of concepts of C in advance.

I am planning to finish the project before the start of the winter term, which is gonna be January 8th. That being said I have roughly about 25 days to work on this project solely. Hopefully I can get over any bugs and errors during the development.

Following are what I did today,

  1. Create new project (empty project template) using any version of Visual Studio
  2. Import materials
  3. Implement primary game scene
  4. Implement the tool bar at the top of the game panel
  5. Implement the plant cards in the tool bar

1

Basically what I did today is to create an actual panel with size 900 * 600 (which is the default resolution of the original game) to display the content; added a background image; added a “tool bar” which held all the plants’ cards; wrote some functions that access the resource folder to get the available plant cards, and placed them on to the tool bar separated by a certain widths. Last thing I did today is to allow the program to peek message of user’s input, by far only left-click to grab up the plant, and yet not able to place the plants down.

2

3

C is honestly quite different from Racket, the one I’ve down into for the past three months (it’s always waterloo 1A CS135), and honestly I’ve had enough of recursion. As an imperative language C works much different from functional languages like Lisp or Racket. It’s refreshing picking up concepts like for loop, while loop, if-else statements, and so on again. Even though the grammar mike seems identical between JAVA and C (and C++), I feel like they’re much different from each other as C really shows much more basic details of programming compared to JAVA.