Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - NewK

#1
DecUI

After having to deal with some of the issues and annoyances that come along with the experience of building a GUI in VCMP, I decided to create DecUI (declarative UI), a library to address the main pain points related to GUI development in VCMP and make it easier and more readable overall.

This library provides an abstraction over the existing GUIElements and allows you to create them and relate them to each other in a declarative manner instead of using the default imperative based VCMP approach. You can see a comparison here.

In addition to providing an abstraction layer for creating GUIElements, this library also provides many new components like:

There's also many new features that have been added to already existing GUIElements like GUIElements ID's, a hide()/show() function, an autoResize property for the GUIWindow and GUICanvas which will automatically resize your windows and canvas according to their contents, a fadeIn()/fadeOut() function and many more new properties which can be seen here. All the existing properties and functions like .Size, .Position and the others mentioned on the VCMP wiki are still applicable when using this library so they will still work.

Downloading and getting started


The documentation is still incomplete but it's a good starting point for now.

Any questions feel free to ask
#2
Community Plugins / Javascript plugin
Aug 16, 2018, 03:42 AM
VCMP bindings for javascript based on the already existing java plugin.

Download

There are no 32bit linux versions available because there's no V8 java bindings available for 32bit linux.

All javascript code runs on V8 v5.9.1. I'll look into possibly upgrading to a newer version in the future but right now this is not a priority. I've included a sample script that's set up with an IRC bot that connects to a LUnet channel and that echoes what people type ingame and what people type on IRC. This script uses SQLite for player registration and has the /login command the /register command and the /stats command. If you'd like to use MySQL instead of SQLite on this sample script, all you need to change is how you create the DB connection. Everything else is the exact same. The SQL module shares the same API for both SQLite and MySQL, function names are all the same. So if you ever need to migrate your server from SQLite to MySQL or MySQL to SQLite, all you'll need to change is how you create the connection. You can see an example on line 35 of the main.js file. If you use that connection instead of the one on line 32, you won't need to change anything else on the script, you just need to create your MySQL schema and create the same players table like the one on the SQLite db.

If you'd like to start fresh with an empty script, you can remove this script by deleting the "commands" folder inside the "src" folder, deleting the "sampleServer.db" SQLite database and deleting all the code inside "main.js". Just don't delete the node_modules folder because you'll need this to use the available modules.

Installation instructions

A few notes
  • All javascript code must be inside the "src" folder
  • The entry script file must be named "main.js" and must be placed on the root of "src"
  • The load() function is equivalent to squirrel's dofile() function and can be used to load other .js files
  • require() is used to import modules you want to use, the available modules are inside the node_modules folder (the only reason I decided to keep this folder with the same name of the nodejs's node_modules folder was to help text editors (sublime, visual studio code, atom, etc...) give you better autocomplete suggestions when importing the modules
If you want to use javascript classes you need to enable javascript's "strict mode" on your classes with "use strict". For example:
"use strict"
class Rectangle {
    constructor(height, width) {
      this.height = height;
      this.width = width;
    }
  }
This is a limitation of version 5.9.1 of V8.

In the next following days I'll be creating documentation for the plugin. If you have any questions feel free to ask here. If you have problems create a new topic on the support board seeing as support is not allowed on this board.
#3
General Discussion / Javascript plugin
Aug 06, 2018, 03:37 AM
Would anyone be interested in a javascript plugin?  I've got a basic vcmp javascript plugin working at the moment, still needs some testing but it's working. It runs on V8 and uses a nodejs-style event loop that allows you to do IO operations asynchronously without blocking the main thread. That's one of the advantages over squirrel. Another one is that it's also alot faster than squirrel and this is very noticeable for CPU intensive tasks. Some of my benchmarks showed it to be about 30x faster than squirrel.

All that's left to do right now is create some documentation, although I'd rather not go through the painful process of creating documentation and wasting days setting that up if there's no people interested in the plugin. So with this topic I'd just like to know first if there's anyone that would be interested in this plugin or not, I don't want to invest my time maintaining and documenting it if there's no interest from people ;D

#4
Servers / MK | Capture the Flag
Aug 13, 2015, 12:14 AM

 
IP: vc-mp.net:5196
Hosted by:  Sky-City Hosting
Number of players slots: 100
Scripts:  [ CTF v6.0 ] by NewK
IRC Channel:  #MK.CTF on LUnet
Server Forumhttp://ctf.vc-mp.net


This server intends to bring more diversity to VCMP's game modes, introducing a different game mode other than TDM and DM. It's not a new gamemode for anyone who has played multiplayer FPS games these last few years. The concept is the same, there are two teams, one must capture the enemy's flag and bring it to their team's base where there will be a drop-zone which will be a barrel pickup. When the time limit ends, the team with the most points will be the winner. You gain 15 points for each sucessful flag capture, and 1 point for each kill. You'll receive 5 aditional points for each 5 kill spree you make. Every time a round ends, the server will automatically teleport players to the lobby and start a new round on a new arena. You can see some of the available arenas here and all of the available weapon packs here. We also have few custom maps that can be played as arenas that were built by our staff team with various game models. If you have a new idea for a new arena/base feel free to make a suggestion here.

Useful links

- Staff team
- Support
- Webstats
- Server rules
- Server and IRC commands

F.A.Q.

Why can't I pick up the flag?
To pick up the flag you have to stay still on top of it for 3 seconds.

I have captured the flag but how do I drop it?
To drop the flag and score points for your team, you have to go back to your spawn where you will see a barrel, just go over it and the flag will be dropped.

Why does the server keep killing me when I spawn?
If that happens, that means you're trying to spawn on a team that has too many players, spawn with a skin from the other team to balance the teams.

Why can't I spawn with the builder skin?
The builder skin is there only for testing purposes and building bases so you won't be able to spawn with it unless you have atleast level 4.

How can I change my weapons pack? I used the !pack command but it didn't work
You have to choose your weapon pack before the round starts with the command !pack <id>. If you see a loading bar on the bottom right of your screen, that means the server is waiting for you to choose your weapons pack, if you don't choose any, you will be given the default weapon pack. You can use the !packs command to see what each pack contains. If the round has already started you can use the !changepack command once.

Sometimes my character starts jumping/floating, is this a bug?
When that happens, that means you've hit the world boundaries limits set by the server for that specific arena, every fighting location has different boundaries in different places, this was done on purpose so that players don't leave the fighting territory, it's not a bug.