Tag: dev

Iteration #0: feature updates (and fiddling)

Iteration #0: feature updates (and fiddling)

After managing to deliver on my project management priorities, iteration ) of TGM47 is complete.

Iteration #0 is a series of prefabs that address basic interactions and movement.

The main purpose of this iteration was to create prefabs that would make future iterations a bit more efficient as I can draw and iterate from these general principles to create environment/level specific instances.

Of course, with the explicit approach to development being organic there have been more than a few bits of fiddling and going off on tangents that are perhaps fundamentally opposed to some of the original concepts – specifically eleveators!

Iteration #0 – Features

PlayerMovement()

  • Movement that is inertia based
  • Boost (accelerate on Y) – jump
  • Dash (accelerate on Z)
  • Power consumption

PlayerInteraction()

  • Raycasting to recognise and retrieve information from other GameObjects

PlayerCollisions()

  • RigidBody Interactions

PlayerAudio()

  • Transform based audio for all movement elements

PlayerUI_canvas()

  1. Display and update power consumption
  2. Methods to allow messages from other objects to be displayed linked from CamSpace to WorldSpace
movement and interaction

Door(BC)()

  • A button controlled door opened/closed using the Player Raycast to distinguish between and activate individual doors

Door(PP)()

  • A door controlled via a collision trigger
  • Parameters include options for how many objects (and of which type) are required to activate the door
button controlled and pressure pad controlled doors

Elevator()

  • Based on the door prefab this elevator is activated in the same way as the Door(PP)() but has other customisable options:
  • A button that can call the elevator to this floor
  • Elevator ‘knows’ which floor it is on and responds accordingly – going up/down/already on this floor

Some conclusions and thoughts

Why do I need elevators anyway???? Seeing as how the main player is the TGM camera complete with a boost (fly) function/hover it seems a bit unnecessary.

Having said that it was more the challenge of trying to develop a universal/catch all prefab that could solve what is (at least for me) a quite complicated logical problem. In this example there are only 2 floors so the logic isn’t particularly head scratching but (for the sake of it), I’ll try and develop a more universal script that I’ll then put on the Unity store…..

One of the fundamental lessons learned in this iteration is the need to have some idea of how the logic will work in a given scenario and what objects need access to what data. Rule of thumb (based on research) seems to be to allow parent objects to control and access data in children and try and push scene/level wide data into an overall manager that injects data into the objects in the scene as requires.

Thats an ongoing learning process at the mo but as scenes become more complex this approach will help keep the logic and the code clean, accessible, easy to debug and easy to read.

A future iteration of this needs to include some experimentation with the player itself. The next iteration is focussed on developing a way to ‘shoot’ video textures onto world object, although after having started to experiment with animations in Unity and Blender I want to develop a TPS with Cinemachine option for this project.

