![]() |
|
Tutorial: Running Las Venturas Playground on your Windows computer - Printable Version +- Las Venturas Playground (https://forum.sa-mp.nl) +-- Forum: Main Talk (https://forum.sa-mp.nl/forum-3.html) +--- Forum: Development (https://forum.sa-mp.nl/forum-16.html) +--- Thread: Tutorial: Running Las Venturas Playground on your Windows computer (/thread-29854.html) |
Tutorial: Running Las Venturas Playground on your Windows computer - Russell - 09-15-2012 Tutorial: Running Las Venturas Playground on your Windows computer Before you can start developing, it's important to have the gamemode running on your own computer. The Las Venturas Playground code has been set up to make this as easy as possible, and includes utility scripts for Windows making this a one-click action. This tutorial explains how you can get from 0 to having a running server on your computer, but also how to get the LVP Pawn Editor and the LVP PreCompiler set up to make your first compile. If you have questions or comments, feel free to reply to this topic. It's important to keep this work-flow working as it is very important that new contributors can easily set up their configurations and start to code. There are minor differences between the descriptions for Windows and Linux, which will be covered in a later tutorial. Check out the source code using subversion write this Writing code: the LVP Pawn Editor and the LVP PreCompiler Because of the size of the gamemode, Las Venturas Playground has her own tools for editing and compiling the scripts. While other tutorials will go in detail about what exactly you can do with them, being able to find and launch them is a good first step. We'll start off with describing what the tools are. The LVP Pawn Editor is our own editor, and has been made to closely match all of LVP's needs. It features everything you expect from a decent editor, good integration with Pawn and project support with auto-complete for our gamemode. The LVP PreCompiler is a tool we use to enrich the default Pawn syntax by adding support for classes, specialized debugging, among many other features. This is required to be able to build the gamemode itself. Getting set up with the LVP Pawn Editor for all your .pwn files is easy:
Running Las Venturas Playground You've got all the source code checked out on your computer, so now we're ready to getting the server up and running. You may have noticed a "server" directory in the main directory, but starting the server will throw a number of errors because plugins and the gamemode are not available. Furthermore, because of the ever changing list of necessary plugins, filterscripts and NPC scripts, it will be hard to maintain this by hand. For that reason, we've created a deploy script. Running this script will set up everything that needs to happen in order to get your server running. It will verify that all required directories are there, and will then copy over plugins and create symbolic links for each file that you may be working on in your code. Running it is easy:
Assuming everything worked, you can now go back to the server/ directory in your repository. Double clicking on samp-server.exe will now work well, and you can connect to localhost:7777 to play on the server. Writing code: Opening the Las Venturas Playground gamemode Time to get started! The Las Venturas Playground gamemode is contained in a project file because of the many files and settings it depends on. Before you'll be able to compile it though, there is one more manual step which you have to take, because the server needs to know who you are in order to get statistics right.
Writing code: Sending code back to the LVP Repository Because we need to keep synchronized with the code used that makes Las Venturas Playground, you will have to commit your changes after you've made them. This will send them to the subversion server, which will allow other developers to pick them up. Let's make your first change, and then send it to the LVP Repository.
You're now ready to start coding, fixing bugs and adding new features. Be sure to check out the other tutorials, especially ones on syntax and our style guide. Before anything, you should read this tutorial to get a feel about how classes work in the LVP gamemode! Thank you for reading! Re: Tutorial: Running Las Venturas Playground on your Windows computer - Joeri - 09-15-2012 I ran the deploy script with echo on as admin on a windows 7 machine with UAC enabled, this is what happened: Code: C:\Windows\system32>echo ------------------------------------------------------It seems Windows changes the currenct directory to the system root when ran as admin, screwing up the relative links. Re: Tutorial: Running Las Venturas Playground on your Windows computer - Russell - 09-16-2012 Fixed, thank you for the report! Re: Tutorial: Running Las Venturas Playground on your Windows computer - Jay - 09-17-2012 Nice work. I've committed a fix for an issue that was causing a local server to crash should it fail to connect to the MySQL database. |