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.


Messages - Nexus

Pages: 1 ... 19 20 21 22 23 [24] 25 26 27 28 29 ... 238
346
Add-Ons / Re: NARG: BuildBot, Terragen, TMBI, and other fun stuff
« on: November 16, 2013, 02:33:03 AM »
Nexus may or may not be integrating a way to use the bricks menu as a weapon selection/loadout creator system.

And Rykuta may or may not be eating bagels and punching babies instead of helping with anything.

347
Modification Help / Re: Modulo of negative numbers
« on: November 12, 2013, 01:46:35 AM »
Actually I misread, I thought there was some confusion about a negative number mod a positive number, but it is the other way around.  In that case the answer probably should be negative but honestly isn't particularly well defined because the domain from 0 to n-1 when n is negative doesn't exist.  In that case, just default to the pure math definition.  My bad there.

348
Modification Help / Re: Modulo of negative numbers
« on: November 12, 2013, 12:46:21 AM »
If you do modulus in a math class, you can get negative numbers because it is based around remainders.  If you are asked to do modulus in a computer science class, you should not.  The point is to constrain the answer to 0 to n-1, or the domain Zn

if you want 9 hours before 4, you would do |4-9| % 12
Except that would return 5 which is incorrect

I personally don't trust the modulus in blockland anyway and always use some thing like
%val = %x - mfloor(%x/12)*12;
I'm pretty sure something like -3.5 will round down to -4

349
Modification Help / Re: Modulo of negative numbers
« on: November 11, 2013, 05:43:34 PM »
The real use of modulus in coding is to constrain an answer to somewhere between 0 and n-1.  Think of it more in terms of what you would read on a 12 hour clock.  Negative answers should never be a thing.

If you want to know the time that is 9 hours before 4:00, you would do (4-9) % 12, which should result in 7.  A negative answer is not helpful.

350
Off Topic / Re: What the forget internet?
« on: November 07, 2013, 08:33:33 PM »
Steam friends chat uses a weird port so it can work even if most other internet stuff doesn't.

351
It looks like you need to look up google's API for translate, or write a client that is html and javascript compliant (not easy)

352
Suggestions & Requests / Re: Delayed Crouch Playertype
« on: November 06, 2013, 12:06:37 PM »
Unfortunately crouching is actually handled client sided due to prediction.

The best you could do would be to have two different playertypes with different crouches, and then have it switch playertypes after a delay, but that would handle like stuff even in the best of cases.

353
Modification Help / Re: Bot Functions
« on: November 05, 2013, 09:06:23 PM »
bots generally follow the same conventions as players except use AIPlayer:: as the class type for those functions.

354
You can also use default persistence.

http://forum.blockland.us/index.php?topic=174411.msg4480468#msg4480468

Add-On developers:  You can use player persistence to save any tagged field on the client or player object by using the RegisterPersistenceVar() function.  Here is some example code:
Code: [Select]
//load the persistence add-on now, if they have it enabled.
//you can also use ForceRequiredAddOn if your add-on doesn't work without persistence
LoadRequiredAddOn("Script_Player_Persistence");

if(isFunction(RegisterPersistenceVar))  //quick way to check if the persistence add-on loaded
{
   //usage: RegisterPersistenceVar(string <tagged field to match>, bool <match all>, string <datablock classname>);

   RegisterPersistenceVar("myVariable", false, "");             // save %client.myVariable and %player.myVariable to persistence file (if those values are set)

   RegisterPersistenceVar("myPrefix", true, "");                // save any tagged field on %client/%player starting with "myPrefix",
                                                                // eg %client.myPrefixFoo %client.myPrefix_24, etc.
                                                                // This is more expensive than a straight match and can have unintended consequences, so be careful

   RegisterPersistenceVar("myDatablockRef", false, "ItemData"); // save %client/%player.myDatablockRef to persistence but verifies that it is of class "ItemData"
                                                                // and translates the id number into a datablock name before saving. 
                                                                // Datablock id numbers will vary depending on the order and number of add-ons loaded,
                                                                // so use this if you need to save a datablock reference.
}

//optionally, you can package into the apply persistence function if you need to do custom stuff to fully restore the player's state
package <MyAddOn>PersistencePackage
{
   function GameConnection::applyPersistence(%client, %gotPlayer, %gotCamera)
   {
      Parent::applyPersistence(%client, %gotPlayer, %gotCamera);
     
      //Do custom stuff here...
   }
};
activatePackage(<MyAddOn>PersistencePackage);
Player Persistence files are saved as config/server/persistence/<blid>.txt

355
Games / Re: Steam Machine Prototype design revealed!
« on: November 04, 2013, 07:14:18 PM »
Well the case at least you don't have to be staring at.  The controller and the actual SteamOS interface on the other hand need to look really nice because yes.

356
Games / Re: Console & Steam Users Database
« on: November 03, 2013, 09:12:02 PM »
You can poke through this old thread if you like: http://forum.blockland.us/index.php?topic=209180.0


357
Modification Help / Re: Finding a code buddy help?
« on: November 03, 2013, 05:07:07 AM »
A city RPG is a terrible place to start coding. You don't need a coding buddy, just ask for help in Coding Help.

I would highly disagree.  Iban has some of the best commented/labelled and most modular code I have ever seen in blockland.
Editing his cityRPG is where I started, even if it was just preference variables at first.

358
TorqueScript in general is not case sensitive, but strPos is one of those few rare exceptions.

359
Games / Re: Rollercoaster Tycoon 2 or 3?
« on: November 02, 2013, 04:52:06 AM »
I personally liked roller coaster tycoon 2 more than 3.  I played the stuff of out rc2.  However, I only tried 3 when it was brand new and I remember it mostly confusing the forget out of me.

360
Off Topic / Re: Good ISP's..
« on: November 01, 2013, 07:34:24 PM »
comcast is evil but you really aren't going to get anything better unless your town decided to install its own fiber service

Pages: 1 ... 19 20 21 22 23 [24] 25 26 27 28 29 ... 238