Fangames > Engines

RegalPrime-UnityEngine v1.4.1 - 8-18-15

<< < (8/13) > >>

RegalPrime:
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.

https://www.mediafire.com/download/rl5wavilolbx6n7/Avoidance+Testing.zip
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.

FlyingTaoster:
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:

RegalPrime:
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)SV = This is the position of the song it skips to. It is also used as the offset counter for all the calls in that section.
The first variable in each function call is the delay in which it starts and since each coroutine runs separately, it need to subtract SV so it triggers at the right time.
So Creating the first circle happens at time (31.03 - SV) ( SV =  31.03). So it happens at 0s after the Phase 3 coroutine is called.
Not sure if this is the best way to set things up, but it makes things simple if I have to move functions around because the time to do an action is always the exact time in the song.

print ("PHASE 3");
float SV = 31.03f;
MusicController.control.SkipToPoint (SV);
Spawner3.MoveObjectToPoint (31.03f-SV, null, new Vector2 (-2, 0), 0);
Spawner4.MoveObjectToPoint (31.03f-SV, null, new Vector2 (2, 0), 0);

Spawner3.CreateShape_Circle (31.03f-SV, null, new Vector3 (-2, 0), 0.38f, 9, 0.5f, 0.5f, 1, true);
Spawner3.ChangeScale (34.73f-SV, null, 4, 4, 3.1f);

Spawner4.CreateShape_Circle (37.74f-SV, null, new Vector3 (2, 0), 0.38f, 9, 0.5f, 0.5f, 1, true);
Spawner4.ChangeScale (41.35f-SV, null, 4, 4, 3.1f);


Spawner1.CreateLine_ToFrom (44.36f-SV, null, new Vector2 (-2, -2.5f), null, new Vector2 (2, -2.5f), 0.38f, 5, true);
Spawner1.CreateLine_ToFrom (44.36f-SV, null, new Vector2 (-2, 2.5f), null, new Vector2 (2, 2.5f), 0.38f, 5, true);
Spawner1.BreakRandomly_Children (46.32f-SV, 0, 2);
Spawner1.ChangeAlpha_Children (46.32f-SV, 0, 0, 4);
Spawner1.Destroy_Children (50.32f-SV, 0);


Spawner3.RotateDegrees (46.32f-SV, null, 360, 1.45f);
Spawner4.RotateDegrees (46.32f-SV, null, -360, 1.45f);


Spawner2.CreateLine_ToFrom (47.87f-SV, null, new Vector2 (-2.5f, -2.5f), null, new Vector2 (2.5f, -2.5f), 0.38f, 5, true);
Spawner2.CreateLine_ToFrom (47.87f-SV, null, new Vector2 (-2.5f, 2.5f), null, new Vector2 (2.5f, 2.5f), 0.38f, 5, true);
Spawner2.BreakRandomly_Children (49.56f-SV, 0, 2);
Spawner2.ChangeAlpha_Children (49.56f - SV, 0, 0, 4);
Spawner2.Destroy_Children (53.56f - SV, 0);


Spawner3.RotateDegrees (49.73f-SV, null, -360, 1.35f);
Spawner4.RotateDegrees (49.73f-SV, null, 360, 1.35f);


Spawner1.CreateLine_ToFrom (51.21f-SV, null, new Vector2 (-2.5f, -2.5f), null, new Vector2 (2.5f, -2.5f), 0.38f, 5, true);
Spawner1.CreateLine_ToFrom (51.21f-SV, null, new Vector2 (-2.5f, 2.5f), null, new Vector2 (2.5f, 2.5f), 0.38f, 5, true);
Spawner1.BreakToTarget_Children (52.89f - SV, null, new Vector2 (0, 0), 0, 4);
Spawner1.Destroy_Children (56.89f - SV, 0);


Spawner1.Shoot_CircleBurst (54.90f-SV, null, new Vector3(-1, 1), 15, 2, 3);
Spawner2.Shoot_CircleBurst (55.75f-SV, null, new Vector3( 1, 1), 15, 2, 3);
Spawner1.Shoot_CircleBurst (57.25f-SV, null, new Vector3( 0, 0), 15, 1.5f, 3);
Spawner2.Shoot_CircleBurst (57.25f-SV, null, new Vector3( 0, 0), 15, 2, 3);

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#.

RegalPrime:
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)MoveObjectToPoint - Takes an object and moves it to a particular position over X seconds

FollowTarget - Takes an object and makes it follow another target object
Stop_FollowTarget - Stops the above coroutine

WaveEffectObject - Makes an object move in a sin wave effect depending on variables
Stop_WaveEffect - Stops the above coroutine

RotateDegrees - Rotates an object X degrees over Y seconds. Can also rotate forever.
Stop_ForeverRotate - Stops the above coroutine

RotateToDegree - Rotates an object to a certain degree over X seconds (either clockwise / counterclockwise direction)

RotateTwordsPoint - Makes an object look in the direction of another object. Can also forever "look at"
Stop_RotateTwords - Stops the above coroutine

RotateAroundPoint - Makes an object rotate around another object.
Stop_RotateAround - Stops the above coroutine

ChangeScale - Changes the scale of an object over X seconds

ChangeColor - Changes the color of an object over X seconds. Can change it randomly / constant random color change as well.
StopColorChangeEffect - Stops the above coroutine

