joshuatecg
joshuatecg
Joshua from TECG
9 posts
Joshua from TooEazyCG.com
Don't wanna be here? Send us removal request.
joshuatecg · 7 months ago
Text
Progress Update #9 - Final Reflection
In this progress update, I will be not only reflecting upon my project from the last few months, but also discuss what I've learned, the benefits I've gained, the struggles I've had, and what my future plans are.
For any other future capstone students, I will be leaving these posts uploaded, along with uploading one to two more posts in the near and/or far future.
I will decide to continue working on this project to make it into something more than just a demo/prototype. For those interested, you may see any updates on my official website http://TooEazyCG.com/
Thank you for following along!
0 notes
joshuatecg · 7 months ago
Text
Tumblr media
Progress Update #8 - The final touches?
In this update, I'll be going over the finishing touches before the "demo's release". Not everything in this update will touch upon AI, as this post purely serves as a general project progress update.
First off, the demo now has a working title screen (still in development, may not be final demo look). There is no loading screen as of right now, however, upon pressing "Play", it boots the player straight into the level of the game, also presented with a dialogue box (starting dialogue messages are chosen at random and teaches the player what to do)
Tumblr media
Text messages are also present in the game, as upon picking up an item, such as a key, the game will tell you that you obtained the specific item.
Tumblr media
Walking sound effects, background ambience, and event sound effects have also been added to the game very easily by placing a sound effect component onto an empty in the scene.
Upon obtaining the game controller from the first two updates, not only does the TV light up now, but also, the game's background has been implemented and a post processing effect was added to give the illusion of the player being in the old television, revealing screenlines. The minigame's background was designed by me using PixilArt, a free online source for making 2D sprites, and the same programmed used to make the apple and bucket sprites.
Tumblr media
A little bit of code that I created after being guided by ChatGPT as to how I should go about creating different codes, I decided to use some of that knowledge for another task implemented, which correlates to a keypad found on one of the doors in the map. The code utilizes the bool system and randomness factors used to generate the correct code, only this time, I can't tell you guys how to find the passcode ;)
Tumblr media
hehe..
A Game Over sequence is also commenced upon not escaping the map within the 12 minute time limit the player is given. As time goes on, the player will have different dialogue boxes that reminds the player of time running out, as well as giving hints as to where to look for clues next. These dialogues are not given depending on player task progression, but rather, the message given is at random depending on the time remaining, found at the top left of the screen.
Last, but not least, I made some fine tweakings to the codes made from the last several progress updates, and I can't wait to share to everyone the prototype/demo of this game.
0 notes
joshuatecg · 7 months ago
Text
Tumblr media
Progress Update #7 - Combining everything I've learned from AI
This update post is a direct continuation from the previous post (update #6). In this next part of the game, I combine everything I've learned from the past instances of using ChatGPT to assist me, along with going in depth as to how and why using AI as a complimentary tool rather than a primary tool is not only more beneficial to the user, but also, the better alternative in general than using AI to do all the work.
Before I show everything I learned for this next segment of the game, first, I ask ChatGPT again to come up with how I can utilize two almost identical bathrooms in order to solve a puzzle to proceed to the next area. This was because I wanted to utilize two bathrooms that I modeled in the house with the same exact dimensions/size, but what to do... This is what the AI came up with:
Tumblr media Tumblr media
Hmmm... This seems like a lot to implement, yet a lot of unique ideas. Of course, I don't have to use all the ideas, let alone, I don't actually have to follow what the AI tells me to do, just like in every last scenerio, only using AI to help guide me into the right direction or to come up with an idea. I ultimately decide to utilize using a mirror in the bathroom, as suggested, but instead of using a crack or a light to figure a code out, I decide to out right use the reflection itself for the player to use in order to see numbers hidden in the reflection. The result became a bathroom with odd or hidden details in the reflection itself, that does not stay true to what is there outside the mirror.
Tumblr media
An example of this is upon aligning the camera correctly, the camera shows not only certain numbers hidden, but if looking at the correct angle, the mirror reveals a pattern or a shape of the room's elements only able to be made out in the reflection.
Now utilizing everything:
Now, what exactly to use with this said code that could be found in the mirror room. I figured that maybe upon entering the code somewhere, it can unlock a safe door which holds the key to access the console controller from the previous post (update #6). However, I didn't want to just make something like a combination lock, as I wanted to utilize more of the rooms in the house. After generating random prompts in the previously used AI source Stable Diffusion, one prompt labeled numbers near or on the doors of some of the rooms, which lead me to come up with the idea of having certain rooms represent a certain number. Each room would have a button in it that would do nothing upon pressing it at first. However, if these buttons were pressed in the correct order, it would power the safe door, resulting in it to open.
Tumblr media
Upon pressing the power button in room 1, the console gives the player a message saying that the first button pressed was incorrect and the order has restarted. This would result in nothing happening, but if the player can figure out what the code in the reflection means and to think they can use the room numbers to help solve it, it would allow them to open the safe, moving forward. However, how can we make this work? As in order for this to happen, the buttons must be pressed in the correct order, and pressing any incorrect button at any time should always restart the combination.
Below is a code I created with three different bools that represent if the correct buttons were pressed or not. If the last button was pressed in the correct order, it would unlock the safe door, changing its tag from "Safe Door" to "Safe Door Locked". This follows the concept used in the last progress task.
Tumblr media
In the code below, if the player interacts with the button called "button7", it would toggle the bool for the first button being pressed in order set to "True". In the next example, if button2 is pressed next, the bool for the second button pressed in the correct order is set to "True", while toggling off the first bool that was set to true (button7). This not only means that, the previous button cannot be pressed again, but if any other button other than the next correct one is pressed, it would reset the entire order, forcing the player to have to press the buttons in the correct order again from the beginning.
Tumblr media
How resetting the order would work: I created a method called RestartCombination() that would reset all the button bools to "false".
Tumblr media
It's great that I was able to use what I learned from the previous progress update for this one, but what about the other past examples?
Well earlier, I said that the mirror would cast numbers that the player can view at different angles to reveal a code. Not only would this be true, but for everytime the game starts, the numbers would stay the same (as of the development of this game so far), but the order in which they are revealed would also change, which would also affect the order the buttons found in their respective rooms would have to be pressed. But how?
Using the Vector3 and random X and Y functions, just as we learned to use them with our first minigame, I would use these functions to determine where these numbers would spawn in the bathroom reflections, with Vector3 representing the 3D space, and RandomX and RandomY would specify the axis coordinates and range. Unlike the minigame scripts, however, we will not be using Instantiate, as there would be no need to spawn any prefabs or "number objects".
Tumblr media
How I used AI as a complimentary tool this whole time:
Using AI like ChatGPT to guide me into how I should go about creating a code or what methods I should learn about is great, because when it comes to creating something specifically in the game engine, there are multiple ways to create a code and get it to all do the same thing. However, depending on what the code is for, you must make sure that it can be compatible with your other codes. When asking AI to guide you, you can learn from what it teaches you, which allows you to use that same knowledge and concepts for other future codes, just like how we've seen here. Whereas if we ask AI to outwrite create the code for us, and if another code needs to depend on the AI written code, they might not be compatible with each other due how the AI wrote each code, but not letting either be referable to each other.
For example, lets take the previous example of this post, when using buttons to be pressed at specific combinations in order to let a specific door to be opened. As you can see below, that is what I asked ChatGPT, to which the AI responded to use a series of bools to determine if the buttons were pressed in any specific order using the tracking of integer order.
Tumblr media Tumblr media
As you can see, the code presented by ChatGPT is already far different from the code that I came up with that I showed earlier in the post. As a matter of fact, this code does it in a more efficient way. However, the only issue is that ChatGPT recommends making the door visible and invisible depending on which is locked and unlocked (as seen in the second image). This is already a red flag, as this isn't not only what we want, but it wouldn't work with our code with opening doors normally. But "as a rookie game developer" and "rookie programmer", I wouldn't know this, of course.
However, assuming I, the rookie, would have already asked the AI to make normal doors open for the player before I moved on to combination locked doors, lets see if the code ChatGPT comes up with will work with the code given for the combination doors:
Tumblr media
This is no good... As you can see, not only is this different from the door codes I made shown from this and the previous update post, but this does not work alongside the combination door code it made for us. As a matter of fact, ChatGPT created two entirely different door systems, as one runs off of visibility based on bool status, while this one runs off of a Coroutine function, allowing an opening and closing method (animation not mentioned) to be executed.
Now, theoretically, I could run both codes and it should still work, right? Well not, because while one code specifies locked, the other one allows any doors to be opened no matter what, even if it's a locked door.
In my example, my code allows for doors to be opened with the object tag of "Door", and locked doors will be un-openable since they would have a "Locked Door" tag. However, I can adjust when a locked door can become an unlocked door depending on if a method in another code changes a specific door's tag, whether it be via bool or not. The below example is the code for my doors, plus a previous project update code utilizing this same system.
Tumblr media Tumblr media
Since I was able to learn from the AI, rather than having it do the work for me, I was able to learn how to create better ways to create multiple codes, along with making them work with each other, as we saw from this and especially the previous update.
0 notes
joshuatecg · 7 months ago
Text
Project Update #6 - Taking AI's advice, but saving it for later
In this update, there is no video, but rather, I discuss how I go about implementing a key system in Unity, with the assistance of AI giving me suggestions and without it writing any code for me or giving any straight answers.
However, what makes this example great is not only do I follow what AI suggests me to do, but I only actually implement parts of its thoughts throughout different parts of the game. The second half of this update will be continued into update #7.
The key system is one I have worked on before explaining how the minigame works. Grabbing the TV's gaming console allows the player to use the TV to play the game. This route follows same with the key system, as grabbing certain keys allows the player to unlock certain or multiple doors.
From a previous game development class back in High School at Hawaii Technology Academy, I vaguely remembered how to make a player's camera shoot a raycast, which allowed the player to interact with anything the raycast landed on, which is usually presented as a static cursor (or a crosshair) in the middle of the screen. However, I needed a way for players to be able to pick up keeps and unlock locked doors, as well as open already-unlocked doors. I came up with the idea to have the player's raycast allow the player to open door objects with the GameObject tag "Door" or "Unlocked Door". However, the problem was getting the player to grab keys in order for them to interact with "Locked Door" tagged objects. I asked ChatGPT, as per usual, what I could do, and this is what it suggested me:
Tumblr media
Using a bool to identify locked and unlocked doors was something I actually never thought of, and was also smart. However, there posed two problems with this suggested method by the AI.
Using bools to allow a player to interact with isLocked doors would not resolve the issue of allowing the player to grab a key specified for each door. A key would also need to have a script that could toggle the bool on and off, which can work, but then it leads to the next issue...
This would result in rewriting the same lines of code for each specific key, or it would result in having to make bools to identify, one, which key was picked up, two, bools that toggle the activeness of said key, and three, the individual doors. While this may work, it would be too much to implement, making it non-efficient. However, something else could work...
The work around
With the suggestion of being able to mark certain door bools as isLocked, it actually gave me a better idea. Instead of using three categories of bools for both the individual keys and doors, I can actually use the one category suggested by ChatGPT to determine if a key was picked up or not. It would result something with "hasDoorKeyA". If the player set the bool as true, it would change a specific doors tag from "LockedDoor" to "Door", allowing me to reuse my already-existing door opening code using the raycast. The result is a fusion of ChatGPT's idea and my already-made code.
Below is a code I made for the key inventory. These bools determine if the specific keys for each door have been picked up. If they have, they are set to "true", whereas all keys are set to "false" otherwise "not found" at the start of the game.
Tumblr media
Below is a second I made, but for the doors themselves, which allows the player to unlock locked doors depending on which key they have, based on if the "hasDoorKey?" bool(s) were set to true in the previous script. This uses the same suggestion made by ChatGPT, but rather than using the bools for the doors themselves, the bools are only used to determine which key is which. This prevents me, as previously explained, to create several different categories of bools in one of two scripts.
Tumblr media
If, for example as seen above, doorKeyA has been picked up by the player, it will be marked as "true", which will then change doorA's tag from a "LockedDoor" to a normal "Door" object.
The "door?" bools are never changed by any code or script, but rather, they are specified by the game editor panel to specify what door is marked as doorA or doorB.
Tumblr media
The below code is a code that I created which also sets each key visibility as invisible (or false) once the player's raycast has picked it up. This still utilizes the same bools mentioned previously that was suggested by the AI:
Tumblr media
In the next update, we will be talking about how we used not only this AI suggestion/concept, but also, another idea of AI into more existing codes for the game, and talk about how we learn from AI's help in assisting us with solving these issues, rather than having the AI do the work for us, and not allowing us to resolve future issues due to a lack of knowledge. Next update will be more informative as to my idea of using AI as a complimentary tool rather than a primary tool, and how we benefit from it.
0 notes
joshuatecg · 8 months ago
Text
Project Update #5 - Life update + extras
In this update, I talk about how my progress has been going with the insane 48-52 hours per week I work as a manager. While trying not to let this hinder my progress, I try to make the most of every hour. In the meantime, here are some extra development goodies that are not presented in the update video:
Tumblr media Tumblr media Tumblr media
Here are the current sprites that I created using Pixilart, an online browser editor. The tree sprite is the background used for the game when the player is playing the minigame through the TV's console. More about the minigame in the previous update.
Below is the general layout of the game's map, with the left image being the top floor, and the right image being the first floor.
Tumblr media
Above, you can see that the player(s) will spawn in one of two bedrooms to the very left on the top floor, and the staircases is marked to show where the transition to each floor is located,
The entire map was created by me using Blender, a free 3D software, which has recently become an official industry standard tool as of 2019.
Tumblr media
In the image, there isn't much, as it is just a wireframe shot of the entire map, with the indoor assets not included in the image.
0 notes
joshuatecg · 8 months ago
Text
Project Update #4 - Breaking Down the Code
Today, we'll be talking about how I've used AI's suggestions and attempt to guide me (without asking it to make code for me) to create a working minigame.
One problem with this minigame was that, with my very little coding knowledge and experience, I was having issues with getting the apples to fall from the top of the screen, so that the player can catch them. Since tutorials on YouTube for game designing don't necessarily teach you how to solve problems (rather they go with a "follow what I do" route), this was the perfect opportunity to ask AI for help. HOWEVER, we don't want to ask ChatGPT to make a code for us, as it would prove ourselves useless in this project. At the end of the day, we don't learn, grow, nor get better at things unless we try. Here, I asked ChatGPT: "How can I go about creating a code in Unity that makes 2D sprites fall from the top of the screen. But do not make a code for me". Here's the results:
Tumblr media Tumblr media
As a newbie to coding, I hadn't realized that I could just use the Rigidbody2D component's gravity value to determine the sprites' real time fall and fall speed. It's also a good idea that ChatGPT recommended me to destroy any sprites (apples) that fall down to prevent any clutter. All that's left is to figure out how to get the sprites to spawn a specific amount and to figure out the randomness factory of where they appear. The result is a simple method I created that destroys the apple prefab whenever leaving the camera's view:
Tumblr media
HOWEVER, the question is, HOW DO we even calculate the camera's view in the code, and how can we use this data to determine how and where the apples fall on screen?
ChatGPT gives us two different ideas on how to calculate placement of a prefab based on the camera's orthographic view, and how to initiate random positioning and cloning of a prefab. Those would be the "Camera.main" and the function "Instantiate".
Below is the prompt given to the AI and its answer for us:
Tumblr media
Camera.main (captures the data of the "main" camera's perspective. Following it up with the .orthographic will specifically call the data based on the camera's orthographic view and NOT the perspective view. With this, I'm able to calculate a range for where the apples spawn on the X axis using the Random.range function (minimum and maximum value) based on the Camera's orthographic view. However, in order to spawn the apples on a random X axis position only within the camera's orthographic view, I have to use thje Instantiate function.
Instantiate is meant to clone prefabs on all axis positions in the 3D world. With this, we can create a method that executes the Instantiate function according to our calculated data of the camera view. The result is this below, made by me:
Tumblr media Tumblr media
0 notes
joshuatecg · 9 months ago
Text
Project Update #3 - The Minigame Implementation idea
This is a continuation from progress update #1/2 and in this episode, we will be talking more about the game's minigame implementation.
After utilizing Stable Diffusion for some concept art and ChatGPT an idea for an escape room style game, I want the player to be able to activate a console on a TV after finding a way to power on the building. After completing the minigame, the player would be granted a hint, like a code, that would be used to progress further into the game in order to find a route to escape. However, I wanted the game to be short and only used with two buttons/keys, yet I wanted it to have the difficulty of enforced replayability. So I asked ChatGPT to give me an idea, in which it came up with a dodge and catch game.
Tumblr media Tumblr media
With this, I settled on making it more simple, which is to have the player only try to catch apples with a bucket, moving left and right with A and D keys. In the presented video above, I showcase how using the console controller (after powering on the TV) can transfer the player to the early version of the minigame.
In the next update, we will be touching upon the code itself for the minigame and how I correctly utilize the AI to help me create the minigame, without it making the code for me.
0 notes
joshuatecg · 9 months ago
Text
Project Update #1 & #2 - The beginnings of using AI
(Project Intercrease) The progress of the first two weeks, how I will and will not be utilizing AI for this project, and the idea.
Video link below:
youtube
0 notes
joshuatecg · 10 months ago
Text
Welcome to the blog of Project Intercrease, a Senior Capstone Project
In this video, I introduce my senior capstone project of using AI in the game industry.
Another senior capstone I enjoyed learning about was another student's, Cyrus Olivas, in how he went about how other artists can merge 2D art and 3D art in a hybrid when it comes to telling a story in any sort of medium like video games or animated films. He delivers his idea through a website in showcasing a "behind the scenes" of some of his works in how he incorporates 3D and 2D together.
Similarly, I plan to propose my idea through not only a fully working game, but a documentary on how I use AI as a complimentary tool in the development of the game. I may also use TooEazyCG.com (my website) to publish the documentary and show off more behind the scenes.
1 note · View note