Scorpion

Well-known member
Original poster
Messages
75
Reaction score
1
Points
8
To make a virtual pet game, you should consider learning programming languages like Python, JavaScript, or C#. Python is a good choice for beginners because it's easy to understand and helps you build things quickly. JavaScript is important for games that run on the web, while C# is often used in game-making tools like Unity. Which language do you think would be the best to start with for making this game?
 
If you're looking to make a text based virtual pet game similar to Neopets. I'd recommend learning PHP and MySQL. Once you grasp a basic understanding of PHP you'll need to learn a framework to develop projects faster. I recommend the Laravel framework.

PHP handles pages like a register, login, and more.
 
  • Like
Reactions: Sleepysaur
To make a virtual pet game, you should consider learning programming languages like Python, JavaScript, or C#. Python is a good choice for beginners because it's easy to understand and helps you build things quickly. JavaScript is important for games that run on the web, while C# is often used in game-making tools like Unity. Which language do you think would be the best to start with for making this game?
You can make a pet game with javascript, however, this wouldn’t be a full fledged browser based one.

In order to make a full fledged browser based one, you’ll need to code it in php/mysql.

This tutorial explains more in depth how you can make one with javascript:


There's a tutorial that provides tips and advice on how you can make one with unity with the use of C# as well:


If you'd like to take a deeper dive and learn how to make a browser based one, I'd recommend watching this tutorial on how to make one with php/mysql.

Siteground has some great guides and articles relating to php/mysql as well. I'd check out their articles as well. It's an awesome resource site.

Freecodecamp is also great. They have tons of guides and articles as well. The PHP Handbook – Learn PHP for Beginners
 
  • Like
Reactions: Sleepysaur
Thank you for those resources cpvr! I have tried to find tutorials on youtube before but I've never seen any of these videos before, I'll check them out.
 
You can make a pet game with javascript, however, this wouldn’t be a full fledged browser based one.

In order to make a full fledged browser based one, you’ll need to code it in php/mysql.
This tutorial explains more in depth how you can make one with javascript:


There's a tutorial that provides tips and advice on how you can make one with unity with the use of C# as well:


If you'd like to take a deeper dive and learn how to make a browser based one, I'd recommend watching this tutorial on how to make one with php/mysql.

Siteground has some great guides and articles relating to php/mysql as well. I'd check out their articles as well. It's an awesome resource site.

Freecodecamp is also great. They have tons of guides and articles as well. The PHP Handbook – Learn PHP for Beginners


You can't pull content from the database with Javascript. It's okay to use Javascript on your pet sites, but I would recommend using PHP as the base with a solid framework such as Laravel. The kittokittokitto project is using the Laravel framework that would be a good starting point to build your virtual pet sites.
 
Thank you for those resources cpvr! I have tried to find tutorials on youtube before but I've never seen any of these videos before, I'll check them out.
You're welcome! There's also a full course php tutorial that provides about 7 hours of information if you'd like to take a look at that one as well.


There's a shorter one that's 2 hours long that's just as good though.



PHP Tutorial - Learn PHP Programming is also a great resource site as well. Good luck with your journey on learning how to code! 😀

You can't pull content from the database with Javascript. It's okay to use Javascript on your pet sites, but I would recommend using PHP as the base with a solid framework such as Laravel. the kittokittokitto project is using the Laravel framework that would be a good starting point to build your virtual pet sites.

it is possible to fetch data from a database with JavaScript, however JavaScript runs on the client-side and can't directly query a database. But, you can use JavaScript's fetch() method to make requests to a server-side script (like PHP, Node.js, or similar) that will handle the database query and return the data.


This example is how you can use fetch() to retrieve data:

Code:
fetch('your-endpoint.php')
  .then(response => response.json())  // Parse the JSON data
  .then(data => console.log(data))    // Do something with the data
  .catch(error => console.error('Error fetching data:', error)); // Handle errors
The URL 'your-endpoint.php' would be a server-side script that queries the database and returns the data in JSON format.


For more details on using fetch() and handling requests, these resource sites explain more:


Fetch makes asynchronous HTTP requests.​

  • It returns a Promise, which can be handled with .then() for successful responses or .catch() for errors.
  • On the server-side, you'll need PHP, Node.js, or another backend language to query your database and return the data to the client.

By using fetch(), you can dynamically load content from your database without reloading the page!
 
PHP is an older language that's falling out of favor. Many sites still use it, but it was originally designed as a way of adding small interactivity to websites that was later retrofitted for making larger applications, and that origin has hurt its usability relative to other languages with clearer design goals. Personally, I like Python for backend web development, although I have considered rewriting my server code in Java for better performance. (These performance gains would probably not be worth the lost development time that could be better spent implementing new features, though.)
 
If someone wanted to launch a virtual pet game today, which technology stack would you recommend and why?
 
Whatever your comfortable with, can do anything with any programming, but you got to know what you're looking at.