I Wanna Community

Fangames => User-Made Creations => Engines => Topic started by: RegalPrime on August 02, 2014, 02:53:13 AM

Title: RegalPrime-UnityEngine v1.4.1 - 8-18-15
Post by: RegalPrime on August 02, 2014, 02:53:13 AM
Patch notes for this version

RegalPrime - UnityEngine v1.4.1 - 8-18-15 - Created in Unity 5.1.2f1 Personal

This engine includes the entire cat game and avoidance boss for reference on how things work (in the scenes folder)
The download is the entire project zipped up. This is so the editor / build settings would remain intact
The prefabs are all segmented into folders and are pretty much drag and drop (certain variables might have to be set on the object to make it work how you want it to)
Most of the scripts are commented on and have a small description on what they do (some are a bit weak in this regard though)

Basic video tutorial for this engine
(click to show/hide)

Questions and whatnot can be posted here or you can PM me.

https://unity3d.com/ - Download unity3d from here
https://unity3d.com/learn/tutorials/modules - Tutorials are here (if your not familiar with the editor and whatnot)

- GAME DOWNLOAD - I Wanna Help the Cat v1.3 - 1-23-15

The pixel version moves the guy via transforms and has a small collider buffer.
The physics version moves the guy via physics and has a fatter collider buffer.

- AVOIDANCE DOWNLOAD - Avoidance+Testing.zip - 3-11-15
Release of the avoidance boss I was working on.
Pretty much was created to test out the remake of an old script dealing with creation / manipulation / timing of GameObjects

Old Engine Versions
(click to show/hide)
Title: Re: TestGuy - Unity Fangame Engine
Post by: 13lueWolf on August 02, 2014, 02:02:22 PM
Hello. I think I know where this idea came from...  :Kappa:

I'm building my game on a Unity guy engine that I made earlier this year. I made it completely from scratch, not using a single pre-made controller, asset or prefab. It's quite different from a regular "guy game" and I'm sure you've seen it "somewhere" before, right? :Kappa:

I'm glad to see that people are learning from my attempts to develop better tools and content for guy games.

PS: I'd like to know what coding language you are using for this project of yours. I personally use C#.
PSS: If you need advice on some things, I'd be glad to help.

***Important Edit:

I played your game. I instantly noticed some key aspects that also affected me with my engine.

-The controls are sloppy/unresponsive. A guy game needs "pixel precise" controls, or else the player will not be able to do those precise jumps.

