Digital Thoughts in an Analogue World http://chillbackdigital.com Behind the Scenes at Chillback Digital. Wed, 31 Jan 2018 20:22:38 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.3 36432781 About Mr Risker. http://chillbackdigital.com/about-mr-risker/ http://chillbackdigital.com/about-mr-risker/#respond Wed, 31 Jan 2018 20:22:38 +0000 http://chillbackdigital.com/?p=1162 I realized that I did not make an “About me” page on the site, so I will add the information here and add the information later on it’s own separate page.

 

To those who are new to the site, or have checked out the posts from time to time, welcome!

I am Anthony Risker. Currently I work in the Technical support/Help Desk field, normally in call centers. Outside of that, I am an Independent game developer and music producer who posts Art and Assets, as well as Coding discussions when I learn new information in the C# coding language. I am proficient in the Unity Engine and has published Unity Assets for use in commercial games.

Also, I am part of a group that discusses Comic Book information and other Geek Culture goodness known as “Super Lame.” I am a personality on the YouTube page Hosting the “Marvel vs. DC Mondays” and “How Damaged is…” videos. I create the custom music, as well as edit the videos that I narrate in.

Many of my exploits are chronicled here, with projects found in the “Games Gallery.” More will be added soon so keep an eye out on the page.

Thank you for taking your time out to read this page, and hopefully you will follow along with my journey.

]]>
http://chillbackdigital.com/about-mr-risker/feed/ 0 1162
RPG update http://chillbackdigital.com/rpg-update/ http://chillbackdigital.com/rpg-update/#respond Wed, 31 Jan 2018 19:52:24 +0000 http://chillbackdigital.com/?p=1148 The RPG is still in the works, but it is getting smaller updates because I am relying less on 3D assets. This helps with me getting more of what I want as far as design, and will help me with the Theme that I was going for, which is a mixture of Medieval and Post-apocalyptic futuristic content.

 

I created an Asset Pack that will help with creating all of the necessary rooms that I need. They will be the backbone of the new prison dungeon, since the last one was less prison-like than I wanted it to be.

Here is a short demo of the asset, and below is a screenshot of the work in progress:

Click to view slideshow.

 

I will be adding more to the room, and in essence, the asset pack itself, soon. enjoy.

 

]]>
http://chillbackdigital.com/rpg-update/feed/ 0 1148
Happy New Year. http://chillbackdigital.com/happy-new-year/ http://chillbackdigital.com/happy-new-year/#respond Mon, 01 Jan 2018 05:36:14 +0000 http://chillbackdigital.com/?p=1141

Happy New Year !

Expect more in 2018 and beyond.

]]>
http://chillbackdigital.com/happy-new-year/feed/ 0 1141
If doctors were like coders — How Not To Code http://chillbackdigital.com/if-doctors-were-like-coders-how-not-to-code/ http://chillbackdigital.com/if-doctors-were-like-coders-how-not-to-code/#respond Tue, 21 Nov 2017 23:17:42 +0000 http://chillbackdigital.com/?p=1134 This is AMAZING! i love this post.
click the link for the full post.

Dr. Stark O. Verflo, M.D. Problem The patient has a broken leg.

via If doctors were like coders — How Not To Code

]]>
http://chillbackdigital.com/if-doctors-were-like-coders-how-not-to-code/feed/ 0 1134
Marvel Vs DC Mondays Returns http://chillbackdigital.com/marvel-vs-dc-mondays-returns/ http://chillbackdigital.com/marvel-vs-dc-mondays-returns/#respond Tue, 21 Nov 2017 00:15:41 +0000 http://chillbackdigital.com/?p=1132 After obtaining a laptop, I was finally able to edit a Marvel Vs DC Mondays episode. This episode is about how “Gotham’s” “Joker” Makes no sense:

]]>
http://chillbackdigital.com/marvel-vs-dc-mondays-returns/feed/ 0 1132
Coding Discussions with Mr. Risker: some Coding Definitions and Coding tips (UPDATE) http://chillbackdigital.com/coding-discussions-with-mr-risker-some-coding-definitions-and-coding-tips/ http://chillbackdigital.com/coding-discussions-with-mr-risker-some-coding-definitions-and-coding-tips/#comments Sat, 04 Nov 2017 21:31:43 +0000 http://chillbackdigital.com/?p=1120 As mentioned before, I am a total n00b when writing code. My experience comes from visual scripting, using programs like UDK, as well as editor extensions like Playmaker and Ork Framework. However, learning the terms on the extensions, as well as the experience I had writing in Actionscript 2.0 (AS2.0 henceforth) allows me to at least understand coding enough to manipulate things to my liking. I am using this information to learn to code and using this series as a way to teach others, as well as myself.

