Table of Contents

[hemmerling] CORE ( COREGAMES ) 2/3 - CORE Application Development

Related pages:

Help & Documentation

Overview

Help Center / Support

Documentation

Lua & Lua Tutorials

Lua

Lua Tutorials of CoreGames Documentation

Standard Lua 5.3 versus CORE Lua 5.3

Missing with CORE Lua 5.3

Modified with CORE Lua 5.3

function FunctionName()
end
TableName = {}
VariableName = "123"
_G["FunctionName"] = FunctionName -- Necessary for Lua@Core
_G["TableName"] = TableName -- Necessary for Lua@Core
_G["VariableName"] = VariableName -- Necessary for Lua@Core
print(_G["FunctionName"]) -- "function: 0000021CC1CB9520"
print(_G["TableName"]) -- "table: 0000021C925E5540"
print(_G["VariableName"]) -- "123".

Different with CORE Lua 5.3

Extra with CORE Lua 5.3

Resources

Videos

Videos

Resources

My suggested Learning Path

Suggestions

Suggested Tutorials

  1. Course Core Academy - Course "Intro to Lua", Part I + II √.
  2. Video tutorial YouTube, JasonCdesign "Lua Basics Tutorial Series - Create a collectathon game" √ - “Using the Lua language in the Core games editor”.
  3. Course Core Academy - Course "Intro to Lua", Part III “Events and Game Loops” √.
    • “Basic Pistol(networked)” ⇒ “Parenting to client context. Some objects cannot be inside a client context. Shoot. Reload” :-(.
    • Instructions:
      1. “Basic Pistol(networked)” ⇒ “Deinstance this Object”.
      2. “Client Art (networked)” ⇒ “Create Network Context > New Client Context Containing This”.
        • “Wrapped networked object in client context. Client-only objects can´t be networked. Continue wrapping objects in client contect adn disable network for selected objects?”.
      3. “ClientContext (networked)” ⇒ “Game Collision = Force Off” ( this is the default setting ).
      4. You may also notice that the weapon, when equipped, could be not at all in the right spot. The animations should be correct, but the weapon position might be through your body or above your head, or rotated all weird” - Not true in 2020-04, anymore :-).
      5. *”Basic Pistol(networked)” ⇒ “Properties / Equipment / Socket = right_prop” ( this is the default setting ).
      6. “CoreContent / Utility” ⇒ “Weapon Guide 1handpistol” ⇒ “Basic Pistol(networked)”.
      7. “With the Weapon Guide 2hand_rifle 1handpistol selected, Set all Position Transforms in the Properties window to 0”.
    • The rest of the original instructions is easy to understand :-), though not all works as expected :-(.
    • Having a projectile also means that you can change how fast it travels through the air, along with other settings in the Weapon section” - No. Instead “Basic Pistol(networked) / Projectile / Projectile Speed = 25000” ( default value = 25000 , reset value = 20000 ).
    • “Universal Object Spawner” ⇒ Core Documentation, Reference "Core for Global Game Jams" - “Universal Object Spawner by standardcombo will allow you to continually spawn copies of objects, so players never run out of a resource, equipment, or weapon”
    • “FireFly”.
      • Press SHIFT to fly, and then WASDF to fly into a direction.
      • Parameter choice suggestions:
        • Select as model “Baseball Bat”, to be hold in the Client Context folder within the weapon.
        • Execute section, change Duration to 10 ( instead of 3 ).
        • In the Cooldown section, change the Duration to 1 ( instead of 12 ).
    • “Right Click to Aim”.
      • Press Mouse-Rightclick to activate the aim & zoom function.
    • “Ammo as a Pickup”.
      • “Pick up an ember pickup. Once you've gathered one, press R on the keyboard to trigger the reload ability”.
  4. Tutorial Core Documentation - Reference "Modeling Basics" √ - “Learning modelling basics in Core by making delicious food”.
    • Your Text Box probably came with another UI Container, but as this is already a child of a UI Container, we don't need both. Drag the CoinUI one level higher to just be a child of the Client Context folder. Then you can delete the extra UI Container”.
      • “Client context” vs “networked”:
        • In just “simple preview” mode, the IDE is running both the server and the client on the same machine.
        • “Client context” - Use it for visuals and user interface ( UI )!
        • If it matters, that each client is to see the exact same thing happening, then use “networked” context.
        • “Server context” - Visible just in “simple preview mode”, else invisible. The position of the object might be used as marker ( by the game developer ): In a script, it's position might be used to spawn a new object there.
        • If you enable networking for a “Static content” unit of objects, all objects of the unit together are considered to be one object.
          • With the benefit that this unit happens the same for every client.
          • There is less network communications, as there is just one network object, not a bunch of network objects.
          • But you can move around just the networked “Static contents” as unit, not the single objects of the unit, as a unit is not a group.
      • “But then, we have a lot of these other UI elements. And if we keep adding these, it's getting pretty unorganized. And so, traditionally in CORE, if we are using 3D objects, we would just go ahead up and group things up, or use folders depending on what our goal were”.
      • “But if we do this with UI, so as example I take these 2 background images, and I make them a group, you will notice that they get messed up” ( The “Position”, “Rotation” and “Scale” settings of groups and folders don´t apply to UI elements ! ). “And that is one of the reasons you want to avoid using groups inside the actual structure of the UI”.
      • So instead, what we can do, we actually create another panel, and we would make it a child of the parent panel there, and we would inherent size” ( width, height ) “from the parent. Then we can move all the stuff we want underneath that panel. That allows up to do some cleanup”.
    • YouTube, GamerTitan "Core Games UI Tutorial - Making A UI Toggle From A Keypress" - The template “GamerTitan Toggle UI Tutorial” is available as Community Content.
    • YouTube, GamerTitan "Core Games UI Button Tutorial - Making Clickable Buttons" ( “How To: Create Clickable UI Buttons in Core” ).
      • The template “GamerTitan UI Button Tutorial” is available as Community Content.
      • 10:00 “You can attach as much information as you want to each object in CORE. And on the client we use 'clientuserdata', and then it's a table attached to the object ... and this is valuable, for when you have multiple buttons for multiple things attached to a single event listener” = > Gives practical example of use of “clientuserdata” :-), but which is not in the final downloadable project :-(.
      • 13:00 “And locally, a client can send 10 events / second to the server”.
      • Project code makes use of “serveruserdata”.
      • Project code defines a UIPanel of several UIButtons as a CustomProperty and uses “clientuserdata” to differ between the UIButtons :-), but which is not in the final downloadable project :-(.
    • Buy menu.
        • “Tooltips” for CustomProperties :-), set in “WeaponBuyMenu.pbt”
                    Overrides {
                      Name: "cs:Enabled:tooltip"
                      String: "To disable the entire system set this to false (unchecked)"
          
        • Unfortunately, just the menu options are explained :-(. It does not explain how to build a menu or a framework, nor now to use the given framework :-(.
      • CORE Community Content Template “Weapon Buy Menu System” by CORE Games "Morticai" ( formerly: “Weapon Buy Menu” ).
        • Instructions if you want to import into an “Empty Project”:
          1. Import the video from “Community Content”.
          2. Drag the item “aponBuyM” from “Core Content” to your Hierarchy browser.
          3. After that, it is listed at “Imported Content”.
        • If you import to the gameplay framework “Team Deathmatch”, imported contents is immediately available at “My Templates”. After you dragged it to your Hierarchy browser, it is also available at “Imported Content”.
        • The video is outdated in 2021-05. At the earlier time of video making, imported contents was immediately available at “My Shared Content”.
  5. Global variables √.
  6. Wait / Sleep / Daemon ( Background Process ) √.
  7. “require()”, “context”, “_G.” √.
  8. UI.
  9. Queued applications, interconnected Games √.
    • CORE Documentation "CORE API - Player" √ - “TransferToGame”.
    • Error messages:
      • “Unable to transfer players outside of online mode!” - Interconnecting does not work in simulator, ok.
      • “There is a system cooldown for portaling between games. Please try again shortly” :-(. From my experience, a delay of 7 seconds is sufficient, 5 seconds might be too short.
        function OnBeginOverlap(trigger, other)
        	if other:IsA("Player") and not trigger.isInteractable then
        		Task.Wait(7)
        		other:TransferToGame(DESTINATION_GAME)
        	end
        end
  10. Events, Networking & Network communications ( also to and from UI ).
  11. Persistance.

My Contributions & my Questions

OpenSource CORE Projects and OpenSource CORE Templates

OpenSource CORE Templates

OpenSource CORE Community Projects

OpenSource Repositories with CORE Community Projects

My OpenSource CORE Projects and OpenSource CORE Templates

My OpenSource CORE Templates

My OpenSource CORE Projects

My special minimal CORE Projects, just generated to get Help by the Community

CORE Game Design Rules

Tips & Tricks

Forums, Newsgroups


When this document changes ! Site Navigation ( My Business ! My Topics ! Imprint / Contact ! Privacy Policy ! Keyword Index ! ! Google+ Publisher "hemmerling" )