(GIFs created with https://ezgif.com/video-to-gif)

Human Places, Human Spaces

Human Places, Human Spaces

This 1979 (complete with awesomely future-retro funky intro tune and graphics) film is based on William H Whyte – Street Life Project and explores how people use spaces in the real world.

A useful resource that can help design how AI elements might interact with game architecture.

Project Management

Project Management

You will comply

Resistance has indeed proved futile!

When I first started developing tthe glitch machine B47 as a fully fledged project in April/May 2020, I was coming at it form the point of view of a bit of a hobbyist/hacker without much regard for protocols and the ‘trappings’ of management approaches.

For me, the project HAD to be organic and I wanted the dev itself to inform the content, structure and narrative. After all, one of the main themes of this whole idea is about liminality, about becoming and being in a state of flux; so any kind of formal structure struck me as fundamentally anti- glitch.

Of course it didn’t take long to get completely out of my depth and lose control of what I was doing and while I appreciated the chaos it wasn’t conducive to making progress.

The number of scripts, the bugs they inevitably create (especially in my code), the concept ideas, artwork, 3D models, textures, materials, AV content, scenes, iterations, theory and on and on…. that are involved in getting anywhere with any kind of project like this need to be addressed…they need to be managed.

So I started trying out some tools and thinking about how best to manage this seemingly overwhelming workload.

http://notion.so is a really nice note taking app with lots of other lovely functionality that lends itself to a dev environment.

Comes complete with a database manager that makes task tracking really straightforward plus lots of other features that allowed me to make a functional, centralised space for all project areas.

With notion you can easily publish your site to the web and add hosting if you want to:. Theres plenty of support and help available online and good community engagement.

Easy to use, free for personal use, and comes with a desktop app too!

So thats all good!

I used this for about a month and was learning as I went – both about the platform and how best to organise and mange the project. The eventual breaking point for me though was API integration.

At the time of writing theres no official public API and while this situation looks set to change in the near future I needed to move on and start connecting ideas and content to this site.

At its core https://trello.com/ is a visual to do list…but with power ups!

Using this app (again free for personal use and a desktop app) is super easy and setting up a scrum style project flow is extremely straightforward.

Boards can be expanded and shared with teams to track project progress and neat power up options allow some automation of tasks, like moving ‘complete’ tasks to the ‘completed’ list. You only get one power up with a free account so choose wisely….

Another great feature was adding priority fields to tasks and being able to filter accordingly. I also used this chrome plugin to add some extra functionality without having to cough up any money: https://chrome.google.com/webstore/detail/pro-for-trello-free-trell/hcjkfaengbcfeckhjgjdldmhjpoglecc. This was useful for tweaking some parameters and setting the overall look when using the app online – bu that’s online only and doesn’t apply to the desktop app and won’t work in a team situation unless everyone has the same setup.

Anyway, all round thumbs up from me and used this for a week or so – but again the breaking point for me was the lack of integration with other apps I wanted to use and exporting CSVs all the time is just a pain…..

Google Sheets I don’t think needs much explanation – its part of the Google suite of online office apps…and its free….and its HUGELY functional….overwhelmingly so!

So after a month or so of playing with other apps like notion, and trello, it turns out I had learned a fair amount about how project management works and more importantly what I wanted my project management to do!

That last statement should have been the first task in my project management saga I know, but this is an organic process……

So once I had the over arching process clear in my head I made my own system in sheets. The resource here: https://www.goskills.com/Project-Management/Articles/Project-management-template-Google-Sheets was useful in getting started and then its just a matter of how complex/deep you want to go .

There’s a massive amount of resources, help and community support for pretty much any kind of functionality you need inside your sheets, so after about a week of development I now have a system that:

  • tracks dev area iterations based on tasks
  • includes a sprint page tracking focussed function dev
  • includes an overview that provides an ‘at a glance’ status breakdown
  • is a PM system that is centralised and always available
  • is flexible and extensible to suit project needs

With this tool I’m now able to prioritise tasks, plan functionality and implement iterative sprints while retaining the flexibility I need in order to expand and develop the project. In fact this post is a part of a web design sprint due today.

As far as deviating from the glitch aesthetic I’d say…..

…you can’t break it ’til you make it, right?

Player: UI Info Overlay

Player: UI Info Overlay

Solution to displaying interactable object information on `UI based on https://forum.unity.com/threads/get-ui-placed-right-over-gameobjects-head.489464/

    //send the ray from the **CAMERA** (not the player)
    rayDirection = camera.transform.TransformDirection(Vector3.forward);
    //point of origin is LOOK - from the camera
    ray_pointOfOrigin = camera.transform.position;
    if (Physics.Raycast(ray_pointOfOrigin, rayDirection,
        out interactableObjectHit, scanRange))
    {
        //Change the color based on object in range
        //Check if the hit obj has Interactable Tag
        if (interactableObjectHit.transform.CompareTag("Interactable"))
        {
            crosshair.color = Color.red;
            //Get the transfrom of the hit object
            rayCastHitObject_transform = interactableObjectHit.transform;
            //Get the name of the hit object
            rayCastHitObject_name = interactableObjectHit.transform.name;
            if (interactableObjectHit.transform == null)
            {
                rayCastHitObject_name = null;
            }
        }
    }
    else
    {
        crosshair.color = Color.white;
        //change the name to null so we can differentiate a
        //no hit event in the UI controller
        rayCastHitObject_name = null;
    }
/*
RAYCAST INFO    
Running in update to ensure we are updating what we're looking at.
    We are receiveing raycast info from playerinteraction script that gives
    us the name of the object we've hit (we are looking at) using:
    rayCastHitInfo = hit.transform.name;
    We can use this info in the UI to display the name and info about
    the object we're currently looking at.
    *********************************************************************/
    if (playerInteraction.rayCastHitObject_name != null)
    {
        //Turn on the components we need in UI
        canvasGroup_interactableObjUI.enabled = true;
        panel_interactableObjUI.enabled = true;
        text_interactableObjUI.enabled = true;
        lineRenderer_hitObjectToUI.enabled = true;
        //add the line
        lineRenderer_hitObjectToUI.startWidth = 0.001f;
        lineRenderer_hitObjectToUI.endWidth = 0.01f;
        //Set up a new V3 to hold the position of the UI element:
        Vector3 UI_element_transform = new Vector3(
            //x and y will attach to pivot points of the UI object set in the Inspector
            text_interactableObjUI.rectTransform.position.x,
            text_interactableObjUI.rectTransform.position.y,
            //Add 1.0f on z else we won't see the line
            1f
            );
        //No. of points on the line (start/end = 2)
        lineRenderer_hitObjectToUI.positionCount = 2;
        //start at position of the UI obj (rayInfo) and change it to World position
        lineRenderer_hitObjectToUI.SetPosition(0, cam.ScreenToWorldPoint(UI_element_transform));
        //second point is position of the object hit by the raycast in playerInteraction
        lineRenderer_hitObjectToUI.SetPosition(1, playerInteraction.rayCastHitObject_transform.position);
        /*********************************************************************
        Add the text
        -this needs to pull in pre stored text like a databasethat depends on
        the name of the hit object - playerInteraction.rayCastHitObject_name
        *********************************************************************/
Bug Killer

Bug Killer

Finally managed to quash those pesky bugs in player movement that had been riling me for the last week.

The secret (of course) I’ve read a thousand times – comment the code!!!

I’ve mentioned pseudo code previously, but it has really helped in this endeavour.

By splitting each area of the code into methods to work on and debug as I go, I’ve managed to iron out the bugs in the movement.

Now my code is really neat and well annotated, and it works, at least so far.

Much more to do but this has been a great step forward for me in terms of the way I organise my logic and refactor my code.

Next step is to integrate the look function into the script and hook that up to the crouch method.

The #glitch machine B46

The #glitch machine B46

The glitch machine #B46 – a new media installation production.

An interactive piece driven by PureData that included an Arduino driven ‘projector’ that drove projected content along with a ‘camera’ that captured live images and added them to the projection.

The content was glitched using Processing and displayed in random ‘chunks’ in a 3 x 3 grid pattern. Video output could be at ‘fullscreen’ or PiP at random.

Full documentation is available on a linked site here: https://glitchmachineb46.wordpress.com/

Direct links to elements of the project can be accessed below.

Index
Critical TheoryCritical Theory: Participation, Negation and Provenance
Critical Theory: Duchamp
Critical Theory: Dada
Critical Theory: The Situationist International
New Media – Interface Design (2012)New Media – Interface Design (2012) Shake, Roll and Outcome
New Media – Interface Design (2012) Rolling Through History
New Media – Interface Design (2012) Randomness, Glitch and Liminality
New Media – Interface Design (2012) Narrative
New Media – Interface Design (2012) Conclusion
Where Am I? – New Media Art (2012)
Critical Theory: Conclusions
The #glitch Machine (#B46)The #glitch Machine (#B46): Development
The #glitch Machine (#B46): Prototype at Chapter Arts 13th June 2012

The #glitch Machine (#B46): September 12th and 13th Installation
The #glitch Machine (#B46): Conclusions
Project Outline: January 2012
Pilot Project (2011)Pilot Project (2011) PART 1: QR Codes, Maps and the Tomato Branch.
Pilot Project (2011) PART 2: ReacTIVision, Storytelling and Multi-touch Surfaces
Pilot Project (2011) PART 3: Microsoft Kinect Sensor and OpenNI Framework
Pilot Project (2011) PART 4: Projection Mapping
Pilot Project (2011) Reflection
Pilot Project (2011) Summary
References
Film Database
Text Generator Content