Author Topic: RegalPrime-UnityEngine v1.4.1 - 8-18-15  (Read 31053 times)

RegalPrime

  • Wannabe
  • Posts: 37
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
  • Playstyle: Keyboard
RegalPrime-UnityEngine v1.4.1 - 8-18-15
« on: August 02, 2014, 02:53:13 AM »
Patch notes for this version
https://www.iwannacommunity.com/forum/index.php?topic=1150.msg13017#msg13017


RegalPrime - UnityEngine v1.4.1 - 8-18-15 - Created in Unity 5.1.2f1 Personal
https://www.mediafire.com/download/kj9lknrls7pl86w/RegalPrime+-+UnityEngine+v1.4.1.zip


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
https://www.mediafire.com/download/9na2q7cc6ig8ycq/I+Wanna+Help+the+Cat+v1.3+-+Pixel.zip
https://www.mediafire.com/download/g26agm2t1pzx0rc/I+Wanna+Help+the+Cat+v1.3+-+Physics.zip

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
https://www.mediafire.com/download/rl5wavilolbx6n7/Avoidance+Testing.zip
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)
« Last Edit: December 31, 2015, 07:33:49 PM by RegalPrime »

13lueWolf

  • Wannabe
  • Posts: 16
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 32.0 Firefox 32.0
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine
« Reply #1 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.)
« Last Edit: August 02, 2014, 02:34:27 PM by 13lueWolf »

RegalPrime

  • Wannabe
  • Posts: 37
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine
« Reply #2 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.

OhNoezEinPandy

  • Spike Dodger
  • Posts: 202
  • OS:
  • Linux Linux
  • Browser:
  • Chrome 36.0.1985.131 Chrome 36.0.1985.131
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine
« Reply #3 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!

patrickgh3

  • Spike Dodger
  • Posts: 169
  • stay optimistic! :D
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 31.0 Firefox 31.0
    • View Profile
    • Github
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine
« Reply #4 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).

13lueWolf

  • Wannabe
  • Posts: 16
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 32.0 Firefox 32.0
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine
« Reply #5 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.

RegalPrime

  • Wannabe
  • Posts: 37
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine
« Reply #6 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.

Kyir

  • The Kid
  • Posts: 293
  • Normal Guy
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine
« Reply #7 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
« Last Edit: August 03, 2014, 07:49:01 PM by Kyir »

13lueWolf

  • Wannabe
  • Posts: 16
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 32.0 Firefox 32.0
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine
« Reply #8 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.

ace11575x

  • Wannabe
  • Posts: 3
  • Looking forward to streaming IWannas!
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
    • Twitch Stream
Re: TestGuy - Unity Fangame Engine
« Reply #9 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.

RegalPrime

  • Wannabe
  • Posts: 37
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.125 Chrome 36.0.1985.125
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine
« Reply #10 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.
« Last Edit: August 08, 2014, 06:11:14 PM by RegalPrime »

RegalPrime

  • Wannabe
  • Posts: 37
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.143 Chrome 36.0.1985.143
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine - 8-15-2014 Update
« Reply #11 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)
« Last Edit: August 19, 2014, 02:15:47 AM by RegalPrime »

RegalPrime

  • Wannabe
  • Posts: 37
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.143 Chrome 36.0.1985.143
    • View Profile
  • Playstyle: Keyboard
Re: TestGuy - Unity Fangame Engine - Pixel Perfect dream is real
« Reply #12 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.

RegalPrime

  • Wannabe
  • Posts: 37
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 36.0.1985.143 Chrome 36.0.1985.143
    • View Profile
  • Playstyle: Keyboard
Re: Unity Fangame Engine - 8-29-2014 - Dynamic objects script
« Reply #13 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)
« Last Edit: August 29, 2014, 05:40:09 PM by RegalPrime »

RegalPrime

  • Wannabe
  • Posts: 37
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 37.0.2062.103 Chrome 37.0.2062.103
    • View Profile
  • Playstyle: Keyboard
Re: Unity Fangame Engine - 9-XX-14 - Weekly Patch Delay
« Reply #14 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)