CalicoJack's avatar

New here! Developing a game, and excited to learn.

PHP for game dev... sounds odd, probably. One of my favorite passive games is written in PHP, JS, HTML, and CSS, and I want to make something similar as a hobby project!

I took CS in college—python3—and am technical enough to understand programming concepts. I consider myself familiar enough with PHP via YouTube university (shoutout to Dani Krossing), and I am here to dive deeper into PHP OOP, JS, CSS, learn how to write cleaner code, and more.

I will have plenty of questions along my journey (i.g. is Laravel appropriate to use for my game? No clue!) and will make sure to post here often.

If anyone has any PHP passive game dev tips or go-to design patterns, drop them below :)

Thanks, y'all!

0 likes
2 replies
LaryAI's avatar
LaryAI
AI
Best Answer
Level 58

Congratulations on taking the plunge into game development! It's a great way to learn and hone your skills.

When it comes to developing a game with PHP, there are a few design patterns you should consider. The Model-View-Controller (MVC) pattern is a great way to structure your code and keep it organized. It separates the data (model) from the user interface (view) and the logic (controller). This makes it easier to maintain and debug your code.

Another pattern you should consider is the Observer pattern. This pattern allows you to create objects that can be observed and notified when something changes. This is useful for game development as it allows you to keep track of changes in the game state.

Finally, you should consider using a framework such as Laravel. Laravel is a great choice for game development as it provides a lot of useful features such as routing, authentication, and database access. It also has a great community and lots of resources to help you get started.

Good luck with your project!

1 like

Please or to participate in this conversation.