I’ve using unity for a long time (mostly for ludum dare), and I’ve decided that I want to change my platform.
I’ve found babylon, and it seems really nice.
But I feel it quite confusing, when I compare it with how I was used to work with Unity.
Specially when you can have the whole game in a single script. hahahaha
I’ve been searching for tutorial and stuff, but I can only find basic tutorials, explaining how to start, how to create a sphere, and things like that.
I would like to find a tutorial about the creation a game, start to finish… Just like we have for other engines and such.
Also, would be nice if we could find a game source, just so I can learn from it. I’ve been searching for it in the ludum dare page, but I could not find any…
Hi and welcome to the community! If you would like a unity-style coding platform (I guess that’s what it’s called?) you can use the Babylon.js editor, which has a web version but also a downloadable windows, mac, and linux editions. The editor works like unity where you can have many scripts and attach them to different objects.
Not all programs are single scripts, but some are. To get started coding right away, you can use the Babylon.js playground, which runs right in your browser and has auto-complete, saving, and downloading functions. It also has some demos as well. The playground works off of one script.
To read up on features and text tutorials, you can visit the Babylon.js documentation. You will find the babylon101 courses and the API documentation helpful. As of full game tutorials, I found this fps prototype tutorial. I was made a few years ago, but is still relevant.
If you have any other questions, @Deltakosh runs the place around here and he can be very helpful. Nice choice of visiting the forums, as this place has answered and helped a lot of my questions and problems.
Yeah, that url is correct. I guess the website was taken down for some reason. Maybe you could use the Wayback Machine to look at the website. Pixelcodr.com is the base url.
I prefere TypeScript because it is similar to C#. It has: interfaces, private/protected/public members, generics and so on. Author of C# and TypeScript is Anders Hejlsberg. You can start here: Anders Hejlsberg: Introducing TypeScript
That book should still be relevant (I think). As far as I know babylon.js is very backwards compatible. It was written by @julien-moreau, who is also the creator of the editor. How about we ask him?
Thank you all for the answers.
Actually I will stick with javascript, C# is one of the reasons that I’m moving out from Unity. hahahahaha
It’s not that I don’t like the language, or something like it. But javascript gives you some flexibility which can improve a lot my timing to develop… hehehehe
A few months ago @trevordev, @bghgary, @PolygonalSun, @syntheticmagus and I (along with a few other helpers) made a simple kart racing game as a tutorial of sorts on how to make a networked game using Babylon.js alongside socket.io. You can check out the repo here:
@Drigax, I deployed your game on Heroku: https://kart-racer-fhl.herokuapp.com/ But sometimes you need to wait a few seconds to run server because I use a free account. Server sleeps if no one run game 30 minutes. Can I test it on one computer? I tried to run on two tabs of browser but I see only one person on the game.
I use auto deploy from GitHub. I made a clone. When I push Heroku rebuild and rerun the server automatically. I think it is very useful resource for practice. Your game is nice. I will study it. I want to write game servers for browser games. I study this article Real Time Multiplayer in HTML5 - Build New Games Did you read it?
Do you have a mac or a pc? This following part pertains to the pc local running. I’m not sure on how to do it on a mac.
All you need is node.js installed on your pc. With default settings the installer will install node and npm, which is what we need. Download the github repository and extract it. Go to the extracted folder. There should be a “client” folder and a “server” folder. The client folder has code for the game clients and the server folder has the code for the server (simple!). Open the “client” and in the windows navigation bar (should show the current folder path, like “C:\Users"your name”\Downloads\KartRacerFHL master\client") click it to highlight it, then type cmd and then enter to open up a command prompt window in the client folder. Type npm install to install the dependencies. It should install everything with success. Next type cd .. to go back a folder and then cd server to go into the server folder. type npm install again to install the server’s dependencies. Those steps are for the setup. To run, type node index to run the server code, and then open a second cmd window but in the client folder and also type node index. At this point it’s all running so navigate to localhost:80 in your browser (that’s the most common socket, 80) or what ever socket the game is running on the client cmd window should say wjere it is running.
That should be all for a local server of the game. I’ll ping @Drigax to see if I’m missing anything.
Yes, but it is more interesting to deploy it. I do not understand why when I run two copy on one computer I do not see two players? I did not study the code yet (I will). Please, try it https://kart-racer-fhl.herokuapp.com/ and, please, say maybe I to make a mistake. I changed .gitignore to deploy on heroku and I change a port on the server. Maybe something else. Can you see my fork? GitHub - 8Observer8/KartRacerFHL: Simple kart racer in Babylon
@Drigax sorry! The multiplayer works on Heroku! Nice job, thanks! But I test it and I see that it is a simple multiplayer (because it is for beginners). You do not use: client prediction, interpolations another clients, like in this example: