HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

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 - Jrome90

Pages: [1] 2 3 ... 22
1
I assume you have read: http://hewiki.heroengine.com/wiki/HSL_for_programmers  ?

I learned HSL before c++. After learning c++ I can now see how it would be difficult to grasp HSL syntax.

What are you having trouble with?



2
It worked because you rotated the vector and then added the rotated vector with another vector that was the offset

Below the vectors (g,i,m,k) are the vectors at the origin that are rotated
Vectors (g',i',m',k') are the same as (g,i,m,k) respectively but translated.
And finally (tg,ti,tm,tk) are the resulting vectors from adding the vector t and the other vector. 
For example: tg is the vector from adding t and g together.


I created the above quite some time ago using Geogebra.
You can play with the web version of this at: https://ggbm.at/gjDQJTs9
Ignore the shear slider. the vectors at the origin aren't affected  by it

3
If you wanted you could do this without an external function. It would require spatial partitioning on the client side and then you'd just check if the objects in neighboring partitions are at a distance less than or equal to the radius from the center point.

Probably easiest to just use raycasting though.

4
General Discussion / Simplify the creation of DOM data
« on: Nov 20, 16, 08:18:46 PM »
I never was a fan of the DOM editor or the Command Line Interface to make changes to the DOM. I made a program to automate the process of the creation of DOM data for Enums, Classes, and Fields. I call it  "Auto_CLI".

This program looks for two JSON files. One for the client and another for the server(in that order).
run.bat:
Code: [Select]
%CD%\CLI_Automation Example_Client.json Example_Server.json
If you have nothing to add to the server or client you can leave one of the files empty with:
Code: [Select]
{
}
Below are examples showing all properties and DOM objects supported on both the server and client:
Both The field: minimumField and the class: MinimumClass are examples of what the minimum requirements for a field, and class are.
Anything that is not defined in the JSON* object has the same default value as the Dom Editor.
Code: [Select]
{
  "Fields":
  {
    "someField":
    {
      "description": "enter a description",
      "field type": "enum ENUM_EX",
      "reflect to ghost": false,
      "write strategy": "lazy",
      "watching script": "None",
      "private": true,
      "distribution package": "game"
    },
    "minimumField":
    {
      "description": "enter description",
      "field type": "integer",
      "distribution package": "game"
    }
  },

  "Classes": {
    "SomeClass": {
      "archetype": "Data",
      "description": "Enter A description",
      "distribution package": "Game",
      "parent classes": [ "MinimumClass" ],
      "fields": [ "someField", "minimumField" ]

    },
    "MinimumClass": {
      "archetype": "Data",
      "description": "Enter A description",
      "distribution package": "Game"
    }
  },

  "Enumerations":{
    "ENUM_EX": {
      "description": "Enter A description",
      "distribution package": "game",
      "enum values": [ "ENUM1", "ENUM2", "ENUM3" ]
    }
  }
}
Example_Server.json
Code: [Select]
{
  "Fields":
  {
    "someField":
    {
      "description": "enter a description",
      "field type": "enum ENUM_EX",
      "reflect to ghost": false,
      "write strategy": "never",
      "watching script": "None",
      "private": true,
      "distribution package": "game",
      // Replication properties are server side only
      "discrete": true,
      "change callback": true,
      "destination field": "someField",
      "destination field client": "someField",
      "reverse replicate": true,
      "reference adjust": false,
      "initial priority": 123,
      "delta priority": 123,
      "lifetime": 1234,
      "distance factor": 100
    },
    "minimumField":
    {
      "description": "enter description",
      "field type": "integer",
      "distribution package": "game"
    }
  },

  "Classes": {
    "SomeClass": {
      "archetype": "Data",
      "description": "Enter A description",
      "distribution package": "Game",
      "destination class server": "SomeClass",  // Replication properties are server side only
      "destination class client": "SomeClass", // Replication properties are server side only
      "parent classes": [ "MinimumClass"],
      "fields": [ "someField", "minimumField" ],
      // Replication properties are server side only
      "replicated fields": [ "someField" ],
      "initial set fields": [ "someField" ]
    },
    "MinimumClass": {
      "archetype": "Data",
      "description": "Enter A description",
      "distribution package": "Game"
    }
  },

  "Enumerations":{
    "ENUM_EX": {
      "description": "Enter A description",
      "distribution package": "game",
      "enum values": [ "ENUM1", "ENUM2", "ENUM3" ]
    }
  }
}


Most errors are displayed and then stop the execution of the program. Errors that are caused by attempting to create a definition that already exists are ignored.