I am becoming more adept at coding thanks to these posts. I am thinking about Redoing “Bipeds Journey” AGAIN but switching the Coding from AS 2.0 to C#. I will be Proposing a game type to a group and If successful, this can be the cornerstone for the coding. as always, I will have someone with more experience check the code for efficiency.

This post will not be about that code, however. This post will be more about definitions and the structure itself.

Many of the things that I discuss here are on previous discussions but I wanted to put the information together for a one-stop shop before I add more information. Keep in mind that I am learning C# within Unity, so some of the libraries that exist will have differences.

As I mentioned before, in coding, words don’t have meaning until you give it meaning.

Library: A code library can be compared to to an actual library. Just like a library is a building full of books organized by genre, a code library is a package full or code organized by classes.  the code/class can be adopted into the code you are currently writing using the word “using.” the Unity Engine has its own “UnityEngine” library and Microsoft has the “XNA” Library

using UnityEngine;
using System.Collections;
using Microsoft.Xna.Framework;

this can be read as “I am using the information provided in the code [CodeName]”

“using” can be used on all sorts of code, adopting the information of the code name that you add:

using Door_Logic; (a code i created. see the discussion here)
using ORKFramework;
using CodeName;

Class Name: Within unity, the name of the Class is also the name of the Code. When Creating a C# code in Unity, for example ExampleCode would create a file called ExampleCode.cs and within the file would have “public class ExampleCode : Monodevelop”

public / private: adding public or private before the code changes the ability to edit the parameters within the code. for example, if i had a public variable named thisVariable and I entered “thisVariable == 1” – In the component window for the code you will see a paramater called thisVariable and a text field with “1” in it. this component can be changed within the window. if the previous variable was private instead, then the component would not appear by default. (however you can have private variables appear in unity’s component window in other ways, more on that by request)

function: a group of code that can be called upon when the function name is mentioned. it is normally written

[public or private][function type] FunctionName ([variabletype],[variablename])

a function type that is definitely used is void (explained below), but there are others.

after the function name is the “arguement” within the parenthesis you can add values and give the value a name. That value can be manipulated throughout the code later, more is explained here.

void: This is a type of function, one that is used frequently.  The function is one that does not return a value (thank you for the correction, Aaron)

here is a void function:

public void ThisFunction()

{

thisStatement = True;

}

followed by coding that will use that function:

if (thisVariable >=5)

{

ThisFunction();

}

 

basically , this would be read: “If the variable is greater than or equal to 5, run the function called ‘ThisFunction.'” the function will then change change the variable “thisStatemtent” to “true.”

if / then / else: If-Then statement was one of the first topics i discussed. for simplicity’s sale, If-then can be read: “If one thing happens, then something will happen in effect.” else adds more information that can be used if the original “if” is untrue. so..

If one thing happens, then something will happen, but if something else happens instead, a different effect will occur. There is an if then statement above, however to expand on that:

if (thisVariable >=5)

{

ThisFunction();

}

else if (thisVariable > 5)

{

thisStatement = false;

)

 

The biggest thing that one should know about coding is that All Characters Matter (no joke). One missing character will completely break the code. I may have mentioned this before, but my code for Biped’s Journey completely broke when i missed a semicolon at the end of the coding. Luckily programs like visual studio lets you know where to expect errors if you miss anything.

As mentioned before, I am not an expert and I can be wrong. However I believe that in teaching others, I also teach myself. Hopefully you learn something, and if you know more than I do, leave examples in the comments. i would be happy to discuss more on this.

 

]]>
http://chillbackdigital.com/coding-discussions-with-mr-risker-some-coding-definitions-and-coding-tips/feed/ 3 1120
Modular Walls Asset Pack http://chillbackdigital.com/modular-walls-asset-pack/ http://chillbackdigital.com/modular-walls-asset-pack/#respond Mon, 09 Oct 2017 21:12:37 +0000 http://chillbackdigital.com/?p=1117 The “Modular Walls Asset Pack” has reached version 1.

