Search Unity

[RELEASED] Corgi Engine - Complete 2D/2.5D Platformer [new v7.0 : procedural gen, sound mgmt...]

Discussion in 'Assets and Asset Store' started by reuno, Dec 18, 2014.

  1. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    @reuno, I make a new project and import but i dont see AI in the level2. Also I check in the prefabs/Enemies if there is the AI but is not.
     
  2. killerbake

    killerbake

    Joined:
    Jan 29, 2015
    Posts:
    8
    Picked this up a few days ago after creepin' on the store and forums for a few weeks. Very excited to dive into 1.3 later today and give it a good one over. Thanks for taking the time to do something other people have failed to do. I can't wait to start!
     
  3. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @Mr.Stein > That's super weird. I just checked and the AI (which is actually a prefab called Follower, located in the prefabs/AI folder) is at the start of Level2 (like in the demo). Silly question probably, but have you updated the package ? Maybe try downloading it again ? It's probably a download issue, because if you check the list of files included in the package on https://www.assetstore.unity3d.com/en/#!/content/26617, at the very bottom you'll see the prefabs folder and the Follower prefab is actually in it. Let me know how it goes.
    @killerbake > I hope it'll live up to your expectations, thanks for buying it :)
     
  4. chiquitae126

    chiquitae126

    Joined:
    Oct 21, 2012
    Posts:
    8
    @reuno just picked up this asset 10 mins ago, very new to game development. Extremely new to coding, looking to create a mobile game with as little coding as possible. Hoping to just create my levels by dragging and dropping my own artwork. Hope this does the trick.
     
  5. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @chiquitae126 > Well you definitely can. You can start by replacing assets in the /sprites folder with yours.

    To all > I checked and I must have made a mistake when uploading 1.3, as the code documentation didn't get included. I've tried including it but for some reason it doesn't work, so hey, I put it online.
    You can access it over there http://reuno.info/unity/corgi-engine/docs/
    Remember there are a lot more comments in the actual code, so check that too if you're in trouble!
    Again, sorry about this delay.
     
  6. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    okay @reuno i will try update and import again.

    thx
     
  7. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    @reuno, very very very very great work.. i will prepare the review for the store tonight.

    Regards,
     
  8. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @Mr.Stein > So I guess updating again fixed the problem ?
     
  9. Mr-Stein

    Mr-Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    yes @reuno thx very much, and great work..

    Regards,
     
  10. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    You're welcome! I'm really happy you like it.
     
  11. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    Maybe like 30 to 50?
     
  12. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @TheValar > Alright, I've added 50 blue robots to level 3. Here are 2 screenshots, before (level 3 as it is in the demo, with only one or two robots), and after (50 robots) :

    (full image over there : http://cl.ly/image/1P2o1C2a2Y2q)

    It's hard to give you exact numbers as the FPS isn't really constant, but I haven't seen any real difference. It's really smooth and it was actually funny to fight that many enemies in such a close space. Plus some of them were bouncing on that jumper thing so we all had a good time.
     
  13. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    @reuno Awesome I like what I'm hearing/seeing! Obviously it's not the perfect measure of performance but essentially no hit on fps seems like a good sign to me :D I will definitely be picking this once the funds become available (releasing my current project 2/12 so hopefully I'll have money soon lol).

    On a side note a seriously appreciate the quick feedback and you going as far modifying a demo scene to answer my question!
     
  14. killerbake

    killerbake

    Joined:
    Jan 29, 2015
    Posts:
    8
    @reuno Those DOCS are amazing. Very detailed! I'll have my review up tonight after I go through all your code! Can't wait to see what you have in-store for dialogue. I've been looking at PixelCrusher, but wondering what you might have in store.
     
  15. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,345
    Jumpthrough slopes seem to work nicely -- however, there are a few things I seem to be having issues with in the Demo:

    1) Your character doesn't stay "attached" to the slope when walking down it (probably a simple fix, but could very well break gameplay in cases where jumping on the spot is critical!)

    2) Jumping and movement seems jerky at times in the Demo -- it seems my controls lag the longer I keep buttons (on the keyboard) held down (it gets to the point where it's impossible to even walk or jump! -- but, after a few minutes, the game performs my actions again almost exactly as if they're "catching up" to my old keyboard input -- may have something to do with key repetition and events perhaps?) It doesn't seem to have anything to do with the application / memory / cpu / hardware -- as everything else seems to be moving and animating smoothly, including the enemies -- it must be the code. Very game-breaking indeed. :(

    3) Not fond of the jumping style -- is there an easy way to change this? I'd like to be able to swap from between a Mario style all the way to a Megaman style. I don't mind programming this myself, but I can't seem to download the documentation (maybe offer a zip file or something for someone who prefers to have it locally?)


    Definitely hope Spine support will be in soon! I enjoy Unity's animation system, but Spine has much nicer features! Thank you for working so hard on the slopes though man! Definitely worth the price tag if you fix the aforementioned issues! :)
     
  16. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    Pretty sure you will have to tweak things for point #3. Every platformer is likely going to have its own jumping constraints and parameters and it's impossible for a kit to just 'switch between Mario style to Megaman style' as even those games have differences depending on which one you're playing.
     
  17. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,345
    @Exeneva
    Not impossible at all -- I've done it actually. I'll give some insight on my methods when I get more time. It wasn't as much of a 'switch between' as much as it was giving you complete control over the physics of vertical motion (minus platform handling and collisions).

    Like I said, I'll put my process later.
     
    Exeneva likes this.
  18. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    I'm very interested in hearing this! reuno likely also, especially if your solution is quite elegant.
     
  19. snake77jt

    snake77jt

    Joined:
    Dec 23, 2014
    Posts:
    46
    Hey i got a quick question, sorry if its off topic lol. How long did it take you to create the artwork for both the platforms and the main character itself?
     
  20. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @killerbake > Glad you like it!
    @awesomedata > 1 - that's true, so far I haven't been able to improve that. And I know some of you have a strong passion for slopes, so I guess I'll keep trying. 2 - That's weird, I can't reproduce it ? Are you trying in editor ? On the web demo ? 3 - I'm interested in hearing how you did this :)
    @snake77jt > The platforms took around 2-3 hours I'd say. The character took like 1 hour to draw, and 4 or 5 to animate, all in all.
     
  21. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    Hmm, sounds like I might need to hire reuno for some vector art :p
     
  22. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Hi reuno,
    your version 1 3 is !!! ; with few modifications , i have this:



    Thanks.
     
  23. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @sefou > nice ! Thanks for sharing, it's really awesome to see what you guys come up with.
     
  24. chiquitae126

    chiquitae126

    Joined:
    Oct 21, 2012
    Posts:
    8
    @reuno in the future will there be anything added to this package that shows the progress of the player as far as which level they're currently on?
     
  25. killerbake

    killerbake

    Joined:
    Jan 29, 2015
    Posts:
    8
    @reuno I have three suggestions.
    1. After a "weapon upgrade" is picked up, the player should have the ability to switch between the different weapons. (this is probably something you'll implement in the inventory system)

    2. When the next level is loaded, it should remember what weapon the character had last used, plus the credits he earned etc. Basically so the character can progressively upgrade through out the entire game and not start defaulted at the beginning of every level.

    3. Ammo! Would be nice if the character could run out of Ammo and resort to having to use the melee attack until more ammo is picked up for the specific weapon.

    Left my review on the Asset Store, can't wait to see the future of your engine! (and my game)
     
  26. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @chiquitae126 > You can easily add this right now yourself if you want to, but I think it's a valuable and generic addition. I'll add that to the todolist, thanks!
    @killerbake > Thanks for the review! A few things about your suggestions :
    1 - there's already a function in the code to change weapons. If memory serves, it's called ChangeWeapon or something like that, in CharacterBehavior.cs. Just bind a button to it, and check what parameters it requires. I haven't done it myself as most buttons are already bound to something.
    2 - Same here, the GameManager is a persistent singleton. Right now it remembers points, but you can easily improve on it and make it "remember" whatever you want.
    3 - Ammo may come later. The first thing I've added to the next release is jetpack fuel. You could pick up on that and implement ammo in the same way.

    As I've said before, my goal with this asset is to provide you all with a way to create your dream game. But to keep things simple and easy enough for beginners, I try not to add EVERYTHING, otherwise it'd be completely huge and unmanageable. By adding a little of each generic feature, I aim at providing patterns you can then reproduce and expand on.
     
  27. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    Good news everyone, I've just tried the Corgi Engine on Unity 5 and it works like a charm. When opening the project Unity5 proposes to convert it, and it does the trick in a few seconds. I'll include these changes to 1.4. In the meantime, if you switched to Unity5 already, know that you can simply let it convert the project for you :)
     
    KeepTrying and Exeneva like this.
  28. snake77jt

    snake77jt

    Joined:
    Dec 23, 2014
    Posts:
    46
    how do you add a death animation, and a getting hit animation?
     
  29. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    snake77jt likes this.
  30. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @snake77jt > As @Exeneva said, this is really a "how to use unity" question. Basically you need to add new animations to the animator and add new animator parameters to detect hit and death.
     
    Exeneva likes this.
  31. csotomon

    csotomon

    Joined:
    Apr 28, 2012
    Posts:
    20
    @reuno good job with the 1.3 version.

    Do u have some ideas how can a create a enemy that i can destroy jumping over the head like mario games?
     
  32. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @csotomon > I guess I could add that to the next release. If you want to do it yourself, basically what you'd need to do is check for collisions from above on the enemy. If what's colliding from above is the player, then kill the enemy.
     
  33. csotomon

    csotomon

    Joined:
    Apr 28, 2012
    Posts:
    20
    How can i detect the collision side using your controller class?

     
  34. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    Add an invisible game object to your enemies (as a child object) that is positioned near their head. Then check for collision or overlap.
     
  35. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Not only :"colliding from above <=> kill the enemy" !
    If you add this (very important) option sometimes we have to collide 2 times or more on the head of the enemy following a strong enemy or not. So it's better to add a value too for the number of hurts before destroying, please...

    6R
     
  36. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @csotomon > Your enemy object needs a collider2d (no need for more than one), and a CorgiController2D component.
    Then just check for the enemy's controller's state IsCollidingAbove. And as @p6r said, you can go further and define the number of jumps required to kill it.
     
    Exeneva likes this.
  37. awesomedata

    awesomedata

    Joined:
    Oct 8, 2014
    Posts:
    1,345
    @reuno
    Just had a chance to reply to each point finally:

    1) I hope to see this working. I would think a raycast downward is all you'd need after checking whether a person is on the ground or not and first processing any upward slope movements (then processing the downward slope motions keeping the player touching the ground until jump is pressed or the player is 2 world units above the slope or more)

    2) Regarding the jerkyness, I was using the webplayer Demo for 1.3 to test this on Windows 8.1 on a USB keyboard through Firefox. It works smoothly at first, but after a while (maybe 5 mins) of playing, the jump starts becoming weirder and weirder (he starts jumping shorter and shorter, probably with the jump style, and the movement stops being as responsive until it just gets uncontrollable). It *may* have to do with my CPU trying to keep up since I'm on a tablet PC (lenovo thinnkpad tablet 2) and it doesn't have a *ton* of memory or power, but you'd want your game to run on slower / weaker machines, so the engine behind your game shouldn't be the bottleneck -- it should work on a reasonable machine (which I'm able to easily run Unity itself reasonably well, so I would think the webplayer demo should work too, right? It really seems like whatever input management system is behind the scenes is storing up the input for later use (instead of just ignoring it if it can't be processed) and replaying all the commands back at once under heavy CPU load for some reason. This happened in your other demo too. Anyone else having similar issues?

    3) Mario style jumping to Megaman style jumping:

    The way I did this was pretty simple really -- I used a number of separated values to control the vertical speed rather than just increment a single value and, depending on the style of jump I wanted, I decremented upward velocities based on what I called a "jump curve" which, really, was nothing more than a value used to shrink the upward velocity by a fractional percentage each game step, including or excluding gravity depending on the amount of time (and the upward speed) I gave for the upward force to be added each game step.

    Here's pretty much the basic variables I used:

    jump_curve
    gravity
    vertical_speed
    maximum_fall_speed
    jump_time_remaining
    jump_speed

    (optional:)
    launch_speed,
    jump_speed_curve,
    doublejump_launch_speed

    The process was pretty much this in a nutshell:

    1. Move the player upward by vertical_speed each game step as long as vertical_speed continues to be above some cutoff value (in my case, negative vertical speed was upward movement, and I cut it off usually around -2 game units, though this may vary in Unity, so I suggest tweaking this value.)
    2. If the cutoff value for vertical_speed was reached, jump_time_remaining must be set to 0, as it represents the number of game steps a player can still continue upwards at the speed of vertical_speed, and, as such, you can set jump_time_remaining to a higher value for a higher jump (assuming you want more of a megaman-style jump).
    3. Decrement jump_time_remaining each game step and reset it to 0 when you're on the ground or when you've used a double-jump so you can have full upward-movement
    4. You can add gravity each game step to simulate downward movement, but use maximum_fall_speed to keep your character from rocketing through the ground collisions. Not only does this look and play nicer, it also keeps you from having to resolve stupid-fast collisions.
    5. If you want more of a Mario style jump, here is where you can ignore gravity for the upward motion (if you desire to have accurate calculations in the 'curve' of your jump) and re-enable it once you are considered 'falling' (in my case, my vspeed had to be greater than -2 for me to be considered falling) and use a jump_curve to calculate it instead.
    6. For the Mario jump, instead of using gravity to calculate your vspeed while going upward, you simply calculate your upward vspeed (vertical_speed) by dividing it by your jump_curve each step of the game, which will shrink your upward motion smoothly, which effectively is 'curving' the speed until it's close enough to 0 that you're considered to be falling, giving a nice smooth gradual 'stop' to the top of your jump.
    7. It is important to note that the longer it takes you to curve your jump, the less jump_time_remaining you should generally use, unless you want a really really high jump -- While a higher jump_curve value makes a prettier and smoother transition to falling (in contrast to stopping immediately in a megaman-style jump and falling instantly when you release the button), it adds more steps that your jump_speed is added to your upward vertical_speed and thus, you may want to indicate a separate launch_speed for the initial ground kick-off force, and use jump_speed to add to each game step while you're n the air. You can also gradually decrease jump_speed alongside vertical_speed while moving upward and using the jump_curve to smooth it (adding a jump_speed_curve value to shrink the jump_speed will help a lot with doing this smoothly alongside the vertical speed smoothing of the jump arc). Using a separate doublejump_launch_speed will allow you to set a weaker initial speed for aerial jumps performed if you desire -- really allowing you to customize.
    8. Lastly, one important tip is to keep the initial settings of the jump saved somewhere for easy access by the user (and the physics system) so that the user and/or physics system can modify temporary copies of these values and reset them when they're done (in the case of changing states in an action game that needs special vertical physics for, say, a special type of rocket, springboard, or jump).
    Hopefully that explains it pretty straightforwardly. It's a robust system, but it's very simple to implement. It just takes a few value tweaks to understand how to get the type/style of jump you want, but I've gotten everything from Megaman to Super Mario Bros. 1-3 style jumps with slight variations in jump_speed and jump_curve (for megaman, you set jump_curve to next to nothing, and increase jump_time_remaining -- for mario, you set jump curve higher and decrease jump_time_remaining -- and, for anything else, you just tweak to your hearts desire). I used this system back in the day for the Zero Engine, and people seemed to love it. As an FYI, I'd be willing to program it for you in Unity for a free copy of the Corgi Engine! ;D (It's not like you haven't got everything you need to do it yourself spelled out right here, though one can at least try, right?! :) )
     
  38. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @awesomedata > Thanks for your feedback!
    1 - it's in the todo list
    2 - I can't reproduce it, even on a very slow laptop here. The input manager doesn't store anything. If others manage to reproduce it, I'll dig deeper, but right now you seem to be the only one to report this.
    3 - that's very detailed, thanks. So far I haven't had requests for changes in the jump system, but if it arises, I'll add that.
     
  39. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
  40. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @Exeneva > There are already jump through platforms, and jump through slopes. Interesting approach, I went a completely different way. Thanks for sharing!
     
    Exeneva likes this.
  41. chiquitae126

    chiquitae126

    Joined:
    Oct 21, 2012
    Posts:
    8
    @reuno any suggestions on how to add in-app purchases in the corgi engine?
     
  42. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @chiquitae126 > well the Corgi Engine provides a basis for a platformer game. In-app purchases are really outside the scope of it. I guess there are assets for that ? I really don't like in-app purchases, and tend to stay away from them, so I really don't know.
     
  43. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    425
    100% agree with reuno here, it's better to keep Corgi Engine within the scope of its goals. No need to reinvent the wheel. If you are serious about IAP, I recommend the Unibill app. It is pricy but it is targeted towards very serious developers.
     
  44. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    @reuno
    Hello friend, i'm ready to buy Corgi Engine, can you help me to
    transform my "3D Collision Code" in "2D Collision Code" ?
    My game is already coded, i just need to "Transform" the code to
    work with your 2D engine, you set your price and here we go.
    Many thanks in advance.
     
  45. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @KeepTrying > If you have a specific question I'll be happy to help, but I won't have time to rewrite your project, if that's what you're asking :)
     
  46. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Awesome plugin; probably the best 2d platform out there. Félicitations !

    However; i have some issues just to ... get started.

    I wanted to use it for a 'pixel art' game. I'm having a lot of troubles just to get started; may i mention i'm starting from a blank project and not from the minimal level.

    I can't get anything to work properly; can you provide with a simple guide/howto/wiki to get started ? Like a minimal set of scripts and objects to get it work so i can build on top of it ? Looking at your nicely commented source doesn't tell me where to get started.

    edit: something like :
    1. Drag prefab "player" on stage
    2. Remove Main Camera and drag to Project
    etc etc


    Sorry in advance for my n00b'ness, merci par avance !
     
    Last edited: Feb 18, 2015
  47. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @PeteLaChatte > The guide/wiki/howto is coming, but I wouldn't expect it too soon. More like in a month or two.
    In the meantime, I'd suggest looking at how the minimal level works. It's called the minimal level for a reason. It contains the minimum stuff you need to get a level working. You can of course hack stuff off of it, but you'll have to modify the code to do so.
    So really, even if you want a pixel art game (or any style), the minimal level is how you should start. Look at what it contains, check what the classes do, and you should be on the right track.

    To give you a head start :
    - you need the GameManagers prefab in your scene. It combines input manager, game manager, and sound manager. Your character won't move without that.
    - you need the UICamera prefab, that displays the avatar/healthbar/points. I guess I could make this optional in the next release, but right now you need it.
    - you need the MainCamera prefab for obvious reasons. You can of course modify it, remove the background, etc...
    - then you'll need a LevelManager. It will spawn the player. The minimal level scene contains a Level group with platforms, and a LevelManager object, with LevelBounds (also required) in it.
    - then you need a Player prefab. Look at the included player prefab to see what it needs.

    Other stuff you might need to know to start :
    - right now the player prefab must be tagged with the Player tag (I've removed that requirement in the upcoming 1.4, but in the meantime, it needs the Player tag and the Player layer).
    - if you want your character to walk on your platforms, they need to be on the Platforms layer. A (simple) platform is just a sprite with a Polygon/Box/Whatever Collider2D attached. No trigger, and on the Platforms layer.

    I hope this will help, let me know if you have other questions.
     
  48. KeepTrying

    KeepTrying

    Joined:
    Feb 23, 2011
    Posts:
    119
    @reuno you don't need to "rewrite" the entire project, i just want your help to setup a few things based in my code.
    You will be paid for that :)

    - Level Select Screen / Locked n Unlocked Levels
    - Portals / Warps
    - Destructible Blocks
    - Jump Springs
    - Time Based Score
    - Coin Based Score
    - ...
    My game has all that code already built, as far as i can see, your Engine got tons of Ready-to-Go stuff like that.
     
    Last edited: Feb 18, 2015
  49. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    @reuno> wow that was a pretty fast reply. Thanks ! I figured out. I didn't see that the LevelManger did contain the Level Manager script. Maybe it should be a Prefab ? Merci !
     
  50. reuno

    reuno

    Joined:
    Sep 22, 2014
    Posts:
    4,383
    @PeteLaChatte > Hard to make it a prefab, as it will typically change every level.
    @KeepTrying > I'm sorry I'll have to pass on the offer, for a few reasons : I don't have the time, I already have tons of contract work I need to do, and I'm probably out of your price range. Sorry :)
     
unityunity