ChangeAlpha - Changes the alpha of an object (fade / unfade effect)
ObjectCreation.cs script
(click to show/hide)Pooling stuff - Efficiency code so it reuses objects instead of deleting and creating them again. Can turn off.

The below Set_coroutines deal with how objects are spawned.
SetEnablePooling - Allow for repooling of objects?
SetProjectile - Set the object that will be spawned
SetColor - Set the color of the spawning object
SetColor_Random - Makes objects spawn at random colors
SetKinematic - Are the objects kinematic?
SetGravityScale - Sets the gravity multiplier of the spawned objects

The calculate functions are the one stop shop for other functions to get data on how to make certain shapes. They will return certain positions based on input values.
IEnumerable<Vector3> Calculate_Line - Returns the location of each object on a certain line
IEnumerable<Vector3> Calculate_Circle - Returns the location of each object on a circle
IEnumerable<Starting_EndingPoint> Calculate_Square - Returns the starting and ending point of each leg on a square.
IEnumerable<Starting_EndingPoint> Calculate_Polygon - Returns the starting and ending point of each leg on a polygon.
IEnumerable<Vector3> Calculate_PolarCurve - Returns the location of each object along a polar curve.

All of the below creation coroutines create a shape out of individual objects (much like you see in avoidance bosses).
They have a lot of variables to deal with startdelay, spawn rate of individual objects in a set, size, etc.
There are variables that deal with the curvature / indents of a line as well. So a line can be a curved line or a square / polygon can have curved edges.
CreateLine_ToFrom - Creates a line between 2 points containing X objects.
CreateLine_InDirection - Creates a line at a point in a certain direction of a certain length
CreateLine_MultiLines - Creates an X legged object.

CreateShape_Circle - Creates a circle shape out of X objects.
CreateShape_Square - Creates a square shape out of X objects.
CreateShape_Triangle - Creates a triangle shape out of X objects.
CreateShape_Polygon - Creates a polygon shape out of X objects. This deals with things from n-sided polygons to star shapes (using the leg skip variable)
Create_PolarCurve - Spawns objects along a polar curve
Create_PolarCurve_abcoskt - Takes inputs to use the polar formula r=a+bcos(kt) (polar rose, this shows some designs you can do  https://en.wikipedia.org/wiki/Rose_%28mathematics%29)
Create_PolarCurve_Heart - Uses the polar formula that creates a heart shape (spacing on the certain X object spawn looks wonky at times)
Create_PolarCurve_Spiral - Uses the polar formula that creates a spiral shape

All morph coroutines take in a list of gameobjects and morphs them to a certain shape over time.
MorphTo_Line_GameObjectList
MorphTo_Circle_GameObjectList
MorphTo_Square_GameObjectList
MorphTo_Polygon_GameObjectList
MorphTo_PolarCurve_GameObjectList
MorphTo_PolarCurve_abcoskt_GameObjectList
MorphTo_PolarCurve_Heart_GameObjectList
MorphTo_PolarCurve_Spiral_GameObjectList

Destroy_GameObjectList - Destroy a set of gameobjects
Destroy_GameObjectList_CircleBurst - Destroy a set of gameobjects, but spawn a circle burst in each objects place.

Change coroutines are the same as above, but effect an entire set of objects instead (like changing the color of all the objects in a square)
ChangeAlpha_GameObjectList
ChangeColor_GameObjectList
ChangeScale_GameObjectList
ChangeKinematicState_GameObjectList
ChangeGravity_GameObjectList

WaveEffectObject_GameObjectList - Causes a wave effect on each object in a list (will increment each object to create a consistent wave effect over each consecutive object)
BreakToTarget_GameObjectList - Causes every object in a list to be thrown at a certain point.
BreakRandomly_GameObjectList - Causes every object in a list to be thrown in a random direction.
StopVelocity_GameObjectList - Stops every object in a list from moving.

RotateDegrees_GameObjectList - Rotates all objects in a list
RotateTwordsPoint_GameObjectList - Causes all objects in a list to look at a target.

All of the below are spawner functions. They shoot objects.
Shoot_AtTarget - Shoot X objects at a target
Shoot_FollowTarget - Shoot X objects that follow a target.
Shoot_RandomSprayBounce - Shoot X objects that bounce off of the ground (or even each other)

Shoot_RandomSprayOutwards - Shoots X objects randomly outwards from a certain point
Shoot_SprayInDirection - Shoots X objects in a general direction
Shoot_CircularSpray - Shoots X objects circularly outwards
Shoot_WaveSpray - Shoots X objects so that it creates a wavy like line (will continue to do the wave effect over its life)
Shoot_FromScreenEdge - Shoots X objects in certain direction that originate from the edge of the screen.
Shoot_CircleBurst - Creates a circle of objects that expand outwards at a certain point.
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)Custom_SingleExpandEffect - Creates a single object, expands it enormously. While expanding it will change color and drop its alpha to 0 over time. Then it destroys the object.
Nothing that fancy. I used it in my avoidance fight where it spawned a non-deadly object. Also has an overloaded function call that randomly chooses its spawn location somewhere on the screen.

Custom_CircleBurstEffect - Creates a circle burst at a location. After X seconds, it stops all of those objects from moving. After X more seconds, it destroys every object and spawns a circle burst in its place. Also used in my avoidance fight.
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.

RegalPrime:
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.
https://www.iwannacommunity.com/forum/index.php?topic=1150.msg10687#msg10687

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)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version