The Unity Submission is taking longer than expected, But until it is available there, it is available on my itch.io page. It is on sale for the first month, but will be 15 dollars. anyone who purchases will receive all updates when upon release. Please check it out.

]]>
http://chillbackdigital.com/modular-walls-asset-pack/feed/ 0 1117
Coding Discussions with Mr. Risker: Crash and Burn (or Purposely crashing the game to test out coding) http://chillbackdigital.com/coding-discussions-with-mr-risker-crash-and-burn-or-purposely-crashing-the-game-to-test-out-coding/ http://chillbackdigital.com/coding-discussions-with-mr-risker-crash-and-burn-or-purposely-crashing-the-game-to-test-out-coding/#respond Sun, 01 Oct 2017 18:31:42 +0000 http://chillbackdigital.com/?p=1103 As mentioned before, I am a total n00b when writing code. My experience comes from visual scripting, using programs like UDK, as well as editor extensions like Playmaker and Ork Framework. However, learning the terms on the extensions, as well as the experience I had writing in Actionscript 2.0 (AS2.0 henceforth) allows me to at least understand coding enough to manipulate things to my liking. I am using this information to learn to code and using this series as a way to teach others, as well as myself.

While I was using Visual Scripting, and before My mentor got into the habit of using Debug.Log to gauge the success of code, I was testing code differently… by purposely crashing the game! it was kinda stupid, but it was fun as a newbie having the power to crash systems.

here I will place an example of what I would have done, converting the visual scripting to C#, and I will add what I would do now instead. The new code is what I did before I added the code to make my door animate in the Modular Walls Asset Pack that I recently released. This also what I started doing to make sure that the code works at the base level before i add more.

As usual, you have to let the code know what libraries you are using:

using UnityEngine;
using System.Collections;

If you create the code within unity, it will automatically create the class for you, it also adds and Update function and a Start function:

public class Code_Name : Monobehavior

I then created a variable and gave it an initial behavior. in this case, since I was working with triggers i created a Boolean that will set as true or false depending on the trigger enter or exit. for the sake of this example the variable will be called “_exampleBool”

bool _exampleBool = false;

this is where things get interesting:

on the visual scripting side i would tell the nodes that if the game hits a specific trigger, then crash the game. for this I wanted the criteria to be that the trigger contacts the “Player” and the boolean is set to false. In unity C# it would look more like this

private void OnTriggerEnter(Collider collider)

{

if (collider.gameObject.tag == “Player” && _exampleBool == false)

{

Application.Quit();

}

}

Ok, here is the explanation. OnTriggerEnter is what you would use if you are expecting something to happen after an object crosses a trigger. in Unity’s case the “trigger” is a Collider component (caps matters) with “is trigger” selected. the words inside of parentesis is an “arguement” this allows extra functionality. in this case i gave the Collider the name of collider (again, caps matters)

for the if then statement, i told the game, “If the collider on a game object that has the tag of “Player” collides with the collider that has this code attached – AND the boolean of the variable exampleBool is still set to false…

CRASH THE GAME… or completely quit the application without warning.

This was fun, but you could not test the code multiple times without restarting the game over and over again. I will now change the coding to what I would do now.

private void OnTriggerEnter(Collider collider)

{

if (collider.gameObject.tag == “Player” && _exampleBool == false)

{

_exampleBool = true;

Debug.Log(“this collision worked”)

}

else if (collider.gameObject.tag == “Player” && _exampleBool == true)

{

Debug.LogWarning (“you have already collided once”);

}

}

for the if then statement, i told the game, “If the collider on a game object that has the tag of “Player” collides with the collider that has this code attached – AND the boolean of the variable exampleBool is still set to “false”, then change the Boolean to true and place a log in the console that says “this collision worked”

OR

if the previous conditions existed but the exampleBool was changed to “true” then create a warning message that states (“you have already collided once”)
NOTE: Alternatively “!= false” could be the same as = true and could be read as “does not equal false

I talked about Debug.Log, but I recently learned a little more and wanted to expand here. Debug.Log sends a message to the console in unity that will read off whatever you type. It has an icon of a chat box. Debug.LogWarning, on the other hand tells you the same thing but with a warning icon instead. Unity sometimes uses the warning when code has depreciated, or there is an issue, but not a big enough issue that will cause a game break.