-The physics don't feel right. There's too much gravity. The Kid moves way too fast and does not stop when you let go of the button. (Hint: don't use Input.GetAxis("Horizontal") for direct horizontal button inputs. You can use it, but not the way you are using it right now.)

-The moving platforms are solid. (Intentional?) In a regular guy game you can jump up through them.

-If you're using an array or a list to keep all the music together, try not to do that. If the user creates a big game with many music files referenced in this single array, the editor might freeze, or even crash. (From experience, try not to put more than 3-5 large music file references in the same object.)
Title: Re: TestGuy - Unity Fangame Engine
Post by: RegalPrime on August 02, 2014, 04:38:10 PM
Actually I just came to Unity because I hated how gamemaker language works and decided to use a real programming language.
Using C# (c++ and java are my cores but its not like c# is much different). I think yours was the metroidvania type game which for general guy engine purposes wont help the "average" guy gamemaker make a game in unity. Hopefully trying to make this as noob friendly as possible (which kinda takes more code than I would like :p). Drag and drop, drag and drop, thats what they like right?? lol Unity is good for that.

Overall, the unresponsiveness is not an oversight its just not important at the moment. I got the values somewhat close and left it at that. I feel that after I put in vine climbing and stuff (and tie said animations in), I will need to add to the playercontroller anyways and at that point will clean up and rewrite some of the code (pretty messy atm). Some of my functions really need to be swaped out for coroutines too.

Solid platforms, ya, on my list of things todo.

My music controller is a singleton that only holds 1 clip / source. It has all of the function / coroutines for fade effects / loading / unloading and stuff. Putting / triggering another music controller will trigger reference checks and compare songs. Puts a new song on the controller and deletes the duplicate controller (fade effects and timing are public stuff on the prefab). Not having access to singletons and coroutines in gamemaker just makes my head spin lol. So at this point, no more than 1 song is in memory at a time.
Not sure if in the future I might need a different coroutines that uses effects and 2 songs (which in case I will have to put another clip on the controller), but I will deal with that when something requires it (step by step, no use putting in stuff that isnt needed atm)

Took a break from really adding to the controllers atm (it just not fun because you dont see your game grow) and adding well built prefabs. Vines / jump through platforms / wall vine things will prob be next. I think I made these few screens in a few minutes (prefabs too OP).

Its been a couple of weeks that I've been working on this project and I figured it was time to post here and get some basic feedback.
I figure people might get more interested in it when they see a project grow and more stuff is added.
Title: Re: TestGuy - Unity Fangame Engine
Post by: OhNoezEinPandy on August 02, 2014, 04:44:48 PM
I played shortly through your demo stages and noticed that the kid has some kind of acceleration. I know that the physics are not a priority atm but your game simply won't work if you cannot do precise movement.

Otherwise these slow-mo triggers are really cool! Keep up the work!
Title: Re: TestGuy - Unity Fangame Engine
Post by: patrickgh3 on August 02, 2014, 06:45:32 PM
I think this was a fun idea, recreating the standard iwbtg game physics and other elements in Unity. Sounds like you had fun working on it. But I think that no matter what, even with a lot of tweaking, there would always be noticeable deficiencies when compared to the standard Game Maker base ("engine") that everyone uses. Since iwbtg games have been around for a while, and the community has really explored and gotten used to the physics and other things in the Game Maker base, even a polished Unity game would simply not be up to par by default. However I totally encourage you to keep working on this project if you're having fun and learning. I'll definitely check out your progress. As a side note, I've been using Unity myself for ~6 months now and I love it.

Actually I just came to Unity because I hated how gamemaker language works and decided to use a real programming language.
Using C# (c++ and java are my cores but its not like c# is much different). I think yours was the metroidvania type game which for general guy engine purposes wont help the "average" guy gamemaker make a game in unity. Hopefully trying to make this as noob friendly as possible (which kinda takes more code than I would like :p). Drag and drop, drag and drop, thats what they like right?? lol Unity is good for that.

This made me kind of upset. I can respect your decision to use Unity over Game Maker, because you might prefer the way Unity does some things to the way GM does them. But you can't call GM "not a real programming language." I don't think that's a valid question to ask of either GM or Unity. Both GM and Unity are game engines of sorts, and take care of most aspects of the game pipeline. They both have extensive GUI editors. They both use script based programming. They're both well respected and are good at what they do.

As a side note, sometime last year I spent a little time trying to recreate the basic iwbtg physics, etc. in Haxe using HaxePunk (https://haxepunk.com/), since I'm quite familiar with it, and I thought it would be better than programming in GM 8.1. I gave up because even though the physics were pretty close, the differences were noticeable, and I concluded it really wasn't worth it to improve them, since they would never be perfect (valign, jump cancelling would be very tedious to do, and probably impossible to get exactly right).
Title: Re: TestGuy - Unity Fangame Engine
Post by: 13lueWolf on August 03, 2014, 11:59:55 AM
But I think that no matter what, even with a lot of tweaking, there would always be noticeable deficiencies when compared to the standard Game Maker base ("engine") that everyone uses.

...since they would never be perfect (valign, jump cancelling would be very tedious to do, and probably impossible to get exactly right).

My game is an example that the physics can be exactly the way they are in GM, or even BETTER than in GM. If you've never seen my game, that's fine because it's not released to the public yet. But I can assure you that you CAN have pixel precise and perfect physics like the default guy game engines in GameMaker. My physics and controls are VERY polished, so being a veteran of the guy game world, I can confirm that there are no differences between my engine's physics and a GM engine's physics.

Jump cancelling is not a feature of the GM engine. It is a flaw. Do not confuse the two.
Title: Re: TestGuy - Unity Fangame Engine
Post by: RegalPrime on August 03, 2014, 05:08:48 PM
Maybe  I was a bit overzealous calling GM not a real programming language, but when you learn to program in certain languages and you goto GM and dont have all of those tools, it gets frustrating.

Just to reiterate, the physics on the guy are literally just that. I am using forces to move the guy and not pixel based moments atm.
I created the guy prefab near the beginning of my experience with unity and compared to items I recently put in, the guy prefab needs to be rewritten (only been a few weeks into this project and Im learning stuff everyday).

13lueWolf - are you using ingame unity 2D physics for the guy or did you take the route that GM does and have the object create its own gravity (ie you calculate your own gravity every fixed update)? Fiddling around with the GM values that are standard (yuuutuu) and converting them to unity values offers weird results (maybe I have some drag or other things activated that are messing with the physics as well i dunno).

You got me thinking about it and I might go ahead and rework my guy prefab from scratch and get that to be legit.
Overall this is a pretty fun project.
Title: Re: TestGuy - Unity Fangame Engine
Post by: Kyir on August 03, 2014, 07:33:14 PM
People obsess too much over perfectly replicating the standard physics when they're doing new things. If someone makes a fun game, it shouldn't matter that much. That said, less sliding feelings while moving would probably be better for any platformer
Title: Re: TestGuy - Unity Fangame Engine
Post by: 13lueWolf on August 03, 2014, 11:00:52 PM

13lueWolf - are you using ingame unity 2D physics for the guy or did you take the route that GM does and have the object create its own gravity (ie you calculate your own gravity every fixed update)? Fiddling around with the GM values that are standard (yuuutuu) and converting them to unity values offers weird results (maybe I have some drag or other things activated that are messing with the physics as well i dunno).

You got me thinking about it and I might go ahead and rework my guy prefab from scratch and get that to be legit.
Overall this is a pretty fun project.

I'm using the Unity built-in gravity, but at a modified value, and modified fixed update. I also limit the vertical falling speed. Not the upwards vertical speed though.

The horizontal movement is a complex expression line to get the directional input to instantly reach the predefined default horizontal speed. This also accounts for changes to the necessary speed addition/subtraction to stay at the desired speed when going up/down slopes or hitting another rigidbody2D. I don't need to limit the speed or worry about it being accelerated too much or too slowly, because the code keeps the character's velocity constant dynamically.

My method is pretty polished and I've tested many other methods and I found this one to work perfectly. But I'm sure you can come up with something good on your own. Keep working on it and make something great.
Title: Re: TestGuy - Unity Fangame Engine
Post by: ace11575x on August 05, 2014, 02:08:02 PM
I was just wondering if you were going to release the engine to others? I think you have a decent base for a guy engine it does need some love with the physics. I use C# daily at work and have been working on some small game projects on the side. I would like to get a hold of the engine I think that I could fix some of the issues others are having with the engine in general.
Title: Re: TestGuy - Unity Fangame Engine
Post by: RegalPrime on August 08, 2014, 02:53:33 PM
New update today - Guy took off his skates and put on his climbing shoes :p
- Guy is more controllable now and slower (not even trying for 100% replication yet, just slowly getting it close). I modified the controller a bit but it still needs complete rewriting.
- Added Jumpthrough Platforms - Able to fall through via down arrow if prefab variable is set (platform room updated)
- Added Climbable Objects - Anything with tag "climbable" is ummm climbable. Vines / Ladders are prefabbed (spinny things lol have fun /spin)
- Added climbing animations and updated the animator (hopefully I got the logic correct)
- Basic camera functions added (just the basics, no fancy stuff atm)
- Recreated level building prefabs and redid all the maps so they look better and consistant
- Trap trigger script enhanced (added start delay + delay between individual objects)
- Various other scripting

First post is updated with new download link.
Title: Re: TestGuy - Unity Fangame Engine - 8-15-2014 Update
Post by: RegalPrime on August 19, 2014, 02:05:56 AM
After last weeks update I decided to work on making the guy move more properly. I started by emulating the way gamemaker does it and needless to say there was a few major issues in doing this in a physics based engine. On sunday I finally scrapped that thought process and went back to physics based movements. After rewriting some of the code I finally came to the realization on why I was having problems before. I believe I have emulated pixel perfect movements. Tonight I ran some data to make sure things are actually coming out as expected.

Luckily, Unity allows for frame by frame diagnosis.

This data was taken from a part of a jump cycle.
The first column is the position of the character in Unity Units.
The second column is the vertical velocity calculated from the first column
- The data is multiplied by 100 because in unity when you import sprites the default conversion is 1 Unit = 100 Pixels
The third column is the gravity force calculated on the 2nd column

As you can see it hits the standard of 0.4 pixels per frame
(click to show/hide)

Data taken from a high fall
Same format as above
As you can see fall velocity is limited at the correct fall speed
(click to show/hide)

Staggered block data
This data is proving pixel alignment
A stair of blocks was created and each block was humped by the guy.
Second column is the X value position of the guy when he hit that blocks side
Third column is the number of pixels he traversed between the blocks (of course it should be 32 but just made sure)

After humping each of the blocks I moved as close to the 0 X-axis as I could
Bottom part first column is as close as I could get to 0 in Unity units
2nd column is converted to pixels.
(click to show/hide)
Title: Re: TestGuy - Unity Fangame Engine - Pixel Perfect dream is real
Post by: RegalPrime on August 22, 2014, 05:01:11 PM
Feedback on how the guys controls feel after this update would be greatly appreciated.
Also, I need ideas of other things I can add to the engine. My list of "things to do" is shrinking and its not always fun to program one thing for an extended period of time.

-- TestGuy UnityEngine 1.03 --
- Rewrote most of the 2D controller, solved the problem, and according to initial data, the controls are now pixel perfect.
- Time / Water / Climbing fixed due to changes in 2D controller
- Music / Sound Effects volume can be changed in the main screen and are saved to "GameSettings.dat" (located in base game directory)
- Audio routed through the AudioController is effected by users preferences (hopefully all effects were changed)
- Added various script functions that will hopefully be useful later
- A bug fix relating to rapidchanging of songs
+1 Scene - Simple spike room to test the guys new controls.

Seems Unity is going to release a GUI editor in their next update. Wont have to code GUI objects anymore (they were kinda a pain).
Will be pretty easy to make a good looking save / load screen.
Title: Re: Unity Fangame Engine - 8-29-2014 - Dynamic objects script
Post by: RegalPrime on August 29, 2014, 05:32:15 PM
I spent this entire week creating a script that allows for creation of dynamic objects / effects
Initially this was meant to ease the creation of a avoidance type situations (like a boss) but many of the functions can be used to create other basic effects without the need to dig up the complicated code each time you create a new script.

Most of the functions in the script are below (if your into what is actually in the script)
(click to show/hide)

Using the new script, these are the commands I used in creation of the avoidance screen (I attached this script to 2 empty objects on the scene).
The variable TEST is just a location in the scene. The first variable in each call is the time delay of the action.
Its pretty simple to see what is supposed to happen at each step. This is the point of this weeks script.
(click to show/hide)
Title: Re: Unity Fangame Engine - 9-XX-14 - Weekly Patch Delay
Post by: RegalPrime on September 08, 2014, 03:59:43 AM
So that script from last week, ya, Im still working on it and its bigger and stronger than before.
I feel there is no real reason for me to upload the new "game" because it would look much the same.
Also on the same note, I will be gone this week for 5+ days (away from my computer :/). Im not sure what I can get done, but Im hoping to rework all of the screens soon to be more legit, like a game. Maybe the release 2 weeks from now that will be a reality.

- Minipatch notes
Added a nice color changing of the projectiles. Nice smooth transitions too, not the swap X object that is a color with Y object of another color. Of course unity did not like the default red apple because it tints and color change the existing color (was like shades of crap and brownish crap). Made a simple White Apple and colors look wonderful.

Simplified coroutines / combined some of them / made functions to call the coroutines / overloaded the functions for user simplicity.
Made a 2nd script that uses the first script function calls to create multiple of these objects and manipulate them on the screen.
It worked out well, simple and clean.

This is a simple scene I made (just for testing some things). If your into this type of thing the copy / paste code is below
Multiple objects being manipulated independently based on time.
Also, since this object in created in a function call, it too can be called on a timer using the "invoke" command (a simple way to subdivide animations).
(click to show/hide)

hmmm Maybe a new screenshot - I think I can handle that
Running the game through the editor - Those pretty shapes :p
(click to show/hide)
Title: Re: Unity Fangame Engine - 9-19-14 - Legit Cat Boss
Post by: RegalPrime on September 19, 2014, 06:27:31 PM
- Game Uploaded and main post updated -

Wasnt sure how much I could get done with being gone, but after I started working on a boss, I found myself pushing hard to get it finished for todays release. This boss uses the object script Ive been working on for the past 2+ weeks and the HP module from a few weeks before that. Its a pretty legit boss, not that difficult (i guess I know how everything works so its a bit easier for me), but it shows that many of my scripts are working well and are useful.

Overall the creation of the boss went pretty smoothly. Some of the combination scripts I recently threw together need a bit more work.
- The boss could easily be a single animated object + any number of projectiles, but I wanted to stick 100% with using my object script
Screenshot of the boss
(click to show/hide)

Boss Info - This is how the boss was built and acts and thus contains spoilers.
Id prefer you test out the boss before reading what is below, but I know some are not interested in downloading a work in progress every week.
(click to show/hide)
Title: Re: Unity Fangame Engine - 9-27-14 - Generic Monster AI Scripting
Post by: RegalPrime on September 27, 2014, 02:11:52 AM
Just a post update this week + a screenshot
The time it takes to bundle it up and make sure the game works every week takes some time, and I feel it wont hurt too many feelings if they cant download this every week (especially when the new content isnt very visible in game).

I felt it was time to make a screen via ripping the sprites from another game to see how it goes.
I took the spinny room from castlevania 4.
(click to show/hide)

It worked out fine but it needed monsters so I found a good castlevania sprite sheets and worked on creating simple prefabs + animation controllers for a few monsters (you can see which ones i made in the above screenshot in the lower unity window). Added in random spawn Medusa heads to the map for the section in the middle and it looks nice. Upon ripping the medusa stone shot animation, I added a bit to the GUY script to allow for easier addition of other types of shots.

After making a few monsters prefabs I made a simple AI for one (hopper monster), and then upon doing the next monster I found myself making a separate AI for it. It kind of felt redundant doing this for every monster every time so I started working on a generic monster AI that can be just added to any monster and have variables to set how they would act (more complicated monsters, like bosses, would need made-from-scratch scripts).

I figure I would need a melee type attacker script / shooter type script / and a flyer type script to deal with the basic types of monsters. All of these are tied into a generic animation controller so that the correct animations are selected automatically when the monster does a certain action.

Right now Im working on the basic melee type and have patrolling / move twords player / leap / attack at player all based on AoE range (all have variables that can be set in the editor to tell when / how fast / distance). This still needs a lot of work, but it should be useful later so I wont have to make so many similar scripts for every monster added.

Made a new walking animation for the pixel cat, kinda looks crappy because I did it pixel by pixel myself but it got the job done. Put my generic AI script on it and now i have a crazy cat following me everywhere :p I guess disabling the attack part of the AI makes it good for NPCs as well.
Title: Re: Unity Fangame Engine - 10-5-14 - Monster AI Scripting - Week 2
Post by: RegalPrime on October 05, 2014, 03:17:38 AM
Was really hoping to get a release update for this week going, but completing all the AI scripts just didnt happen.
Well, I mean they did get finished in the rough sense but I had no time to do some hardcore testing on how well it would hold up in different circumstances. Overall, the air based AI took a bit longer than the ground AI and I ran out of time.

A general overview of what the AI does and the variables that are editable on the gameobject
AttackRadius - Anything less than this distance the scripted object will attack the player. Default attack is a simple "leap at player" action.
PassiveRadius - Anything more than this distance the scripted object will enter in a passive state and start patrolling.
Any gap between the 2 radii causes the object to move towards the player.
Setting these variables would allow for passive mobs / patrolling mobs / following mobs / aggressive mobs / etc just by setting the different radius (dont want it to attack, then set attack radius to 0 / etc).

Has the option to jump up blocks if moving and one is in the way
MoveSpeed - The speed at which the object will move when trying to reach the player

PatrolArea - The distance on either side of the object it will patrol. If set to 0, the object will only turn around when it hits the wall or a drop off is in front of it
PatrolSpeed - The speed of the patroling object. If set to 0, the object will enter an idle state.

Default attack action variables
JumpSpeed - Speed of the jumping object
JumpPower - Jump power of the object
DelayBetweenJumps - The time between jumps

Shooting attack based variables
ShootWhenAggro - Selecting this will cause the object to shoot a preloaded gameobject forward when in attack range (this replaces the leap-at attack action)
ShootAtPlayer - Setting this to true, will shoot the projectiles at the player when in range
ShotSpeed - Speed of the shot
NumberOfShots - Number of shots per set
ShotDelay - Delay between each shot
ReloadDelay - Delay between each set of shots
ShotConstraint - The monster will only shoot when the player is within this constraint (think of it as being in the guns sight range). Being outside of it will cause the monster to move at the player.

The flying monster AI needed to be done in a separate script and took longer than I hoped.
The flying AI is similar to that of the ground based, but movement / dive attack is handled differently. Most of the other code had to be redone to deal with a flying based object.
The generic variables are mostly the same as the ground based AI and not worth listing again.

Finally figured how to reuse the generic animation controller I created (fleshed that out this week also, and I hope the logic holds up). Was able to RIP a sprite, create the different states (idle / attack / movement animations) and plug it into the generic animation controller and the script just made it work. No hassle / no mess. Going to have to go through the other sprites I made previously and update them. It is a lot easier to make fully functioning sprites now.

More coding to do, but I got a lot done.
If I get the AI cleaned up this week, I will try to not start something new and work on making a few maps to showcase the new monster AI types.
Title: Re: Unity Fangame Engine - 10-10-14 - New Version 1.06 - AI and Stuff
Post by: RegalPrime on October 10, 2014, 06:18:28 PM
1.06 Uploaded and main post updated
If you have some time, feel free to download and try out this new version.

Finally put the finishing touches on the ground / flying AI and worked making a few types of monsters prefabs.
- I grabbed a character who had flipping / shooting / walking sprites and used him for the ground AI test (from Majyuuou King of Demons)
- Added a death sprite for the kitty
- Added the Raven from castlevania 4 to use for the flying AI test

Since I had to make a new room to showcase the AI objects, I decided to grab a super mario world sprite sheet and use that (it looks pretty nice and was easy to add). I thought it would be hard to put all the AI monsters in the same scene and I didnt want to make a HUGE room to fit them all in either. I ended up making buttons that spawn the particular monster in the center of the scene when clicked. The 8 clickable options are shown on the screenshot below.

Screenshot of the new AI room
(click to show/hide)

I also added in the Castlevania 4 spinny room I created last week into the game (see previous weeks screenshot)

- Reordered a few scenes
- Im sure there was some other scripting stuff that came up and was changed
Title: Re: Unity Fangame Engine - 10-10-14 - New Version 1.06 - AI and Stuff
Post by: JGBMaster on October 11, 2014, 07:11:49 AM
Sick work you're making here, man! :D
Looking forward to see more of this engine :3
Title: Re: Unity Fangame Engine - 10-18-14 - Version 1.06 - Tons of little things
Post by: RegalPrime on October 19, 2014, 12:07:18 AM
Not going to release an updated game this week even though things look different.
Working on making all new maps and dont want to release it with only one completed (screenshot below).

Started cleaning up my list of smaller things to do since I got the AI script done last week.

Added in a game timer and death counter (game timer is only in seconds, no use calculating time every frame and I can change to minutes / hours / days during display later).
Worked on cleaning up the Gamecontroller script to incorporate the new items.
I wasnt going to mess with the file loading screen but I needed to add in death / game time, so I changed a few things.
Changed the File Selection screen to show deaths / timer. The labels and buttons scale based on screen size.
Was hoping the new GUI system would be released from Unity soon, but I shall wait some more.

Secret string added to the Gamecontroller to differentiate between save game files.
- Im not sure if this was the correct way to do this, but previously any save file would work no matter what I would do in the game (ie extremely generic save file)
- Now, there is a secret string added to the gamecontroller that it must match in order to load the data from a saved file.

Added to the Area modifier script to deal with movement speed change and other variables regarding triggering (move speed / jump / gravity / max fall speed / etc)
Searching around and I think I found the settings for water and I added those to the area modifier - water prefab.

Added code to allow for enabling / disabling of autofire.

Updated / redid the Objects via waypont script (used in moving platforms)
All of the platforms prefabs (both jumpthrough and sticky) have been updated and the triggers are more exact.

Added spawn bouncy object to the Object spawner script.

Warp in room script updated
- Warp in room changed to give the ability to keep the offset of enter / exit to allow this prefab to be used in screen-wrapping
- Previously, when the player entered the trigger they were spawned to the exact exit point no matter the point of entry.

Added the spike treadmill script / prefab (you know that, spike goes up / moves across the ground / then goes back into the ground thing)
- Has settings for speed / spike spawn rate. Starting point / Ending point are empty gameobject that can be placed anywhere.
- Can twist / spin the prefab any direction and it will work (ie, spikes going along the ground vs going up the wall is nothing more than rotating the parent object)
- Has the option for the movements to be based off of global / local transforms (global would make it so that the spikes always are facing up while local would be facing up relative to the parent objects current rotations).

Redid scene 3 that showcased the warp in room prefab (Screenshot below)
Those ninja star things spin (bottom middle ones spin along the y-axis and the right set spin along the z-axis)
(click to show/hide)

Previously, each of my scenes showcased a prefab in the simplest of ways. Redoing the room caused me to find an oversight in how one of my prefab was scripted.
So it seems I will be redoing all of these simple crappy rooms and making them a lot more complicated / harder.
My goal is to end up with around 20 screens of medium difficulty
- maybe 2 screen per important prefab
- So 2 dealing with the warp in room prefab, 2 dealing with water, 2 dealing with movespeed / jump trigger, 2 with traps, etc (just to test how they hold up)
- Im sure I might need more screens if the prefab is more complex

Add in the boss I made before and I guess I can release my first game with this engine.

It has been going through my mind that I might possibly somewhat kinda maybe think about getting close to doing a limited release of the engine to those who are interested.
Have been thinking about what I really need to finish up on in the engine. Much of the major items are complete.
Making a game myself using what I have built will give me a better idea.
- Even this week I have started going through and reordered / renamed scripts / prefabs to be more consistent. I also need to comment the scripts better.
- Also making a general use guide will take a bit of time as well (how the engine is setup overall).
- Im not in a hurry, but these are some things going through my mind.
Title: Re: Unity Fangame Engine - 10-28-14 - Version 1.06 - 1/2+ of new game done
Post by: RegalPrime on October 28, 2014, 03:19:44 AM
Having fun working on the new game except when I hit writers block and cant think of how to design a screen :/
Other than that, doing some lighter scripting. A few objects didnt interact well with each other and I will have to deal with it sometime. I think I have the solution, but you never know if changing one logic will break something else later.

Spike treadmill updated more. Idea is still the same but it spawns the objects using their collider / hitbox (instead of the sprite size) when calculating the spawn offsets. This also makes it easier to place the prefab. Snap the prefab to the ground or ceiling and snap the start / end objects along the ground and the objects spawn perfectly.

Spike chopper script created. Its a simple script that makes an object slam to the ground then go back up. Has options for start delay / up-down speed / etc etc stuff

Started making object spawner script scripts (ie using my super script from a while ago to make secondary scripts extremely easily)
Color change script - Simple script that changes the color randomly of an object it is attached to. Also has the option to set the size of a color vector and set colors to spawn through (instead of randomly picking colors, you can configure it to loop through a specific set of colors. All of this is simply done through the editor). Also can use this vector and change the alpha to make a fade / unfade effect

I had quite a few oneshot spawners in my object spawner script and I created another script + prefab to use them more easily. The short of it is, if you need some object to spawn In a direction / at the player / a wavy line / a random spray / a directional spray / circle burst / single object follower / single object bouncy, you just drop this object into the editor, set the variables, and it works. Can have X sets or just constant spawns.

Reverse gravity (flip character) was added. Was pretty easy to put this in surprisingly. Has a weird interaction when you manipulate the guys stats (ie low gravity / +-speed / jump speed). I think I know the problem and put it on my list but for now, those wont be on the same screen lol.

I updated my time change script. Has options to increase / decrease the game speed over X time. Also has the option to maintain relative speed (ie even if the world speeds / slows, the character will still move the same). I just made a pretty crazy screen using this script, was really simple yet fun.

Im at ~15 Rooms created in the game so far. Not really sure how many more to go. My plan is to keep going until I run out of scripts / prefab (each different type of prefab will get a few screens). Kinda funny the more levels I make, I end up rewriting or adding parts to the script or making totally different one I wasn't planning on. Guess its a good thing though.

Screenshot ... maybe later.
Title: Re: Unity Fangame Engine - 11-8-14 - Game so close
Post by: RegalPrime on November 08, 2014, 03:02:02 AM
Hmm I feel bad not posting an update for so long. Ive been adding levels and doing minor scripting (a few oddities poped up)
Finally hit the point I figured I need to make my levels look better and I added lightning and shading. Then I put in backgrounds because I was sick of looking at that blue background.
Picked out some music that hopefully isnt awful :p (5 songs)

I think I hit the point where I dont need to showcase any new prefabs and Im at 36 real screens (there are other transition / simple screens that aren't worth counting. Unity says 44 screens total in the build). Sooo, where does that leave things? I am testing right now to deal with any big issues that may arise. Hopefully one of these playthroughs my OCD wont catch something. I can pass the game in ~40mins, so I suppose it would take others longer since they dont know the inner workings of the game.

After I get things settled, I will post the game here for anybody to test. I didn't go overboard on difficulty and hopefully it is "balanced."
This was more of a test on how the engine is working and it brought up a lot of oversight in certain scripts.

After that, the game will be released, then back to engine programming (and hopefully its release sometime thereafter).

Screenshot time. At the start of the week I updated the look of every screen.
Here is a 3xView of the transition for a climbing screen I did.
First screen was simple drag and drop stuff (typical basic guy screen)
Second, is the alternate sprites
Third is the shading / lighting (ya, you can pick up those torches).
(click to show/hide)

Game released
See first post for more information.
Title: Re: Unity Fangame Engine - 11-10-14 - I Wanna Help the Cat - Pre-Release
Post by: Zurai on November 11, 2014, 12:53:36 PM
Im really interested on how this works out, loading the game right now and I will probably stream it a bit in a few hours. Feel free to tune in or check the VOD later if you want to
see someone playing through it :FrankerZ:
Title: Re: Unity Fangame Engine - 11-10-14 - I Wanna Help the Cat - Pre-Release
Post by: BBF on November 11, 2014, 03:51:57 PM
I played it for a little bit and have to say...the movement feels REALLY weird. I thought it would control more like Boshy (with acceleration and stuff) but I even struggled to get past the first couple of screens.

The water section felt fine, except for the movement I just could not get used to.

The Torch effect is nice, not sure how I like the grabbing mechanic, not a fan of how they are implemented gameplay wise.
Title: Re: Unity Fangame Engine - 11-12-14 - Information
Post by: RegalPrime on November 12, 2014, 02:42:27 AM
Finished watching the video, thanks for all your comments.
I will comment on what you mentioned during the playthrough.

Mashing bullets doesn't work - There is a delay on fire rate set to every 0.1s. Instead of limiting the bullets on screen I just limited the fire rate.
That torch, was added in near the end and it seems making the pickup / drop button the same as shoot was not too bright :p
Because of it being the same button, there is a 1s delay between being able to pickup and drop it, which adds more confusion.

Guy sometimes off the ground a pixel, is probably an issue with me stinking on creating the ground hitboxes, but I will keep an eye out to make sure it isn't anything more.

Mentioned that water might making the character fall slightly slower. Right the only difference between normal stats and water stats is that the fall speed is capped at -2 instead of -9. I had a hard time finding stats and information about how certain objects effect the player. For the most part I think I collected from enough random posts and sources, but its possible they may have been wrong.

Boss was laggy. Yep, at the moment each object is being created and destroyed X seconds after. For simple things this is ok, but massive amounts of object it can be laggy.
There is a thing called Object Pooling that reuses the objects instead of creating and destroying them all the time. This is extremely more efficient but I haven't coded it into the object spawner script yet. On my list of things to do.

Now onto the more complex stuff.
Right now the character is controlled by velocity / rigidbody / collider and there is nothing other than Unity stopping the character from going through the walls or ground.
I have found that even a spike 1-2 pixels inside another block can still be "touched" if you are moving at high enough velocity, even though the character actually never ends up inside of that object. So walking over a certain "safe area" is ok, but jumping and landing will cause you to touch that submerged spike pixel. So it seems that unity, even though for a split second, will move you to your next position, calculate game stuff, then say, Woooha you aren't supposed to be here, and move you back to just before the solid object before the visual frame loads. So if you are at the correct align you could, for an instant, be considered in a block and use a basic jump instead of double jump or be inside a spike and die. This is what was going on and I need to really dig into how Unity actually calculates it and how my scripts are interacting with that effect. I will probably have to put pre-wall / ground checks to prevent that. Overall I could remove velocity all together and put in Transform based movements, but then I loose all the power having a velocity gives.

Holding onto directions after reloading doesn't move you. Yep, I know ///
There is also a small chance of doing a boosted jump, which you did once and were confused. This has to do with the jump signal being pressed, released, and pressed in a single frame (I think).

Unresponsiveness of movement. Ive been meaning to update how and when button presses work. Ive been away from playing typical guy games since I started working on this engine and I know I have lost "what feels right." I know my design choice for button presses is very basic and worked at the start, but its time to update it.

Overall these "more complex stuffs" are all in the 2D controller which needs an update badly anyways.
I think I spend wayyyy too much time on coding prefabs to make it easy to create a screen (All the objects in the game were just drag and drop prefabs).
Its about time I go back to coding the 2D controller.

As for things I learned from watching you play.
I took out the option to change the screen resolution (which is default unity stuff). It seems I should of kept it in.

My screen wraps prefabs where placed in quickly. They need to be positioned better to give a more real screen wrap effect.
After the castlevania room. The spawn point is in a dumb place and since you are pressing left to get into the boss room, you are extremely likely to walk backwards a room. Sorry about that.
Boss, Hands have too much HP for the length of the game. It has 10 HP each and after watching I feel it was wayyy too much. Maybe 5 seems right.
Spinny hands attack has a RNG component on the right hand which makes a "safe spot" never the same area. I will take that variance out.
RNG on type of attacks, I may change it to PRNG so the probability to attack the paws increases if you get bad RNG.

Finally OMG finally. I almost died every time you went back to the main loading screen because that "Reset Data" button was there.
Seriously one push of that and your save was gone. I put it in because it was easier to test things but seeing it on your screen scared the crap outta me.
More than likely I will remove it and put a difficulty setting in.

Any comments on my comments would be welcomed if you have any more questions.
Title: Re: Unity Fangame Engine - 11-10-14 - I Wanna Help the Cat - Pre-Release
Post by: Zurai on November 12, 2014, 12:03:01 PM
Hey  :azoCheer:

Im glad you watched the VOD and take the criticism seriously. Actually all of your explanations make sense
and for every problem I mentioned I had the same reason in mind but I have a hard time explaining it like
that :P

I really can't add much to what you said. For the spike/collision problem:

I don't know if unity offers this option, but in Gamemaker you can differ events between "Step event" and
"End step event". The code which you initialize in an "End step event" is always executed at the end of a frame.
So if you have the option for this, you could handle it like that, that all the stuff which is pushing you out of a block
an repositioning the kid, is put as a "Step event", so it's happening at the beginning of a frame. And the collision detection with a lethal
object could be handled in the "End Step Event" (or however it is maybe called in unity).

We had the same issue in Gamemaker when a spike is on the same height like a platform or a block and this is the
solution Seph and Lemon (I think) came up with. Maybe it helps you  :atkHappy:

I hope I could help you out a bit with my comments and looking forward to the next release :FrankerZ:
Title: Re: Unity Fangame Engine - 11-10-14 - I Wanna Help the Cat - Pre-Release
Post by: RegalPrime on November 13, 2014, 04:06:41 AM
Tested a real game vs mine, I had a hard time telling control differences. I guess I've been away from playing them for too long :/
I rewrote a chunk of the 2D controller tonight and it should calculate the key inputs instantly now. I seems to be able to short hop faster now but the movement controls I need to test more. Im not ready to do a update yet so others can feel it out.

Sooo, I spent the night doing maths in my engine and then searching the web about certain issues Ive been having in Unity annnnnnnd hmmmmm.
I come across discussions about certain oddities I also have been having and I found a possible problem going forward.

I created an exact ground check within one pixel below the character and it wont detect it even though their positions are the correct X pixels apart (if you calculate offsets and whatnot). Even if 2 colliders are touching each other there is a small cushion that are maintained to deal with calculations of them bumping into each other. When they touch each other, both colliders may move to deal with the collusion. Sadly, this is why a spike a few pixels under ground can be touched when jumping or running into a wall.
This same issue is why you can clip the side of a platform and not fall even though you normally would.
There are apparent physic settings to help deal with this issue for the 3D colliders but not for the 2D colliders (these are newer to unity).
They say edge colliders can deal with this but placing them exactly in the editor is pretty awful (no snapping function) and creating them during runtime via script is pretty awful.

Post I found about this

I really like the idea of making this work while still moving the guy via physics based forces, but doing so offers this challenge.
Removing physics based forces might fix this, but you loose so much of the power that Unity gives.
I will have to think about this and search some more tomorrow. Might have to make a test controller from scratch to test exactly how this can be fixed.
Title: Re: Unity Fangame Engine - 11-10-14 - I Wanna Help the Cat - Pre-Release
Post by: Yagamoth on November 21, 2014, 03:48:25 PM

I really like what you've done so far with this project. In a small (unfinished) project with a good friend we also ran into the problem with exactly ground detection because of the "skin" of the colliders. Ultimately we decided it would be better to use our own physics, despite losing that much power from Unity. Overall the precision was more valuable than the power of Unity - I imagine that might be a similar thing for this project. (Please note, I'm only marginally experienced in Unity, my friend did most of the work of this ^^; )

I have only skimmed through the thread very briefly and read the last post. In any case, I'd be highly interested to create a fangame via Unity if you were to release the source at some point :)

- Yagamoth
Title: Re: Unity Fangame Engine - 11-22-14 - Update
Post by: RegalPrime on November 22, 2014, 02:34:09 AM
About time I do an update regarding what I have done the past few weeks.

Most of the game changes I listed above have been put in and pending the next version of the game I will list the exact changes. Next version release will be soon and add in most of the below changes as well. Because of theses massive changes to the underlying scripts, dont be surprised if something goes wonky. Maybe a few days to test.

Much like I was complaining about in my last post and what Yagamoth said is true about Unity. There is a small buffer of about 1.5 pixels (0.75 pixels per object) that cushion 2 physical colliders (trigger colliders dont have this buffer). I spent the majority of my time writing another script that calculates very exact area collider checks for Ground / Wall / Ceiling. I could now see how far I was from an adjacent object when I was near it and thus calculate this buffer. In 3D colliders, they have an option to lessen this buffer, but the 2Dcolliders do not have this option as of yet. I have the buffer as a variable and thus can change it easily if something would come up later. Only bypass would be to write my own collider classes, but that seems like a ton of work and then again I loose the power of Unity.

Listed as a complaint from the game. Physics seems to make you touch objects within another object even though you never actually touch it. For example, walking over a spike that is inside a block is fine, but jumping on that block will cause you to die (I would guess that during the physics calculations, the character is temporarily inside it and thus you die). Now that I have my area checks, I calculate warnings to my move / gravity when it is within a certain range of a solid object and have it move the shorter distance to right beside the block. Soooo, for now it seems that problem has been fixed (there might be some fiddling with the code, but its a vast improvement). My prechecks are fairly small area (~20pixels) because of another problem with it grabbing information from other objects behind the one I want, but when I figure that out, I can increase the check range.

Changed how Button presses were done. They should be more immediate. Hopefully this should fix the unresponsiveness. The first playthough after I changed the code was a trainwreck. I was ramming into the sides of spikes and my jump timing was off (so at least something has changed).

I spent a few days writing a 100% transform movement character controller (ie always move via positional movement). Having the aoe checks made this possible. I did this because I would know that 100% the character is moving / falling / jumping X pixels. I put both the physics based and pixel based on the same screen and they both jump and move the same speed, which is a good thing.

As for Holding right after loading from a save / a screen doesn't work.
When a scene is loaded, Unity automatically calls  Input.ResetInputAxes().
This resets all keyboard inputs, which means from scene to scene it will not remember your key presses.
Each screen in my game is a separate scene, which is pretty stupid, and not efficient, but easy to setup. A real game would have multiple screens in one scene and load / reset the objects when necessary. Doing this would allow key inputs to be maintained. I am not at the point in this engine where I want to put a lot of time into efficiency. Getting the base things to work comes first. Reloading the same scene over and over would be first to fix and thus respawning would be fixed when being in the same scene.

So, as for the engine, I will continue to work on it even though the dream of 100% pixel perfect while maintaining physics based movements is a bit far off due to engine collider limitations (either that or I will have to write some extensive collider scripts which would break much of the interaction I have built up in the other scripts). Hopefully, things are a bit more solid now and the guy moves better.
I wouldn't expect its perfect yet, but I know I am getting closer each time.

@ Yagamoth
Let me know what you have planned.
I would be willing to release it fairly soon to interested people (which would include all of the game screens), but you have to understand that it is going to be messy and not organized the way I would like to release it to the public. You would also have to understand that it is possible that there would be massive changes in the future that would make future versions of the engine not work well with certain scripts you have created. At least basic room layouts should be fine due to tags and layers.
I still need to go through every script and see how well they held up against other scripts I have wrote (My camera script script works really nice but I know it needs to be rewritten to be more efficient, stuff like that). Some code I wrote months ago, seems like child's scribble now, just because of the things I have learned.
Title: Re: Unity Fangame Engine - 12-08-14 - Update + Download Link
Post by: RegalPrime on December 08, 2014, 03:08:38 AM
Found some last minute bugs and got them fixed (that Reset function on the boss screen messing up again).
If you tested the first version, let me know how this version feels. There are still a couple of things I wish I could smooth out, but things are better than before.
If you haven't tested this game / engine yet, feel free to this version. There is a scene select on the main loading screen, so you can jump around to any place in the game.

Ooohh, also the new Unity version was just released this week. Which means I can update my version (hopefully nothing breaks)
They added in the new GUI stuff, which means I will have to watch all the tutorials and start testing it out. When I get things settled I can update the main loading game screen.
It should be a lot easier to create and design with the new patch. Seems like a fun mini-project.

Well, it is time for the new game / engine release. I will end up being gone all next week so I worked on getting this put out this week.
The amount of backend things I have changed, I would bet there are some bugs somewhere. I ended up adding in a few things I wasn't planning, but the game should run a lot better now (I'm sure its not 100% perfect, but its a big improvement).

** Update Notes **
I put back in the default unity pregame screen to allow for changes in resolution size.
It also has options to change the button settings, but do so at your own risk.
I have not messed around with that window and I have no clue how it interacts with my in game settings.

Platforms pull less when jumping through them (horizontally)
Vertically is still a bit pully though.

Torch pickup / drop is now the X button.

Changed how Button presses were done. They should be more immediate.
Hopefully this should lessen the unresponsiveness.

The below were added to detect when the character is close to a solid object and will move them a shorter distance to prevent the physics bug (where you could clip a deadly object in another block and die)
- Added in ground check
- Added in wall check
- Added in ceiling check (no preventive movement checks yet)
-- There is still a small possibility that you will clip a ground object when falling (you fall way faster per frame than moving), but it is an extreme improvement over the default.
-- This is because the AoE ground check is not as big as I would like atm due to another problem that arose (when I fix that, I should prevent this from happening)

Reset Data on the Loading Scene is no longer an option
- Difficulty options were added in instead (easy / medium / hard)
- Items without the proper difficulty permissions will be disabled
- Nothing in this game uses the difficulty option, but the option and script have been written

Boss Room - cant go backwards a screen
Boss - Spinny hands attack - No RNG on the attack, there should always be a safe spot.
Boss - Paws have 5hp each. 10 was just too much.
Boss - I noticed the death timer on the projectiles was too high and objects were hanging around too long.
-- Changed the death timers based on each attack to the smallest time needed for an object to leave the screen (less objects active at once, less calculations)

Object Pooling put in the new object spawner script (has a variable to disable it if needed)
- This effects any screen with constant spawning of objects (including the boss)
- Objects are now reused instead of constantly creating and destroying themselves (this should increase efficiency).

Object Pooling added to shooting script (reuses bullets)
I think the spike treadmill uses object pooling now as well (Im sure there are others as well).

Added the Reset() Event to every script
- This allows one script to call the Reset() function on all available scripts that are loaded in the scene
- The Reset() function is added to each script that needs it and will change the script back to the initial settings / position / etc
- Instead of constantly deleting and reloading the same scene (and its objects), using this will allow the scripts to reset themselves giving the illusion they have been reloaded
- More efficient, but there is the possibility that some of the Reset() functions could be wrong and thus have bugs.

Reloading the same scene will now call the Reset() Event instead of deleting and reloading the scene (and off of its objects)
- This will allow for key presses to be active when constantly reloading on the same screen (this however may not hold true between scenes)

Commented on every script and sorted them all out

Object pooling went in ok, but the Reset() event on some scripts was a pain (ie the boss / spinny room).
Im sure it is a lot easier to write a script from scratch with the Reset() event in mind instead of modifying an already existing script
It wouldn't surprise me if a few bugs might show up now.

Scene select is available on the loading page - This is for the people who want to jump to a certain scene to test (or just want to browse through my game).
Just move the slider bar to the correct scene number and click "Jump to scene"
Using the jump to scene will use either your current used slot or slot 1 by default.

It gets fairly old writing the back-end scripting so I took a few days off and wrote a nifty background effect.
When this script is triggered, it sends a shockwave-like color changing effect outwards through out the valid tiles.
+1 test scene - Has a few of these trigger objects on a empty scene with different variables set to give a feel of what this script does
+3 new scenes using this script - Created a simple gimmic involving this script.

For ease, I created a button on the loading screen that allows you to jump to these new scenes.
For now, they are in the game, but not attached to any other scenes (they are actually after the "you win scene". After I find they are bug free, I will put them somewhere in the middle of the game.

Picture of the first new scene
(click to show/hide)
Title: Re: Unity Fangame Engine - 12-21-14 - New Gooey
Post by: RegalPrime on December 21, 2014, 01:42:37 AM

- New GUI system hype !! -
Took me a bit of time to figure how to use it, but I am getting the hang of it. I am also glad I waited instead of learning the old system then learning this one.

Created a new Loading screen using the new GUI. It look nice and crisp and allows for me to change design and whatever without totally breaking the connections anymore <3
It is pretty plain at the moment, but it is a lot better than the old version.
(click to show/hide)

Created a HP Bar GUI + prefab. The HPModule script can use this and it works well displaying the objects / enemies hit points.
Has various options on when to display the HPbar / speed of hp removal / etc.
- Enabled the option to show the HP bar when the bosses paws are hit.

Replaced the basic label script with the new GUI system. Signs and character chat boxes look better. I didn't go overboard creating boxes. Just a simple bordered square that can be expanded upon later. A lot cleaner to work with compared to the old script based GUI.

Created a game over screen using the new GUI. It looks 100% the same, but it needed to be updated.

Finally got around to totally rewriting the camera script. Whereas it worked well before, it was a huge ugly inefficient mess. After sketching out the design, the rewrite went smoothly.
Also updated the script that triggers the camera manipulations when the player trips a spot. This one had a few problems just because I totally changed how the camera script worked from before, but now I think it is all fine.

Save point added an option to reset the default camera position on trigger, which is helpful when resetting the camera on larger scenes (where the camera follows the player).

Put the 4 scenes added last patch into the main game scene lineup.

- Stuffs -
I am a bit disappointed in not being able to smoothly access preventive measures when using physics. Physics are calculated all the time (when there is free time), whereas my preventive checks are calculated once a frame. Most the time the guy will move very well and other times you notice a bit of a snapping effect when running into a wall. I mean its better than dying to objects inside of walls, but I need to dig more into how to do this better. I will probably flesh out the 100% transform 2d-controller and see how it works in game. Sadly it will not have the power to move up slopes and I will have to change a few things if that happens (will have to figure how to do slope climbing later I would guess).

I have been cleaning up the engine files as of late (when I haven't been programming) and am getting to the point where I am feeling better about releasing the engine to the public.
As long as people understand the state the engine is in (not perfect), I have no qualms about releasing it in a somewhat messy state.
Title: Re: Unity Fangame Engine - 1-15-15 - Collider / Scripting fixes
Post by: RegalPrime on January 15, 2015, 11:53:12 PM
Hmm, didn't know it was that long since my last update. I probably said this above somewhere, but I really hate programming the more complex back end stuff for a long period of time, but it seems that's all I have been doing since the last update. Also, took some time to learn more about the inner workings of unity so I can program smarter.
No engine / game update, but I am working on a testing room I can use to test some problems / get feedback and might release that later.

Did some research on when unity polls key inputs and when the screen is rendered and changed how key inputs are done again.
Updated and cleaned up both movement scripts. After updating my pixel movement script I found a logic problem where even when not moving, the script was grabbing no movement as an input for that frame. This could cause a one frame delay when actually wanting to move. Knowing when the frame renders now allowed me to clean up the scripts and fix the weird snapping that happened at times when getting close to a wall.

Made the velocity and pixel movement scripts the child of the 2dcontroller and thus can be used interchangeably in the engine. Rewrote the parent to be more generic and encapsulated most of the variables. Was worried about getting this to work right, but the pixel based guy script interacts with all the game objects like he should, so I guess it worked.
IN SHORT, there is a prefab for the physics based movement and a prefab for the pixel based movement character. Both can interact with all of the other objects in the engine without having to change any other scripts.

Put a line of code in the spawn controller so that I can force which guy spawns through the entire game

After having some time, I finally found the new settings to change the size of the collider buffer (came in with the newest patch).
Previously, the default setting caused the player to have a 1.5 pixel extra buffer when "touching" another collider (ie a wall or even the triggering of a deadly object). This buffer made the character much fatter than its normal collider size and caused some weird issues (poor accuracy of jumping / bonking head early / etc)
The settings now allow to go down to 0.01 pixel buffer (a pretty big difference)

This is good HOWEVER, this buffer is used in the physics to help calculate collisions of solid objects. The physics guy collides with corners of certain square objects very weirdly when the buffer is set extremely low. He will kind of bounce off of edges a bit. I am not sure if there are settings that can increase the accuracy of these collisions or the rate in which they are calculated. The good news is that the pixel movement based character does not have this problem and no longer has this collider problem.

Of course, having lost this buffer, some of my objects started acted weird at times (falling through moving platforms and whatnot)
I spent a bit of time updating some major scripts. I haven't had the time to test many of the other object interactions to see if they held up.

I also took this time to figure how and when colliders trigger so that I can create more accurate "deadly objects"
Previously the spike's edge collider was just thrown on "by eye," but now I have a better idea of what to do next.
With that 1.5 pixel fatty buffer before, objects triggered before they should have and were inaccurate, so I shrunk the collider size to compensate. I no longer have to do this and I need to change it back.

Serious update on CalculateChecks script (used to calculate the distance between 2 object's colliders)
- This script is used to detect when the character is grounded and near other solid objects (for movement / gravity reasons)
- AoE calculations to detect wall / ground / ceiling / pits are now generic and will know how to calculate the offsets based on that objects current settings
- Took out the need to have separate code for if the object is flipped / if facing a certain direction / scaled a certain size / etc
- Increased the accuracy of these checks (there was a few places when the character was on the edge of a platform, but this script said he was not grounded and thus played the falling animation and caused him not to be able to jump / refresh the jump)

- Updated the formula to calculate the distance to a wall / ceiling / ground object to deal with all of the variables in one formula
- Calculating the distance to the ground for an edge collider was updated as well (distance to an edge collider for wall / ceiling are not in yet)

AI script now uses check surroundings script to detect walls / ground / etc (same script that is used on the main character. CalculateChecks.cs)
- Added pitcheck to the script to detect if there is a pit in front of the object (used to tell the AI to turn around when patrolling)
- No longer need the offset objects on the AI gameobjects, which should simplify things a bit.
- AI acts more stable because there is no need to manually set the offsets on the gameobject.

Climbing changed to detect walls so there is no studdering / wiggling when climbing and humping walls (also Uses the CalculateChecks.cs script)

Teleport in room script - maintain offset was bugged and fixed.

So, overall, a lot of progress in fixing some major problems that were plaguing the core of this engine (those colliders :/).
Next thing to fix is the aftermath of shrinking that collider buffer and its effect on interaction with other gameobjects (will involve going through most of the prefabs / scripts that interact with the character). Also need to figure how to make the physics movement guy collide with corners better when the collider buffer is set very small.
Title: Re: Unity Fangame Engine - 1-23-15 GameUpdate and Engine Release
Post by: RegalPrime on January 23, 2015, 04:08:25 PM
The whole collider issues was one of the main reasons why I haven't released the engine. With solving a majority of these issues + having a workable alternative character that works well (the pixel movement guy), I've found there's no reason to not release it in its current state.

There is still a lot of old items in the engine I wish I had time to rewrite or even add, but for now it is stable enough.
- Uploaded and downloaded and tested to make sure I could open it and whatnot.
- Seems everything is in order

Updated the engine and released game version 1.03
- There are 2 downloads, one uses the physics guy and one uses the pixel based movements as the main player
- Pixel guy moves via transforms and requires almost no collider buffer. Only con is the inability to go up slopes
- Physics guy moves via physics forces but requires a larger collider buffer to remain stable. Increased collider buffer makes the player collider fatter
- Update includes what was listed in the last post + below
- Most of these deal with the aftereffects of messing with collider settings

Hill climbing works on physics guy again
Distance to wall calculation updated to deal with edge colliders
Distance to ceiling calculation updated to deal with edge colliders
Climbing works while upside down
De-childed the character if they are on the treadmill when the individual object recycles itself

Moving platform fixed
- It wasnt that much of the collider size, but the value used to determine when the player was above the collider
- Changed this to a public variable and increased the collider box. This way it can trigger earlier yet still calculate correctly

Reloading a scene with an animation of a dead unit cause a bug - Fixed (forgot to reset the IsDead tag)
Sliding down an edge collider - Am assuming some aftereffect of changing the collider buffer / penetration for penalty values (Fixed)

Found a bug that deals with some weird combination of pressing and releasing the jump button multiple times within one? frame. Happens very rarely.
Need to pinpoint what is actually the cause before attempting a logic fix.

Basic Tutorial
Simple tutorial to cover a few things
(click to show/hide)
Title: Re: RegalPrime-UnityEngine v1.1 - 1-23-15 - Update
Post by: RegalPrime on February 19, 2015, 03:37:02 AM
After the initial release, I decided to take a week off of this project (ended up being almost 2 though).
I had a bit of trouble wanting to go back to it because I had no clue what to work on next.

Long story short, I figured I would try to make an avoidance boss.
I had a super script that did a whole bunch of stuff and was used in creating the cat boss in the game (and other things). This includes everything from movement to spawning of objects and shapes. I didn't want to fix what was there, because it will break the other stuff in the game and I really don't want to mess with the boss code anymore. I figured there was no better time than now to create a version 2.0 of that script.

So, I am slowly moving over each function and testing / expanding / and simplifying everything about them. Some of them were, /// uugh, such a stinking mess, Im surprised they worked, lol, those needed total rewrites. Luckily, I was able to condense a few functions together. I have a few more main functions to bring over and then I think I will try some basic avoidance timing and testing to see if  everything is working all right. I think it will go all right, but I am afraid that I may run across some unforeseen problem mostly dealing with manipulating multiple design options in an easy way. In the cat boss I was able to do it, but I wasn't happy with the way I had to code it, hopefully this will change with the new function design.

-Very minor engine code fixes
Title: Re: Avoidance Done - Round1
Post by: RegalPrime on March 11, 2015, 02:57:35 AM
Parsed the entire song for the avoidance fight and took notes of all the important times / repeats / stanzas / chorus and whatnot. Figured I would do extra work upfront so I dont have to do that later. Divided the song into 10 sections. Added simple actions for the avoidance fight and set them to the timing. I can start at any of those sections and test from there (dont have to listen through the entire song all the time). Its nice to be able to just plug in the starting time and how long you want something to go for and it just works. At this point I had a crappy avoidance with good timing.

Was a mix between jumping between the avoidance code and updating the major scripts, but for the most part, all of the old functionality has been put into the new scripts. All the new versions of the functions look so nice comparatively. Added extra functionality as well. No overloaded functions as of now just so I dont have extra work to do if I do some major restructuring. I have a few more things I need to add though, but its 100x better than the old version (probably another child script to deal with custom stepped effects to keep them out of the main scripts).

Overall I kinda just picked a random anime song from youtube that seemed to have good segmentation. Due to the length I felt I would keep things fairly simple and extremely low RNG. After the other script update, I added more complex actions and spawners. Also added a few test custom actions which were a lot easier to create with the last iteration of the script. Fancied up the room and I decided to release a version to show what Ive been doing. I have a lot more functions that I wish I could of put in, but it would of just made things more complex.

A few things.
Song is 3.54 mins long. Has a few repeat sections (chorus) were the "animation" is the same / similar. This was to keep things simple.
The title / save_load / ending screen are the same from the engine.
There is only one screen in this build (the avoidance boss)
Shoot the yellow box to start the avoidance fight.
All of the fruit projectiles have a circle collider on them, so the stems are safe.
I wish I had some better tiles to fit the nature of the song, but it looks ok.

I wouldn't consider it a bug, but during testing, I have the song skip to a certain time at the start of each section of the avoidance fight. This was so I could start the fight in certain sections. Some are seamless and you wont notice it, whereas others will have a very slight noise. In the real release, I would just comment out the skip to X spot in the song, so for now it is still in.

Nothing too fancy and I wish I could of thrown some other script function calls in to show better what I can do with the rewritten scripts.
Overall, this helped me iron out those problems from the older version and should make future bosses / avoidance so much easier. It was seriously easier and cleaner looking than my cat boss script, so that was a good thing.
Title: Re: RegalPrime-UnityEngine v1.1 - 3-11-15 - lol wut an avoidance boss?
Post by: FlyingTaoster on March 11, 2015, 03:54:01 AM
I have to admit, i am pretty impressed.

I tried out your game awhile ago, and the physics were certainly a bit different from the regular Guy physics in game maker. My playthrough of it ended when I had saved on the spot where one of those enemies in the later area is that you can kill. woops  :atkWut: Despite me save-screwing myself, it was an enjoyable experience  :cirThree:

This avoidance however, even though it is somewhat plain and has it's lulls in action, is an impressive feat. The timing of the attacks match the song well, and some of the attacks are in themselves impressive. The game you made somewhat piqued my interest in making a fangame in unity, but with what i've seen in your preliminary version of the avoidance, I can't wait to see what else you'll be able to do with it  :IceFairy:
Title: Re: RegalPrime-UnityEngine v1.1 - 3-11-15 - lol wut an avoidance boss?
Post by: RegalPrime on March 17, 2015, 01:37:34 AM
The whole saving inside of the monster problem can be resolved just by hitting the Q button (was in the readme :p not that I expect most people to read them). Dont worry I did it a few times as well. Pressing R, normally restarts at your save point and resets the room / monsters to their default positions, whereas Q will restart you at the start of the room and reload the scene from scratch. Of course you can always skip to any room you want from the main save / load screen in the current build and start the scene over that way.

I appreciate your feedback on my engine. My goal is more to make sure my code works rather than make the best game / avoidance ever and Im glad you noticed that.
Overall, the avoidance code is stupidly simple looking because it just calls all of these functions Ive been working on. I think it took me longer to diagram the song than write the boss code.

Here is one of the phases of the avoidance boss.
I dont have overloaded functions as of yet (so there is a lot of null / new Vector2(0,0) fillers that probably wont be there later)
You can guess what stuff does just by glancing at the code.
X object, Do this, at variables X /X / X / X / etc

(click to show/hide)

A lot of what I have done is all of the generic stuff, like move / rotate / create and dealing with sets of objects. My next post, Ill give a list of all of the new completed functions that are available. For the most part that stuff is done and I have enough of the functions I can start doing some advanced custom "actions." Not sure what things I will work on, but for starters I already wrote the ability to create an N-Sided polygon with X skips (skips = instead of just going around the outside of an object, you can skip X points and create star like objects easily). I also rewrote how shapes are created and morphed using something new I learned about C#.
Title: Re: RegalPrime-UnityEngine v1.1 - 4-4-15
Post by: RegalPrime on April 04, 2015, 03:48:13 AM
Been a while since the last update. The avoidance is still the same :p

It's surprising how long you can spend writing support scripts to get them just right. After doing this scripting and my avoidance, I watch others stream and I look at it so differently now. Its not that its a fancy design, I try to break it down in how they did it, and that alone made me spend a lot more time adding functionality to make it easy to do these design effects. On top of that, I found some cool c# stuff that made me rewrite a chunk of my code again, but it made it a lot easier to add to the script now.

I have a bit of time tonight and I figure I will list ALL of the stuff I have added. Guess it will also help me with the readme when I update the engine in the future.
For the people who have looked at my engine, all of the stuff I have been coding, replaces the NewObjectSpawner.cs script. It works better, has tons more functionality, and its very clean.
The script contains functions that make life easy. Stuff like, moving / rotating / scaling / looking at an object, and also the creation of shapes for use in an object spawner / avoidance fights.

- So here we go - I will list the coroutine name and brief information about what it does
Pretty much every coroutine has extra variables that are not listed that deal with start delay, position references, locality, and etc

ObjectManipulation.cs script
(click to show/hide)

ObjectCreation.cs script
(click to show/hide)

ObjectCreationExtras.cs script
These are coroutines that do a chain of events and then destroy themselves to make a simple to use effect.
Nice to be able to do a multistep effect with one function call. Too busy writing the above script stuff to add to this section to make the better looking effects.
(click to show/hide)

Not sure when I will be done with these scripts. Also not sure when I will release the next engine version. If you are interested in the above scripts, let me know.
Title: Re: RegalPrime-UnityEngine v1.1 - 4-23-15 Engine Update Information
Post by: RegalPrime on April 23, 2015, 03:03:31 AM
I feel pretty good about the scripts I have been working on, so I started taking some engine things off my list.

I really want to do another engine release, but I have to see what is the easiest way to do it. I have no clue if there is a quick way to do it without totally breaking old versions or make it just update the old stuff. I will have to mess around on that to see what is the least intrusive way. The easiest way for me is to just zip up the project folder again, but I am not sure how they works if people have some items created already in their project.

I keep a running list of things added to the engine and I dont think I mentioned any so far, so here we go.
Major addition includes
ObjectManipulation.cs script
ObjectCreation.cs script
ObjectCreationExtras.cs script

The above 3 scripts replaces the NewObjectSpawner.cs script. See this post for a bit more information.

The new scripts were used in the creation of an avoidance boss. This scene is included in the engine build (added as a scene in the engine build)
All of the "I wanna be the cat scenes" were put into a sub folder and removed from the scene engine build). So each individual scene is there, just dont expect to be able to move from scene to scene without adding them to the engine build first.
Be aware that due to the update to many scripts, there may be some disconnects or bugs in the cat scenes. I have not went through any of the scenes as of late.

Fiddled with materials and learned how to deal with them + create normal mapping. Interesting what you can do with normal mapping. This allows for sprites to have the illusion of depth via shadows. The hardest part is to find a way to create them easily. Added some temporary normal maps for certain objects to see how they work such as blocks / apple / tree / and miku.

Created full screen effects using materials and scrolling normal maps
- fire - looks like the screen is on fire with flames licking up. pretty nice looking
- fog - looks like rolling fog / smog across the screen
- water - looks like you are looking at the bottom of a riverbed with the water going over rocks. Not very awesome looking but I didnt try all that hard finding good materials, lol

Got rid of the hard coded double jump and put in a generic multijump variable. This way you can easily change the number of extra jumps the player can do.
- Added the option to change this variable through the area modifier prefab.
- Jump refreshers refresh all the extra jump.

Jump refresher updated
- Has option to add a certain number of jumps per trigger
- Has option to allow to go over jump cap from the above trigger

Added an array of saveable triggers. Is set to 10 at the moment. Used for things like secret collectables or boss tokens.
- GameCompleted script - Tells the saved file the game is completed.
- SaveATrigger script - Updates the array / value when object is triggered and saves it to the file
- CheckATrigger script - Will check if the statement is valid and will enable / disable the gameobject.

Updated the save/load screen. Moved some stuff around and updated the graphics a bit.
Added in a panel to show the 10 collectables. Shows an icon when that triggered index is triggered ingame.
Changed the game complete from a toggle button to a gameobject that is set active when the game complete trigger is activated. Added a game completed icon.

ResetManager is now the EventManager
- Added in the ability for other scripts to know when the player has died. Can be used for avoidance fights to stop them from doing their actions.
- Still has the ability for other scripts to know when to reset their values.
- Certain information is displayed in the console about attachments when events are called (just for my information). Stuff like, 7 scripts are resetting, or player died by X object and 2 scripts were told about it.

PlayerDied script is now the PlayerHPModule
- Player now has option to change its HP. Default is 1 HP and 1s damage delay. These variables are hard coded and only changeable in script.
- I can expand on this later when I feel a screen might need a HP based player (still need functions to manipulate this value).
- Added in option for hit sound effect. Is only played when player is hit and still has hp remaining (else the death sound would play).

CalculateChecks.cs. If a AoE check finds a ground object but it is not a BoxCollider2D, it will use raycasting on whatever is there to find the distance (previously had bad logic where I missed an else statement)
Went though every script to get rid of certain player references. Each object should effect the player that triggered it. Overall just a clean up of code, might help out later.
Cleanup of old engine assets. Some sprites / old AI prefabs that didnt have connections. Some old materials.
Added a few sprite sheets of fruits / flowers because they looked nice
Added duplicate sprites + their normal map, so that section is a bit of a mess.

Been a while since I have done a picture, so here are two.
All of the sprites on this screen are the default guy game sprites EXCEPT that I added a normal map to them (even the background). I made all of the normal mapping so dont expect it to be perfect.
Stuff to look for
-Shadow on the face and hands of the guy
-tree / spikes / apple gets texture from shadows
-parts of miku seem to to have some depth
The light source is on the rightish middle
(click to show/hide)

New loading screen as well. looks better than the old one
(click to show/hide)
Title: Re: RegalPrime-UnityEngine v1.2 - 4-29-15 New Engine Version Download
Post by: radicalero on May 14, 2015, 12:15:21 PM
Hi! I am trying to test your RegalPrime-UnityEngine v1.2 on unity v4.5.5f1 ad the program break when open loading the project.
I tryed with unity 5.0.1f1 too and the the project open and the scene play but dont work.
Can you share your actual latest version of the proyect and say what is your unity version?
Best Regards!
Title: Re: RegalPrime-UnityEngine v1.2 - 4-29-15 New Engine Version Download
Post by: RegalPrime on May 15, 2015, 02:38:59 PM
Guess I haven't been keeping up on the newest versions nor did I think to list what version build I was using (updated the first post with that information).
Both engine 1.1 and 1.2 were built in version 4.6.1f1. If I remember, I downloaded / updated to 4.6 when it came out and never updated it since then.

Now I see that unity 5.0 free is out (since March 3, 2015), so I need to think about updating the engine and if you had problems, it makes me wonder what will happen when I do the update. I really appreciate you letting me know. I admit I didnt know unity 5.0 was free as of yet (I haven't kept a close eye on their site in forever).

Ive been doing a rewrite of the AI and that is pretty much done (at least the major points), so I will download 5.0 and start the painful task of figuring out what is new / what might break and how to fix it.
Title: Re: RegalPrime-UnityEngine v1.2 - 4-29-15 New Engine Version Download
Post by: radicalero on May 16, 2015, 10:12:45 AM
Thanks! Waiting for it =)
Title: Re: RegalPrime-UnityEngine v1.2 - 5-21-15 Unity5 Test Release
Post by: RegalPrime on May 21, 2015, 03:01:51 AM
I uploaded a preliminary version of the engine updated to Unity 5. Did a lot of cleaning and it's a bit smaller (89m -> 71m)
This is so I can get some feedback on if people are able to use the engine in the newest version of unity (I felt kinda bad about posting my v1.2 using the outdated engine)

I am using Unity v5.0.2f1 Personal

Cat game scenes are reattached and most everything has been tested. Some weird stuff happened when I updated to unity5 and it wouldn't surprise me if I missed a few things.
Title: Re: RegalPrime-UnityEngine v1.2 - 5-21-15 Unity5 Test Release
Post by: radicalero on May 21, 2015, 05:00:29 AM
I uploaded a preliminary version of the engine updated to Unity 5. Did a lot of cleaning and it's a bit smaller (89m -> 71m)
This is so I can get some feedback on if people are able to use the engine in the newest version of unity (I felt kinda bad about posting my v1.2 using the outdated engine)

I am using Unity v5.0.2f1 Personal

Cat game scenes are reattached and most everything has been tested. Some weird stuff happened when I updated to unity5 and it wouldn't surprise me if I missed a few things.

Awesome speed to do the update. I will check it today. When I test it i will say how works on me.
Thanks. Best Regards!
Title: Re: RegalPrime-UnityEngine v1.2 - 5-21-15 Unity5 Test Release
Post by: Starz0r on May 21, 2015, 08:16:43 AM
This seems complete enough to be moved to the Engine portion of the forum.
Title: Re: RegalPrime-UnityEngine v1.2 - 5-21-15 Unity5 Test Release
Post by: radicalero on May 23, 2015, 11:39:37 AM
Hi! Awesome work. Unity 5 version, I think work perfect.
Waiting for new updates, new levels and new little bosses =)

Do you will create videotutorial creating 2 levels?
Title: Re: RegalPrime-UnityEngine v1.2 - 5-21-15 Unity5 Test Release
Post by: RegalPrime on June 02, 2015, 03:28:57 AM
Got caught up having to get something to work just right, but I think I got it to work.

I am working on getting an official 5.0 unity version now. I need to do some testing and write the patch notes. Luckily I keep a running list of stuff I have added, but its never fun.
Oohh, tutorials. Its been on my mind forever and I will starting thinking more about doing them. The goal would be a set of video tutorials because it is easier to show than to tell.
Of course, I need to research some free video recording software / etc, because Ive never done it before.

So that thing I was working on will be in the new engine version as well.
Been working on custom editor scripting which is somewhat the same but different.

Projectile Spawner Prefab
This is a picture of the old (left side) and new object spawner script (right). Right side is 2 different pictures of the same script (2nd one shows the dropdown)
Instead of choosing yes / no for every type of spawn option there is a dropdown that is attached to a list of delegates
The custom editor also shows / hides the proper fields depending on the selection.
Looks 1000x better now and a lot easier to use.
(click to show/hide)

AI Prefabs
Before I did this change, the only way to change the action states of an AI unit would be to create a child class and override the passive / alerted / aggressive functions with a simple function name. C# Attributes + Reflection. Never heard of them before but I guess I do now. Long story short. The base AI class searches for all the functions with that attribute and creates a list. This list can be used in the custom editor to give the user a dropdown of all available actions. The script then takes that selection, turns it into a delegate and populates the proper AI action state.
SOOOO, what does that mean.
There is a dropdown box in the editor where you can select what your unit does. No more having to create a separate child script. Cool thing is, that if I ever write new AIactions, the list will show them without me having to do anything.
Picture shows how the editor looks for two objects.
(click to show/hide)
Title: Re: RegalPrime-UnityEngine v1.2 - 5-21-15 Unity5 Test Release
Post by: radicalero on June 02, 2015, 07:17:22 AM
Yeah!! Very good news!
Waiting for official release for Unity 5 and the videotutorials.

I recommend you use Camtasia Recorder to record the videotutorials.
Title: Re: RegalPrime-UnityEngine v1.3 - 6-4-15 Release (unity 5.0 update)
Post by: RegalPrime on June 04, 2015, 12:39:51 AM

Version 1.3 Release - Created in Unity 5.0.2f1 personal
Cat game scenes are reattached and most everything has been tested (still includes the avoidance boss as well).
I would also like to note that due to me doing some major overhauls of certain scripts, some objects may mess up / revert to default values (I noticed certain AI units did).
Some weird stuff happened when I updated to unity5 and it wouldn't surprise me if I missed a few things.

Messed with the layer naming
- Before I had a few extra layers for really specific purposes and I got rid of them
- Some renaming - Ground is now SolidObjects

The eventmanager now has events for certain key presses
- Should make it easy later if I decide to change buttons or how button presses are done.
- Q / R / F2 / shooting / Action buttons are in that manager
- Other scripts now attach to these events and call their functions that way
- Resetting the screen or going to title now use these events
-"Attach to object" script now attaches to the eventmanager to know when the action button is pressed
-"Shooting" script now attaches to the eventmanager to know when the action button is pressed

New HPmodule - update
- The main change is that is has an event that other scripts can subscribe so that they can know when hp=0
- Other general code cleaning and rewrites

New AI - Total rewrite
- Uses the HPmodule event to know when the object has 0 hp (dead)
- Has more of a parent child class system going on. Connecting a certain child class will give you their speciality actions.
- Useable child classes = GroundAI / GroundAI_Shooting / FlyingAI / FlyingAI_Shooting
- AI - Custom Editor
-- Allows the user to select which AI actions for each state in the editor.
-- The underlying script will then change that option into a delegate and populate that action
- Updated the prefabs to include all 4 types
- Would like to note that I did had some problems with unity remembering my custom editor variables. I found the problem
and fixed it. Hopefully that dosnt reappear.
- Going through the cat scenes, I noticed some of the cat units were using my new AI and thus were defaulted to really stupid actions. I fixed all that I saw, but be aware I might have missed one.

Projectile Spawner - Script rewrite
- Better coding than before
Projectile Spawner - Custom Editor
- Changing how / what spawns is a lot cleaner in the editor.
- Updated prefab to use this new version

Updated the machine controller (still a work in progress)
- Has the basics to allow manipulate other machine type gameobjects when trigggered (stop / start / reset)

Problems I had updating the engine to Unity 5.0 stuff
- Material offset script dosnt seem to work with the standard shader (the old objects still work though)
- Some offsets of ground units broke when updating (hope I got them all)
- Lighting has changes so some of the old stuff may seem a bit darker
- Some of the ingame objects in the cat game are not attaching themselves to their corresponding prefabs (they still work though)

New GameSettings.dat will set the sound and music to 5 as default instead of 10
- Sound changed and seems a lot louder if I put it fully to 2d sound
Title: Re: RegalPrime-UnityEngine v1.3 - 6-4-15 Release (unity 5.0 update)
Post by: radicalero on June 04, 2015, 06:41:55 AM
Thanks for your awesome work.
Title: Re: RegalPrime-UnityEngine v1.3 - Be gentle senpai
Post by: RegalPrime on June 20, 2015, 02:43:58 AM
Getting things set up to record and whatnot has been a learning experience and I think I have the basics down.
This video is just a basic tutorial about setting up a new game in my engine. It is nothing fancy and I did it in just one take / no editing.
Hopefully that works out fine because it makes life so much easier to do them this way.

www.youtube.com/watch?v=44_0Wmz4WpY (https://www.youtube.com/watch?v=44_0Wmz4WpY)
For now this is unlisted, so you need the direct link

Let me know how good / bad this video was (volume / did I explain it somewhat ok / etc).
The idea of making a tutorial via text / pictures and posting it seemed like an extreme pain. After I got things set up it actually went well.
I have a second video just explaining what is actually in the engine / folders, but I messed up a bit and have to edit a small portion. Of course my crappy editing software that came with my computer really sucks so I need to browse for alternatives.
If all goes well, I think I will toss some short videos in that explain certain prefabs and what they are capable of and maybe one that explain some limitations of the engine and problems.

Other than that I have been working on the creating a new animation controller for the Guy (new unity 5 stuff). It looks so much better and is a lot smaller / easier to read. I replaced the old one and it seems to not have any bugs in it.

Annnnd of course, when I open Unity today, I get the message, "There is a new version of Unity."  lol ... maybe when I get a few more things added I will update and post the next version. The patch notes seemed like more bug fixes and the current version of my engine still might work.
Title: Re: RegalPrime-UnityEngine v1.3 - 6-20-15 - First Video Tutorial - Be gentle senpai
Post by: radicalero on June 20, 2015, 07:38:52 AM
Thank you a lot for the work! I will see the video.
Title: Re: RegalPrime-UnityEngine v1.3 - 6-20-15 - First Video Tutorial - Be gentle senpai
Post by: Xxaz_v on June 20, 2015, 12:55:32 PM
Where's the stage where the game becomes a FPS? Kappa
JK, really good work though! :D
Title: Re: RegalPrime-UnityEngine v1.3 - 6-20-15 - First Video Tutorial - Be gentle senpai
Post by: RegalPrime on June 24, 2015, 12:06:35 AM
I think Unity has a built in thing where you can instantly make a FPS controller (there is a tutorial on that) and since the engine has all of the other backbone, it might be possible to create a gimmick that involves 3d space. Might be really dizzying to be in first person mode jumping through spikes and whatnot. Also, I think Unity has oculus rift support now as well :p

On another note, since the start I have always been thinking of doing some 2d/3d gimmick level and see how well that works. Might be something I can screw around with next. I was thinking of having the Up / Down arrows move forward and backwards in the screen and have the camera in 3d mode with 3d objects (like in paper mario or maybe swap between different Layers of ground). I think I might rewrite the 2D character controller again to tighten things up and I could add in up / down support and just disable it for the normal engine (but it would be there if I needed it later).

Not sure I will dive into that yet, but its always on my mind. Been working on creating an auto-implemented event controller so that the game doesn't break when certain controllers aren't on the map. Right now without certain ones, the guy wont even jump.

Dont know when I will upload the next video (been kinda busy and plus I have to edit it a bit). I think I might do some videos on certain prefabs to show the extent of what they can do as well, but that is down the road a bit.
Title: Re: RegalPrime-UnityEngine v1.3 - 6-20-15 - First Video Tutorial - Be gentle senpai
Post by: verveplay on June 28, 2015, 11:11:26 AM
Really nice to see something new, but i never got into unity. Sometime maybe...
Title: Re: RegalPrime-UnityEngine v1.3 - 6-20-15 - First Video Tutorial
Post by: RegalPrime on July 19, 2015, 01:17:06 AM
Quick update
Need to finish up some stuff, then I will release the next version using the latest Unity engine.

- New animation controller for the Guy
- Complete rewrite of all the 2d controllers for the guy (Was a complete mess and it needed to be done for a while)
- Adding in machine based functions for all the scripts that can use it (involves some minor / major rewrites of some scripts). This gives the ability to start / stop / reset / reverse / speedup / slowdown certain objects easily (spike treadmills / moving platforms / etc).
- Some of these script rewrites ended up being so different, they broke the prefabs that were using them and set their values to default. Some of the cat game scene's prefabs might be defaulted values and I need to go through and test.
Title: Re: RegalPrime-UnityEngine v1.3 - 7-19-15 - Quick update info
Post by: radicalero on July 19, 2015, 07:55:14 AM
Thanks. Waiting for it =)
Title: Re: RegalPrime-UnityEngine v1.4 - 8-8-15 - Engine update + new download
Post by: RegalPrime on August 08, 2015, 02:11:59 AM
New engine update + using the new Unity editor
There was only a few things that needed to be fixed when updating to the newest version of unity (just one script thing I had to change)

An interesting thing that I looked at but did not do for this downloaded version. I found I might be able to delete certain sub-folders (the entire Library folder?) of this engine and Unity will recompile them when it loads up the engine. This would cut back on the download size (72.6m -> 44.6m), but since the overall size is not that high I did not worry about it this time around. I will do some testing and post back later.

RegalPrime - UnityEngine v1.4 - 8-8-15 - Created in Unity 5.1.2f1 Personal

Major stuff
New animation controller for the Guy. It uses the new things put in with Unity 5
- Looks and works better than before (hopefully everything is working ok)

Complete rewrite of all the 2d controllers for the guy (Was a complete mess and it needed to be done for a while)
3 new prefabs for the guy character
- Physics (no prechecks). This version exsists but should not be used. He will die from deadly objects slightly inside blocks.
- Physics with prechecks. Uses phyiscs forces to move the guy and uses preventive checks to deal with ground / wall / ceilings
- Pixel. This version using transforms to move the guy and also uses the prechecks
It shouldn't of changed much how the guy actually moves, but it allows me to change things more easily if I find out something new.
The script will give you a warning if you have the wrong editor settings for the Guy prefab's 'min penetration for penalty' value and tell you how to change it and to what value

New machine parent class / functions
- Start_Machine
- Stop_Machine
- Reset_Machine
- Reverse_Machine
- SpeedUp_Machine
- SlowDown_Machine
- Set_SpeedMultiplier

The following were updated / rewritten to be better scripted and contain the new machine functions (their parent class is Machine).
- Spike Chopper
- Spike Treadmill
- Rotate Forever
- Move object via waypoint (how platforms move)
- InOutSpikeConsecutive

The above are now in the machine type folder (both script and prefabs). This means that you can tell these prefabs to speed up / reverse / etc (any of the machine functions). Its was a lot more difficult to reverse some of these objects than I initially thought, so I ended up just starting over on some of the scripts so I didn't mess up trying to insert logic. Since the above objects now inherit the machine class, it is easy to create other scripts / prefabs / triggers to effect them.

I went through the entire cat game and made sure everything was fixed after messing with the new machine prefabs. There were some issues with the objects going back to default values or other problems. I think I fixed everything, but you never know.

Minor stuff
Fix a problem with the area modifier reverting changes when multiple area modifiers are next to each other
- Done by counting the number of active area modifers in a static variable.

Event Manager will now create itself if it is needed (for button presses)
- Some scripts now use the event manager to do the button presses instead of in their own script

Bullet grabs the material and the sorting layer from the guy character so that they are the same

Block trap now has a delay between how fast the sound can play between objects of its type
- Nobody likes 100x of the same effect being blasted withing half a second. Set to 1/10 the clips length delay

+other stuff dealing with Unity updates and various script things

Let me know if anything is amiss in this version. I may have missed something in the cat game scenes (did ~10 playthroughs and fixed things that came up).
Title: Re: RegalPrime-UnityEngine v1.4 - 8-8-15 - Engine update + new download
Post by: radicalero on August 16, 2015, 12:47:53 PM
Thanks for continue updating this awesome asset.
Title: Re: RegalPrime-UnityEngine v1.4.1 - 8-18-15 - Another engine update (mini oversight)
Post by: RegalPrime on August 19, 2015, 01:52:28 AM
Working on something a few days ago and I noticed I had a main prefab messed up.

The prefab 'Entire Room Setup', 'Entire Room Setup - Alt', and 'PlayerSpawnController' have the wrong guy prefab attached to it (GuyCharacterPrefab_Physics_aTEST). This means a test version of the guy prefab will spawn unless you change it to the 'GuyCharacterPrefab_Physics_Prechecks' prefab or the 'GuyCharacterPrefab_Pixel' version.
- In short, the prefab would spawn the wrong guy unless you changed it yourself.

- Spawns the 'GuyCharacterPrefab_Physics_Prechecks' guy as the default

I thought it was important enough to change this and re-release the engine. If you know what is going on in the engine you can just change the prefab yourself and not re-download it.

Overall I have been a bit lazy on doing stuff for this engine since the last release mostly because I hit a wall on what I should do. Finally figured I would work on dealing with larger based maps (multi-screens) and see where that will take me. Possible hub based maps as well.
Title: Re: RegalPrime-UnityEngine v1.4.1 - 8-18-15 - Another engine update (mini oversight)
Post by: ace11575x on November 24, 2015, 08:55:59 PM
Been having an issue with the guy " falling" on the last pixel of the box collider. I tried fixing this by tweaking the Colliderindent but this breaks more things than it fixes. got any ideas? image attached.
Title: Re: RegalPrime-UnityEngine v1.4.1 - 8-18-15 - Another engine update (mini oversight)
Post by: RegalPrime on December 31, 2015, 07:33:30 PM
Been kinda away from the engine for a while doing other things but I will try to give you some insight.

When I was building this part, sadly there is no easy way to calculate "what is ground / wall / ceiling" easily.
Min penetration for penalty (MPP) is how fat the colliders are. Remember this is for every collider in the game. So if you had a MPP of 1 pixel (0.01), then two object's colliders are touching if they are 2 pixels apart (even 2 colliders right next to each other are still considered touching). In order for something to be NEXT TO but not touching, you need to be 2.00001 pixels part for the objects in this case.

Imagine a box 32x32 pixels. "Behind" this box is a 32x32 pixel "deadly object." I need to be sure the guy can stand on the box without being instantly killed by the deadly object of the same size.

Here are the ingame settings for the guy.
To translate the below numbers into pixels you x100

Min penetration for penalty (MPP) - Is set in the physics 2d menu

ColliderBuffer - Is set in the actual script for the guy. Either "PlatformerCharacter2D_Pixel" or "PlatformerCharacter2D_Physics_Prechecks" at the top of the script. It will look something like.
"private float ColliderBuffer   = 0.011f;   // Closest distance you can get between two colliders"

The ColliderBuffer is used in the scripts to deal with when the character gets close to a solid object in order for him to move the correct shortened distance to that solid object (ie you dont want to move at the full speed when you are REALLY close to a solid object). In the example of the box and deadly object, there were times walking across such an example was fine, but when you jump and landed, the character would die due to physics, very slightly, clipping him into the deadly zone (this is how physics works and what the MPP buffer is used for).

Physics Version - "PlatformerCharacter2D_Physics_Prechecks"
Min penetration for penalty - 0.004f
ColliderBuffer - 0.011f

So, why the MPP value of 0.004f ?? Physics based movements need at least some buffer in order to calculate their physics stuff. This is the lowest tested value I was able to put it without odd things happening. So the buffer we need would be 0.004 * 2 + 0.001 = 0.009f.  If you want you could change the collider buffer to that value to lessen the chance of clipping. Why the value of 0.011f, I really dont remember, but I figured it was the best after testing and I left it at that. This was tested a few Unity versions ago so you never know how things might have changed. Remember that 0.01f is actually one pixel (quite the buffer) between objects.

Feel free to mess with both the MPP and Collider buffer values (always remember what the default values are though). Also, watch what happens when you lower the MPP near 0 (the physics version will start acting odd at times). Always make sure the ColliderBuffer is at least 2xMPP + 0.0001 though.

Pixel Version - "PlatformerCharacter2D_Pixel"
Min penetration for penalty -  0.0001f
ColliderBuffer - 0.0004f

0.0001f * 2 + 0.0001 = 0.0003f  (I used 0.0004 but the difference is almost nothing)
After all the explanation above you can see the pixel values are extremely small comparatively. "Physics" in this version are calculated via transforms in the script and not by Unity thus I have more control. Things are a bit more stable using this version.

You can always use the Pixel guy version for better accuracy and stability, but you will lose the ability to climb slopes. All you have to do is add the pixel version to the spawner and set the correct MPP (I believe it warns you in the editor if you didnt change the MPP value.

Finally there is one more value you can mess with in "CalculateChecks.cs"
This script deals with checking distance to solid objects (wall / ceiling / ground) and is used by any other script that needs it (even the AI).
"private float ColliderIndent = 0.009f;      // The slight indent of AoE checks to prevent false positives (if needed)"

This was put into the script many Unity versions ago just in case something I needed it (this was previous to being able to change the MPP). As you can see from the comment it deals with false positives. To tell you the truth, I dont know what the "correct" value for this should even be. I am not even sure anymore what making it 0 would do. Feel free to change it to see how it effects things (values between 0.000f - 0.050f).

These are the top few things that you can mess with that would help deal with this issue.
Hopefully you understand what certain values are and how they effect the engine.

Sorry for the late reply.
Title: Re: RegalPrime-UnityEngine v1.4.1 - 8-18-15
Post by: radicalero on January 01, 2016, 11:04:59 AM
Hi! When you calculate get next update?