Limitations:
*This program will not work with any reference worlds.
*Requires the console to be visible .
*It may take some time before the program finds the console. It's recommended to close the dom editors to speed up the search.
*It may not work very well, or at all if your console is spammed with messages.
*Doesn't support creation of association DOM definitions.

Benefits
*Use the JSON format that this program uses to share DOM definitions with others.
*A class or field is fast and easy to create
Code: [Select]
{
  "Fields": {
    "field": {
      "description": "enter description",
      "field type": "integer",
      "distribution package": "game"
    }
  },

  "Classes": {
    "class": {
      "archetype": "Data",
      "description": "Enter A description",
      "distribution package": "Game"
    }
  }
}
*A way to manually Backup the DOM definitions using the JSON format.
*Includes templates for the DOM definitions for spec creation.
----------------
To use
Download the zip file here
Create one JSON file for the server and one for the client.
Edit the .bat file to change the arguments to the names of the files you want to use
Have the HeroBlade open with the console visible.
run the .bat file and wait until it's done or an error has occurred. If an error occurs make the corrections and run it again.

Please let me know if you encounter any bugs.
-------------------------------------------------------------

5

Quote
And I'm not using a spatial system for this replication group

Ahh i thought you were dealing with default HE replication, it will not work without a spatial entity, period.
HE replication relies on the SaS and the Enter/Departed etc functions to control replication.

It's actually pretty simple.

When I was learning replication quite some time ago I made a blackjack game that uses replication with no SAS.
Here is the code:
https://docs.google.com/document/d/1rLybwDbAR1798F3GRkPKafBpwyNTqlMvwstP3lZy9Vw/edit?usp=sharing
The replicated fields are at the bottom.

CreateNewGame() is only called when a game was created.
AddPlayer() is called when a player joins the game (After it was created)


GlorianLanTarini, When I don't get any callbacks when a field changes, or a node is replicated it's because I forgot to set the ClientDestination field of the server side.

Are the nodes being replicated to the client at all? You can check using the "/qn" console command. You probably already know this though.


6
Developer Created Tutorials / Re: Basic SpecOracle setup
« on: Mar 16, 16, 08:02:56 PM »
Thanks for posting this Krun. I am sure many will find this useful.
It looks like you forgot to add the "SpecDerivedObject" class to the client side.
For those that prefer to use the CLI (Like me) here are the CLI commands that correspond to each step that is done in the DOM editor

Server

1 Create a new class called *Ability*Spec (Archetype = Data)
\CCD *Ability*Spec, data; description="*Ability*Spec"

2 Select *Ability*Spec class and add BaseSpec as a parent class
\MCDAP "*Ability*Spec"; "baseSpec"

3 Add the following fields: displayName and displayDescription
\MCDAF  *Ability*Spec; displayName DisplayDescription

4 Create a new class called *Ability*SpecOracle (Archetype = Data)
\CCD *Ability*SpecOracle, data; description="*Ability*SpecOracle"

5 select *Ability*SpecOracle class and add SpecOracle as a parent class
\MCDAP "*Ability*SpecOracle"; "SpecOracle"


7A OPTIONAL: If you will create objects/nodes from this spec class (SpecDerivedObjects) then do the following:
   in the Server DoM Editor create a new class called *Ability* (Archetype = Data)
   Select the *Ability* class and add the parent class SpecDerivedObject

\CCD *Ability*, data; description="SpecDerived Object for *Ability*
\MCDAP "*Ability*"; "SpecDerivedObject"


Client

1 Create a new class called *Ability*Spec (Archetype = Data)
|CCD *Ability*Spec, data; description="*Ability*Spec"

2 Select *Ability*Spec class and add BaseSpec as a parent class
|MCDAP "*Ability*Spec"; "baseSpec"

3 Add the following fields: displayName and displayDescription
|MCDAF  *Ability*Spec; displayName DisplayDescription

4 Create a new class called *Ability*SpecOracle (Archetype = Data)
|CCD *Ability*SpecOracle, data; description="*Ability*SpecOracle"

5 select *Ability*SpecOracle class and add SpecOracle as a parent class
6 Add CollectionOrderedSet to *Ability*SpecOracle as a parent class
7 Add ObsSubject to *Ability*SpecOracle as a parent class
|MCDAP "*Ability*SpecOracle"; "SpecOracle" "CollectionOrderedSet" "ObsSubject"