I added the else statement because i wanted to not only test the collision, but test the variable change as well. after the if and else both work, I would then add more code and change the log if needed.

As mentioned before, I am not an expert and I can be wrong. However I believe that in teaching others, I also teach myself. Hopefully you learn something, and if you know more than I do, leave examples in the comments. i would be happy to discuss more on this.

]]>
http://chillbackdigital.com/coding-discussions-with-mr-risker-crash-and-burn-or-purposely-crashing-the-game-to-test-out-coding/feed/ 0 1103
Coding Discussions with Mr. Risker: collisions (AS 2.0 vs C#) http://chillbackdigital.com/coding-discussions-with-mr-risker-collisions-as-2-0-vs-c/ http://chillbackdigital.com/coding-discussions-with-mr-risker-collisions-as-2-0-vs-c/#respond Wed, 20 Sep 2017 23:37:39 +0000 http://chillbackdigital.com/?p=1097 As mentioned before, I am a total n00b when writing code. My experience comes from visual scripting, using programs like UDK, as well as editor extensions like Playmaker and Ork Framework. However, learning the terms on the extensions, as well as the experience I had writing in Actionscript 2.0 (AS2.0 henceforth) allows me to at least understand coding enough to manipulate things to my liking. I am using this information to learn to code and using this series as a way to teach others, as well as myself.

Behind the scenes, I do have a programmer read this, because i am a n00b that makes typos at times, and If there is a mistake afterwards I will fix it. So leave information in the comments to let me know how I am doing.

My Game: Biped’s Journey was created purely from if then statements. it works, but it isn’t too clean. Unfortunately, the school that I went to focused less on how to make the game worked, and focused more on how to make the game look and feel good.

I learned more, but i didn’t add it since ActionScript was slowly Dying.

The example that I will use is based on my collision detection code that was built in AS2.0 and using the same example modified for C#

ActionScript 2.0

Two things that you will notice when reading the AS coding.

ActionScript is Proprietary, so you will not notice any “using” statements because Adobe Flash (RIP) would have known the coding words that would be used.

ActionScript 2.0 was the last version that allowed coding on the items themselves. AS 3.0 was more conventional and did not allow coding on objects. (FUN FACT: i thought that coding on the object itself was “object-based coding.” let’s just say that It was one of the things that prevented me from getting a specific job.)

I will name the characters “player” and “enemy” this would need to be the clip names, since the code is going on the clip itself.

of course, you will need to give the player parameters, or the collision will not do anything. so i gave the player a heath value which was on the top of the code.

 

health = 100

 

in AS 2.0, that is all that was needed, because the code was on the player (this will also work on the enemy).

then i gave it an if / then statement

 

If (player(enemy)){

x -= 5;
health -= 10;

}

in other works if the player clip collides with the enemy clip, the player’s X co-ordinate will move backward 5 pixels and the game will take a value of 10 away from the stored health value. I added the X value in order to push the character back and remove the enemy’s ability to constantly collide and cause a quick game over.

on my game each I added a value to the if/then statement because i didn’t know about functions at the time. functions in AS 2.0 are similar to the void command in other languages. so instead of the above code i could have done this:

 

function smallDamage (){

x -= 5;
health -= 10;

}

and in full

 

health = 100

function smallDamage (){

x -= 5;
health -= 10;

}

If (player(enemy)){

smallDamage;

}

now AS knows that the top area is a variable, and that the function is public unless stated otherwise. a cleaner version would look like this

var health = 100

public function smallDamage

{

x -= 5;
health -= 10;

}

If (player(enemy))

{

smallDamage;

}

This worked, but not to my expectation. because the characters were created using 3DS Max the animation clips were PNG files and the clip used the picture edge as the collision, this caused the collisions to happen extremely early and hard to guess because the barrier is transparent.

A while back, I mentioned a good article describing hitboxes and hurtboxes in fighting games. and I used it in this game to fix the PNG issue. in each animation I created a red box named “hitbox” and a green one named “hurtbox in the respective movie clip. this changed the coding in a small way.

If (player.hitbox (enemy.hurtbox))

{

smallDamage;

}

In other works, if the player’s hitbox collides with the enemy’s hurtbox, cause a small amount of damage, or knock the character back 5 pixels and subtract 10 health.

Of course there is much more that can be done, but this is the basics of how the battle system worked in AS 2.0

now that you were hit with that much information, you may need a break. here’s the picture of the puppy again:

C# time!

for this we will be using unity3D, my current engine of choice. Also we will be making multiple pieces of code, or scripts. finally. we wll be sticking to 2D

I mentioned multiple scripts, because of how the scripts will be added. You add the scripts as a “component” in Unity. in this case, the Health-related information will go onto the player model and the Damage related information will go onto the weapon model. Keep in mind, that the models are called “gameObjects” in the system’s code.

with C #, and other conventional languages you will need to let VisualStudio (or Monodevelop, Notepad++, etc.) know that you are using Unity’s library:

using UnityEngine;
using System.Collections;

after that you would need to create a script for the Player’s health

public class Health : MonoBehavior {

public const int maxHealth = 100;
public int currentHealth = maxHealth;

}

Per the official Unity 3D documentation: “MonoBehaviour is the base class from which every Unity script derives. When you use C#, you must explicitly derive from MonoBehaviour.”

also according to the code, your maximum amount of health will be 100 percent, and when starting the game, your current health will be equal to your maximum health

when you add health to a game you may have to create an if/then statement that will monitor push the variable back down to 100 if it goes over, but that can be something for another blog.

what is good about C# is that you can reference and borrow code from other scripts. in this case, we will cause damage on one script and take the damage from the other script. back to the “Health” code

public void TakeDamage (int amount)
{
currentHealth -= amount;

Debug.Log (“Player is hit”);

}

after any void name you have parenthesis symbols. within the parenthesis you can add values, which can be replaced later. TakeDamage has the value of (int amount) which will be placed by whatever integer that is called upon when the code is activated. if nothing is there, it isn’t used.

Debug.Log is a command that only affects the “console” in the editor. this will help you with knowing if the code is working. I normally add a string of what should be happening. with SALSA, i created a log thats says, “the character should be smiling” when the “Happy” code is implemented. much more can be done, but as I mentioned before, I’m still a n00b.

for the Damage Script:

public class Damage : MonoBehaviour

{
void OnCollisionEnter2D(Collision2D collision)
{

var hit = collision.gameObject;
var health = hit.getComponent<Health>();

if (health != null && collision.gameObject.tag == “Enemy”)
{
health.TakeDamage (10);
}

}

 

I used pieces from the 2D collision tutorial, as well as a PlayerHealth and Bullet tutorial on the Unity Documentation in order to create this code. The 2D tutorial didn’t show a way to reference the player health. I am not at the Gamedev computer right now so i will test it later and check the results. however. this is what should happen if i am reading this correctly

in Unity, 2D characters use a component called Collision2D in order to read the collision properly.

OnCollisionEnter2D looks activates when you enter a Collision2D component, which you gave the name collision

to shorten the coding you add the variable of hit. hit will refer to collision.gameObject from now on. you also change add the variable health (case matters here) to refer to hit.getComponent<Health>();

without naming collision2D and adding variables beforehand, “health” would equal  Collision2D.gameObject.getComponent<Health>(); instead.

also getComponent is looking for the component “Health” on the gameObject that it collided with. when it finds health it activates TakeDamage. TakeDamage looks for the current health and subtracts buy the integer provided. which, in this case, is 10.

public void TakeDamage (10)
{
currentHealth -= 10;

Debug.Log (“Player is hit”);

}

 

As mentioned before, I am not an expert and I can be wrong. However I believe that in teaching others, I also teach myself. Hopefully you learn something, and if you know more than I do, leave examples in the comments. i would be happy to discuss more on this.

]]>
http://chillbackdigital.com/coding-discussions-with-mr-risker-collisions-as-2-0-vs-c/feed/ 0 1097
Latest “How Damaged is” Video http://chillbackdigital.com/latest-how-damaged-is-video/ http://chillbackdigital.com/latest-how-damaged-is-video/#respond Sun, 17 Sep 2017 23:48:18 +0000 http://chillbackdigital.com/?p=1092 Just a quick post in case you missed the last “How Damaged is…” video. the next video will be available 9/21/2017, and will be “How Damaged is the Totally Awesome Hulk”.

]]>
http://chillbackdigital.com/latest-how-damaged-is-video/feed/ 0 1092