Search Unity

Games WIP Small Works Game / Programming Thread

Discussion in 'Projects In Progress' started by Tim-C, Aug 6, 2012.

  1. BrendanKZN

    BrendanKZN

    Joined:
    Jun 22, 2011
    Posts:
    157
    Hello, I have made a video below of my current WIP. I have recently added art and textures so it's not this bland. Just showing some of the features of my game. (Video quality is not that great, if anyone has tips for achieving better video recordings, please PM me.)
    I'll update my WIP thread this afternoon.

     
  2. thomasfn

    thomasfn

    Joined:
    Mar 30, 2013
    Posts:
    2
    Working on adding Jitter Physics to Unity as an alternative to Unity's built in physics engine.



    Here you can see a simple scene I created using cubes. The walls and floor are all static, and the cube in the middle bounces off the walls and stuff. You also see the debug drawer mode enabled in the editor view - all meshes and stuff are highlighted with red lines, which is quite useful for making sure Jitter is synced up with Unity.

    Advantages of using Jitter over Unity's physics:
    - More efficient and faster - you can use multi-threading to make the most of multi-core platforms
    - Control over everything - Jitter is open source, so you can code your own extensions to it
    - Rewind and replay techniques for server authoritative networking are viable (this is the main reason I'm making this)
     
  3. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    After 1.5 days I've successfully ported a Chip-8 emulator to Unity :D It is slow, but I think that is due to my renderer using set pixel... Not sure how I can fix that though... anyway later today I will hopefully release a version with input and physical cartridges that can be put into a socket on an emulator... it gone be awsome!... Oh, and it will be open source once I'm done with my test build :)

    $ScreenShot.png
     
  4. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    Asvarduil:

    Can you describe exactly what the behaviour you want is?

    One way is to not disable the x-axis movement, but add an upward force for the jump, which means the character can jump in place, move forward, backwards or even change direction mid-jump. Some people find this unrealistic, as you are really flying father than jumping. Others have it that a single jump has one characteristic (short jump) and pressing the jump button twice makes the character jump twice as far/high.

    What you do you want to see as your final behaviour?

     
  5. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    The behavior I am going for:

    -Player presses the Jump button to perform a jump.
    -The height of the jump corresponds to how long the jump button is held.
    -When the jump button is released, the player will begin to fall.
    -At the apex of the jump, player input to the Jump button will be ignored.
     
  6. AustinK

    AustinK

    Joined:
    Dec 10, 2012
    Posts:
    86
    Code (csharp):
    1.  
    2. if (Input.GetButtonDown("Jump")  !falling) {
    3.      // Transform the y position here, but still taking into account the player's x and z positions
    4.      // if those were manipulated elsewhere in code.
    5.      someGameObject.transform.position = new Vector3(someGameObject.transform.position.x,
    6.                                                                                  jumpOffest,
    7.                                                                                  someGameObject.transform.position.z);
    8.  
    9.      // If the player reached the jump apex within this frame, next fram they should begin falling.
    10.      if (someGameObject.transform.position.y >= jumpApex)
    11.           falling = true;
    12. } else if (Input.GetButtonUp("Jump")  !falling { // If the player has let go of the jump button, they should begin falling.
    13.           falling = true;
    14. }
    15.  
    16. if (falling) {
    17.      // If you're not using gravity, then put some falling code here. Do not set falling
    18.      // back to false until player is grounded.
    19. }
    20.  
    21.  
    So this could probably be prettier, but I gave it a quick shot. But, is this kind of what you wanted?
     
  7. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    Pretty much. When I get home, I'll have a go at it with that logic.

    By the by - thanks for showing me Input.GetButtonDown/GetButtonUp. I was checking the Input.GetAxis method in my code, but down/up will make my controls more crisp...

    EDIT: Uploaded a new webplayer. The jumping feels a bit off to me somehow, still, even after revising both the player input and physics with a version of the code above, and changing from using FixedUpdate to Update.

    Pretty much, my jump code looks like this now:

    PlayerControl.cs:
    Code (csharp):
    1.     private void JumpControl(ref string animation)
    2.     {
    3.         if(Input.GetButtonDown("Jump")
    4.             _isFalling == false
    5.             _movement.isGrounded)
    6.         {
    7.             _movement.PartialJump();
    8.         }
    9.        
    10.         if(! _movement.isGrounded)
    11.         {
    12.             animation = _facingRight ? jumpRight : jumpLeft;
    13.             _isIdle = false;
    14.         }
    15.        
    16.         if(_movement.AtJumpApex)
    17.             _isFalling = true;
    18.        
    19.         if(! _isFalling  Input.GetButtonUp("Jump"))
    20.         {
    21.             _movement.HaltJump();
    22.             _isFalling = true;
    23.         }
    24.        
    25.         if(_isFalling  _movement.isGrounded)
    26.             _isFalling = false;
    27.     }
    SidescrollingMovement.cs:
    Code (csharp):
    1.     public void Update()
    2.     {  
    3.         isGrounded = _controller.isGrounded;
    4.        
    5.         if(! _controller.isGrounded)
    6.         {
    7.             _moveVelocity.y += Physics.gravity.y * Time.deltaTime;
    8.             if(Mathf.Abs(_moveVelocity.y - 0.0f) < 0.1f)
    9.             {
    10.                 Debug.Log (gameObject.name + " is at the apex of a jump!");
    11.                 AtJumpApex = true;
    12.                 HaltJump();
    13.             }
    14.             else
    15.             {
    16.                 AtJumpApex = false;
    17.             }
    18.         }
    19.        
    20.         CollisionDirection = _controller.Move(_moveVelocity * Time.deltaTime);
    21.     }
    22.  
    23.     public void Jump()
    24.     {
    25.         if(Time.time < _lastJump + jumpLockout)
    26.             return;
    27.        
    28.         if(! _controller.isGrounded)
    29.             return;
    30.        
    31.         _lastJump = Time.time;
    32.         _moveVelocity.y = jumpForce;
    33.     }
    34.    
    35.     public void PartialJump()
    36.     {
    37.         _lastJump = Time.time;
    38.         _moveVelocity.y = jumpForce;
    39.     }
    40.    
    41.     public void HaltJump()
    42.     {
    43.         _moveVelocity.y = 0;
    44.     }
    As you can see, I've added a HaltJump command in the underlying control behavior to force an arrest of y-axis momentum. The player control side was easiest (I just kept to the algorithm given by Austin K.), especially after adding an _isFalling flag to the player control code, and an AtJumpApex flag to the sidescrolling movement controller.

    Looking forward to feedback, and thanks for the help so far!
     
    Last edited: Apr 6, 2013
  8. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    Updated, new webplayer :D
     
  9. GibTreaty

    GibTreaty

    Joined:
    Aug 25, 2010
    Posts:
    792
  10. pus2meong

    pus2meong

    Joined:
    May 3, 2012
    Posts:
    83
    $protogame.jpg

    This is my game prototype.

    It's a RTS game, well actually I'm still unsure... There's two design for this. The second one is Turn Based strategy.

    Anyway, instead controlling the whole thing (macro micro management stuff), you only control 4 characters. Raid the enemy base and destroy their tower.
    I still considering to mix both method (RTS TBS), but still figuring out how to get the perfect match (even if that possible).

    The four gray capsules are the four characters. And the green diamond is the enemy.
    Since I'm not good in 3D modeling so yeah, I'm focusing on working the gameplay first.

    As for the Miku Hatsune model... Seeing four capsules everydays is so depressing. So I just put her on the foreground as the eyes refreshing tool :D
     
  11. Jlpeebles

    Jlpeebles

    Joined:
    Oct 21, 2012
    Posts:
    54
    Particle Fun!!!

    Torus



    Lorentz Strange Attractor



    Cube





    Inside-out cube
     
    Last edited: Apr 8, 2013
  12. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Nice oldschool-ish particle shapes! How are you animating the particles?
     
  13. Jlpeebles

    Jlpeebles

    Joined:
    Oct 21, 2012
    Posts:
    54
    Thanks :D, I got way cooler effects than I had originally expected. Seeing the cube invert for the first time was :eek:.

    At the moment the particles can be attached with springs to either,
    A particular point.​
    Their original positions.​
    Nothing.​
    Then a force can be added from a point.
    I have a CustomParticle struct that holds a normal particle plus mass, acceleration, drag, spring position, and spring constant. I have all the CustomParticles in an array and call UpdateParticle on all of them and pass the normal particles to a unity particle emitter (or two if I have too many particles for one).

    I'm planning on doing a lot more, but I am mainly working on another project I put up on this forum recently.
     
    Last edited: Apr 8, 2013
  14. AustinK

    AustinK

    Joined:
    Dec 10, 2012
    Posts:
    86
    Hey Asvarduil,

    I thought I posted to ask you what you thought felt off still, but I guess I didn't. So, what still feels off? I do notice that the jump just STOPS immediately at the apex. Something you can do with that is once the apex is hit, or the buttons comes up, don't immediately let the play begin falling. Find some constant that feels nice to you and decrement your up-value by that constant. So if you're moving the play up by 9.8, then every frame try removing .3 from that up value until you're adding 0, then let the player fall back down.

    And you don't have to use my code if it feels wrong, of course :) I will not be offended. The naming convention is slightly weird too when I made the bool "notFalling" when it could also be "isJumping", but it's really all the same.

    But anyways, as for the jumping feeling a bit wierd, hopefully what I've said helps a bit.
     
  15. AndrewGrayGames

    AndrewGrayGames

    Joined:
    Nov 19, 2009
    Posts:
    3,821
    It helps a lot! I'm thinking tomorrow of modifying my Halt Jump method to instead halve the upward force, before application of gravity to the player; I need to do the applicable math on paper before determining a default jump decay value.

    As to code differences: my code differs from what you posted somewhat because I've divided the actual interactions with the CharacterController from the interface that allows control of those interactions. Basic idea, my AI entities call the same methods the player does. Tuning on the interactions part allows me to make the AI entities behave differently from the player (for instance, Slimes can jump 1.5 tiles high, where the player can jump 2.5 tiles high.) However, I took your original code as pseudocode for the algorithm to use...so, you can still say somewhat that I'm using your code! ...Somewhat.

    Anyways, all that is to say, thanks for the help, this is really helping my project.
     
  16. AustinK

    AustinK

    Joined:
    Dec 10, 2012
    Posts:
    86
    You're welcome. If you need any other help, just PM me and I will try to help you.
     
  17. GibTreaty

    GibTreaty

    Joined:
    Aug 25, 2010
    Posts:
    792
    http://www.kongregate.com/games/GIB3D/match-cubed

    Added a tile-select sound, the game notifies you whether you have won or lost, and tiles spawn at the top every-other turn. But even with tiles spawning less often it's still very much impossible to beat.
     
  18. GibTreaty

    GibTreaty

    Joined:
    Aug 25, 2010
    Posts:
    792
    http://www.kongregate.com/games/GIB3D/match-cubed

    $GUIUpdate.png

    GUI Update -
    - Left: Difficulty, Board and Options buttons
    - Top: Score
    - Right: Moves left till the next drop

    Next I want to integrate Kongregate's API so I can let users submit their highscores.
     
  19. Kald

    Kald

    Joined:
    Apr 20, 2013
    Posts:
    16
    http://www.chainreaction.p.ht/Unity/motherload.html
    My first project in Unity - a Motherload clone. It's obviously WIP, but - given that I've started learning Unity (and C#) 2 weeks ago - I think it's in quite good shape already. I come from UDK environment.
     
  20. PPStudios

    PPStudios

    Joined:
    Nov 12, 2012
    Posts:
    49
    Version 1.2 of Epic Pets is now live for Androids : http://goo.gl/4Ettc





    Working on layouts some more and animation fx / sounds ! We update every week on the Google
    Play and Amazon stores, coming soon for iOS and completely free !
     
  21. hannes-dev

    hannes-dev

    Joined:
    Apr 27, 2012
    Posts:
    132
  22. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,887
    Not to be harsh- but this shouldn't be over version 1.0 yet. There's just not enough, lots of errors, and so on. Looks great, however.
     
  23. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
  24. Blacklight

    Blacklight

    Joined:
    Dec 6, 2009
    Posts:
    1,241
    Looks pretty cool. There is a lot I could nitpick at (The landscape could definitely look better in regards to the textures and distant trees) but it is in alpha. Great job, I'm interested to see how it turns out.
     
  25. frarees

    frarees

    Joined:
    Jun 8, 2012
    Posts:
    36
    1 week prototype of Watson, a CLI for Unity to ease your dev tasks. Focused on extensibility. Following Unity's way of extending Editor stuff. Planned to be triggered from both editor runtime.



    Implementation of the command shown above:
    $print.png
     
  26. Rafael-Barbosa

    Rafael-Barbosa

    Joined:
    Apr 14, 2013
    Posts:
    288
    Last edited: May 2, 2013
  27. CkSned

    CkSned

    Joined:
    Nov 26, 2010
    Posts:
    175
    Damn this looks really really good for a Unity project. Inspired by the Elder Scrolls games by any chance? Really gives off that kind of vibe to me.
     
  28. Marrrk

    Marrrk

    Joined:
    Mar 21, 2011
    Posts:
    1,032
    Working on an Unity Profiler for Unity Free, this is how it looks currently. The best part of it, not a single line of code needs to be written to profile :D

    $UnityProfiler.jpg

    $UnityProfiler.jpg
     
    Last edited: May 10, 2013
  29. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    I'm working on a new game which will have a retro pixellated graphics style, ie low-resolution. It'll be roughly around 640x360 pixels. I've built a little system to adjust the area size based on the resolution and in an effort to keep the pixels perfectly square, so depending on the resolution there may be a little more or less of the game world visible but the end-user experience is of an area roughly the same size with roughly the same size looking `pixels`, no matter what resolution you run in. I guess mainly I'm aiming for desktop and maybe iPad.

    The graphics system is pretty old-school. Basically the game will comprise a whopping 2 triangles as a single quad with a texture on it. I spool an entirely new image to the texture every frame from main memory. All of the graphics will be generated and `drawn` by the cpu from script! There's a good reason for doing this that will be revealed more later, but basically it lets me do some very interesting particle effects.

    The game itself will be a multi-screen environment with some kind of casual scrolling. I'm not totally settled on what kind of a game it will be yet, but I know it will have creative elements and destructive elements as well as some interesting particle interactions. It could be a platformer or maybe lean a bit more towards tower defense.. more development is needed before I can tell what turns out to be the most fun.

    I can't for the life of me get a screenshot to show up, though. :-\

    [edit] Jepeers I think they fixed it, yay. See those lovely low-res pixels. They now no longer look right in the actual editor because I tried to change it to use non-power-of-two textures which Unity totally messes up by upscaling to power-of-2 internally, which is a major slowdown. Gah!.. gotta change my code now to some kind of dirty-rects grid spooling thing.[/edit]

    [edit2] The image appears on safari on mac but not on windows[/edit2]
     

    Attached Files:

    Last edited: May 14, 2013
  30. JetStreamGames

    JetStreamGames

    Joined:
    Jul 11, 2012
    Posts:
    6
    $applejack3.png
    My game Apple Jack. I'm still working on it, but basically it is a 2.5D platformer in the reigns of Super Smash Bros Brawl's adventure mode. Your main character is a "Jack", a race of people blessed with super powers. After an encounter with "Yellow Jacket", Apple Jack resolves to become the Jack-of-all-Trades (King of the Jacks) by taking on the other Jacks.

    Each boss will be a "Jack", whose power will fit the overall them of the world. For instance "Jack N. DaBox" will look like a parody of Solid Snake, and use boxes to his advantage. Once the player has beaten the Jack, he will get his power.

    I want to develop the game for the PC and Ouya, so please check it out in the forums at:
    http://forum.unity3d.com/threads/18...-Scrolling-Platformer-for-Ouya-Android-and-PC
     
  31. Rafael-Barbosa

    Rafael-Barbosa

    Joined:
    Apr 14, 2013
    Posts:
    288
    Was making some tests regarding Grid movement and also the Unity´s Pathfinding system, got some pretty awsome results, what do you think?

     
  32. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Can you apply said texture to a TV in annother game then have a game in a game?
     
  33. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    Um, you could I suppose. The whole game is on a single texture so it's possible. Not what I have in mind exactly. Trying to go for a fullscreen borderless artistic sort of look.
     
  34. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    Last edited: May 17, 2013
  35. K-E-I

    K-E-I

    Joined:
    Oct 6, 2012
    Posts:
    17
    Continue working on ibl/car paint shaders


     
  36. nickavv

    nickavv

    Joined:
    Aug 2, 2006
    Posts:
    1,801
    I've been working on a Metroid-esque game recently. This evening I added security-level locked doors, and hit animations for my enemies.

    $h2pd5j9.png

    here's a better view of that enemy


    and a spaceship I spent a lot of time on but probably won't end up using (changed the game's plot a bit recently and sort of obviated the need for this)
     
  37. nickavv

    nickavv

    Joined:
    Aug 2, 2006
    Posts:
    1,801
  38. c-Row

    c-Row

    Joined:
    Nov 10, 2009
    Posts:
    853
    After scrapping my last prototype for not being fun at all, I decided to create my own little version of Space Taxi.

    $skytaxi.JPG

    ( WebPlayer )

    The basic gameplay is already in (spawning customers at random, rewarding cash based on distance, fuel, refueling, a bit of GUI) but the flight model is... well, a friend of mine described it as "it looks like it flies - a brick". Any suggestions on how to improve the flight model? I already tinkered with the rigidbody settings but I am still not entirely happy with it.
     
  39. Elehe

    Elehe

    Joined:
    May 19, 2013
    Posts:
    14
    I am working on an ocean shader to learn some dx11-shaderprogramming:

     
  40. Rafael-Barbosa

    Rafael-Barbosa

    Joined:
    Apr 14, 2013
    Posts:
    288

    Looking pretty awsome, did you used a displacement map?
     
  41. Elehe

    Elehe

    Joined:
    May 19, 2013
    Posts:
    14
    At the moment i use one map that stores all information in it.(height differnece and x and z velocity) To make it avaiable to Unity Free i will change it to use structuredbuffers but its easier to use RenderTextures for debugging.

    Next step is to calculate a bumpmap to add more detail.
     
  42. lorenalexm

    lorenalexm

    Joined:
    Dec 14, 2012
    Posts:
    307
    A video of a game prototype that I've been playing with over the last two weeks during downtime at work. A first attempt at designing something using GameObject independence via an event and messaging system, and cross platform (Mobile, Desktop, Web) all using only one set of scripts per-object. The video is a bit sped up to showcase the gameplay idea, any comments on the project, especially any thoughts on polishing and releasing are greatly appreciated. Thank you in advance!

     
  43. Somnium125

    Somnium125

    Joined:
    Jan 15, 2013
    Posts:
    27
    Hi Guys,

    Here a preview for our upcoming debut game called "lockdown". The game is still under development and set for release in late August. What you think?

     
  44. Photon-Blasting-Service

    Photon-Blasting-Service

    Joined:
    Apr 27, 2009
    Posts:
    423
    New demo reel with lots of Unity stuff in it:
     
    Last edited: Jun 6, 2013
  45. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    $AlchemyScreenshot.jpg

    I finally got around to fixing this little display system because I think it will be useful. The problem was that when you procedurally generate a texture from script at runtime, if you ask for a rectangular texture Unity pretends to give you one - but internally it actually stores it as a power-of-2 texture, and also I think a square one. What I was seeing was a bizarrely unalterable blurring of what should've been crisp pixel-exact `chunky pixels` with perfect edges. I couldn't figure it out because I didn't seem to be doing anything wrong. Then I learned that when you use SetPixels() and Apply() to a procedurally generated rectangular texture, Unity `internally`, behind-the-scenes, actually performs an up-scaling algorithm and stores the texture as power-of-2. It uses this internally because apparently power-of-2 textures are waaaay more optimized on graphics cards than rectangular texture access, ie it's otherwise very slow. So anyway, this optimization is internal but it has real effects when you're shooting for 100% pixel quality. Plus the up-scaling algorithm they use is apparently a bilinear filter of sorts because it blends values from multiple pixels into one. That looked awful in my case, because e.g. the white row of pixels was appearing semi-transparent overlayed on top of the adjacent rows.

    So basically I had to rewrite the system because I was ideally shooting for a quad which covers the exact size of the screen, and a rectangular texture which is of exactly the right size - apparently for speed purposes to cut down on the amount of data having to be uploaded with SetPixels() and Apply(), which are themselves slow. However, upon every Apply() there is this awful overhead which dropped my framerate from ~250fps at 1280x1024, to around 35fps! Crazy. So anyway, my optimization backfired because of this internal weirdness. So now I've had to recode it to work off a fixed, square, power-of-2 texture. It means that in many cases only half of the texture is actually visible on-screen, so there's quite a bit of wastage, but it is still WAAAAAAAY faster - 250fps versus 35fps. I think in future if the wastage becomes an issue then I'll have to split the display into smaller squares, to cut the bottom off, but for now it seems fast enough. My only doubts are that it might be a bit slow on older iOs, or on Ouya. We'll see.

    Next step now is to actually generate some kind of game level thing to view and scroll around.
     
    Last edited: Jun 4, 2013
  46. tylernocks

    tylernocks

    Joined:
    Sep 9, 2012
    Posts:
    256
    Last edited: Jun 7, 2013
  47. suctioncup

    suctioncup

    Joined:
    May 19, 2012
    Posts:
    273
    Got some enemy FOV working:

    $zbQ1J4S.png

    You can edit the viewing angle, and the amount of rays used (To change accuracy). The enemy will be able to 'See' things detected by the rays (blue lines). All in about 106 lines of code.
     
    Last edited: Jun 12, 2013
  48. carking1996

    carking1996

    Joined:
    Jun 15, 2010
    Posts:
    2,609
    Wow those look amazing!
     
  49. K-E-I

    K-E-I

    Joined:
    Oct 6, 2012
    Posts:
    17
    Almost finished car shaders.
    Full realtime IBL (diffuse, specular, reflections), no any bake or additional lighting. Just HDR environment(single skybox).
     
    Last edited: Jun 9, 2013
  50. Adam-Buckner

    Adam-Buckner

    Joined:
    Jun 27, 2007
    Posts:
    5,664
    KEI: Currently "Small Works in Progress" is separated into two different threads. Arguably, you should be posting these in the WIP-Small-Works-Art-Thread rather than the WIP-Small-Works-Game-Programming-Thread.