OPTIONAL: If you will create objects/nodes from this spec class (SpecDerivedObjects) then do the following:
   in the Client DoM Editor create a new class called *Ability* (Archetype = Data)
   Select the *Ability* class and add the parent class SpecDerivedObject

|CCD *Ability*, data; description="SpecDerived Object for *Ability*
|MCDAP "*Ability*"; "SpecDerivedObject"


7
Scripting & Programming / Re: CLI and the console view
« on: Oct 27, 15, 12:12:06 PM »
Quote
On a side note, the CustomCommands file that heroblade writes when you click save in the cli doesn't get read in if it is modified outside of heroblade which seems like a bug

Yeah it doesn't load the file, and there is no way to  manually load it either.

Quote
Is there any other way to extract a dull listing of DOM objects?

What is all the information you are wanting to extract?

Quote
I am using cli commands to list DOM definitions in the console for HJ
I am curious How you are able to do that. The console input is disabled.

8
Just wondering, why do i need  a class id? In which scenario...

You can use the ID with SCD to get more information about that class.

9
I wanted to share this spreadsheet that I thought could be useful.
It contains the following data for both client and server side:
  • Class ID
  • Class Name
  • Archetype
  • Package
  • Description
  • Server Destination
  • Client Destination

Why might this be useful?
Because it's much better than looking through the DOM editor, or QCD and looking through the Console for a class ID.
And from what I could tell the Class IDs are the same across worlds. So You can use "|or \ scd for fast lookup.

For those that want to know how long this took to make
Around Five minutes (Computers are fast)

https://docs.google.com/spreadsheets/d/1vEJcpTaUmoSgZvd657FMwzuplugUSP5tXWxNqQjHbP0/edit?usp=sharing






10
Off Topic / Re: hey guys i didnt know where to post this exactly
« on: Sep 17, 15, 01:25:15 PM »
From: https://community.heroengine.com/forums/index.php/topic,741.0.html
Quote
* We also provide you with a website for your game's beta, complete with account systems and beta key code functionality. This same site functionality then becomes the basis for your game's "live" product, adding billing and account management. You can see some examples here: Games.HeroEngine.Com.

11
I did some tests running back and forth through seamlessly linked areas in my world many times and couldn't get the errors.
Lastly, I went into a different World and repeatedly crossed over from one area to the next several times. Still nothing.

12
General Discussion / Re: .Exe File not working ( DavidAH )
« on: Sep 14, 15, 06:46:35 PM »
Perhaps the solution Here will fix it

13
By design, anything done in the play instances are not persisted. Which in my opinion makes edit instances really only good for making changes to an area during development, or for persisting  data in a system area.

14
Jrome thank you I understand that but I found this as well:

http://hewiki.heroengine.com/wiki/Association#Associating_a_Node_with_an_Area

Am I understanding that I will have to use a remote call to the edit instance 0 and create the association on there every time?

In theory that should work. But nobody will get the changes unless they just entered the area since the change.

As suggested by others, it's best to use an Arbitrary Root Node, and load that into a system area.

What is the reason you want to tie it to an areas root node? Is it just so that the house is tied to that area?
You could still do that using a system area, and some way of sending the data to the interested players.

15
I have already thought of a few ways I could do it but I prefer this way.

I just would like a thorough explanation on how or why I cannot create an association to GetRootNode() in a Play Instance but querying GetRootNode() in a play instance correctly returns any foundations I associated to that area in an Edit instance. I feel like GetRootNode() should return a persistent node every time despite what type of instance it is. If what Scott says is true then how do you create an association in a play instance?

Code: [Select]
  HouseFoundationNode as NodeRef = CreatePersistedNodeFromClass("HouseFoundation")
  RootNode as NodeRef = GetRootNode()
  AddAssociation(GetRootNode(),"FoundationToAreaRootNode",HouseFoundationNode)
Only works in an Edit Server

Code: [Select]
hf as List of Association = QueryAssociation( GetRootNode(), "FoundationToAreaRootNode", None )Works on both Edit and Play servers.


From the wiki
Quote
An Edit Instance of an area is always the #0 instance. Any changes made to the Area are persisted to the database as they are made. This saved version becomes the template for any future Play Instances of the Area, because the edits will be saved to the Repository.
There is only one Edit Instance of an Area in a given World.
The Edit Instance's sole purpose is for world-building. It is not a good idea to do gameplay testing in an Edit Instance, is there is any change that the play might affect anything that would be improper to persist to the database. Gameplay testing can be done in an Edit Instance, but it is not recommended.


Pages: [1] 2 3 ... 22