Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

My personal game jam - Top Down Ice Hockey Game

  • 22-11-2013 12:06pm
    #1
    Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭


    Hey Guys,

    I have today off work and I decided I want to try make a game that I have been thinking about doing for a while. If its going well I'll probably continue work over the weekend.

    Its a multiplayer top down Ice hockey game.

    Left analog controls players movements, Right analog stick to rotate your character (and hit the puck). So there will be no button to shoot, pass tackle or whatever , just good old fashion physics! I'm not too sure how this mechanic will work out, only one way to find out though!

    I will also be adding a slide button for last ditch blocks.

    I'm writing the game in LibGDX. I'll putting all the code on Github here:
    https://github.com/witnessmenow/PuckOff

    If any artists would be free to lend a hand that would be great, but I'll throw together something myself if needed.

    The goal is to have something playable by the end of today, so we'll see how it goes.

    I'm hoping to target both computer and Andorid with it. Android will probably only be a practice mode as you cant play two player on the one screen, well maybe on a tablet...

    I'll post back here through out to day to update on my progress, but I'll be tweeting more regularly if your interested (@witnessmenow)

    Any comments or suggestions greatly appreciated.


Comments

  • Registered Users, Registered Users 2 Posts: 454 ✭✭Kilgore__Trout


    Keep us posted!


  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    Slowly does it!

    I created a hockey rink outline image to create body in box2d that will enclose the players and the puck. I used paint.net, took way longer than it should have cause im terrible :pac:

    I used Physics Body Editor to trace the image and generate a the body. It takes a tiny bit of getting used to this tool, but once you get the hang of it its really powerful, I dont know how you create the body of the hockey pitch without it.
    (not embedding because its a huge picture)
    http://i.imgur.com/Vb0K2rp.png

    Okay now the fun begins, well actually the crappy leg work of setting the game up begins, but after that its fun!


  • Registered Users, Registered Users 2 Posts: 8,493 ✭✭✭RedXIV


    Can I just check in to say I love the name :D


  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    RedXIV wrote: »
    Can I just check in to say I love the name :D

    Yeah, its amazing! I explained the concept of the game to a friend of mine a few months ago and straight away he said "you should call it Puck Off". I thinks its the main reason I want to make the game!

    Went to get lunch there so I was away from it for a while. Currently working on the controller input part. I'm basing it off SocCars controller input code, but revisting it I see lots of room for improvement so I'm trying that out now.

    No work on the actual gameplay yet, once I have the controller input working thats what I'll be working on next


  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    Not looking good for finishing today :(

    Had to help put up a chicken pen of all things.

    Hoping the controller input stuff is done now, just setting up the game screen now


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    Aint she a beauty:

    Rlfea8Ol.png

    Box2d Debug is still on so that's why the green lines are all there.

    A Character next ...


  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    So im going to sign off for the evening, my GF is home this evening and is working all weekend so it wouldnt be fair of me to keep going (translate, life would not be worth living)

    I now have a character (a circle) on screen and moving. need to add a puck and the characters hockey stick next.

    Im hoping to get up tomorrow early and continue where I left off


  • Registered Users, Registered Users 2 Posts: 10,299 ✭✭✭✭BloodBath


    Nice idea and name. Looking forward to the results.


  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    watch out next gen, my player has a stick now!

    sPgMnxrl.png

    The stick pivots around the center of the player. Need to fix up the control of the stick though. Working on the now


  • Registered Users, Registered Users 2 Posts: 10,299 ✭✭✭✭BloodBath


    Is it going to be 2d? Have you tried using Unity?

    The latest version (4.3) added a lot of 2d features.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    Yeah its going to be 2d. I haven't used Unity at all yet. I will try it out at some stage, but for this I wanted to throw something quick together so I was just sticking with what I knew.

    LAhMJXel.png

    It has goals now!

    Im not as far as I hoped I would be at this stage. I spent a good bit of time working on making the rotation mechanics feel right. I'll tidy up the code for that with some comments next time im wokring on it.

    I tried a couple of things out before I landed on a solution that I'm happy with. Basically I create a vector based on the co-ords of the analog input and calculate the angle. I then calculate the angle of where the stick is currently with reference to the center of the player. If the angle is closer clockwise I apply a clockwise force on the stick and vice versa.

    I'm happy with the hockey player now, I think it could be used in other games too, such as a terrible baseball game, or a terrible golf game even a terrible tennis game!


  • Registered Users, Registered Users 2 Posts: 20 BolaGaming


    RedXIV wrote: »
    Can I just check in to say I love the name :D

    The name is brilliant :P haha


  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    Playable demo of what I have so far here:

    The demo only works with Xbox controllers (probably, you might get lucky if using a different one). I added keyboard and mouse support for one person Movement: Up, Down, Left, Right Rotation: left mouse held down relative to player (i.e. if you want to move stick up, hold mouse down above player)

    If anyone knows a hobby artist interesting in helping out give me a shout!


  • Registered Users, Registered Users 2 Posts: 10,299 ✭✭✭✭BloodBath


    Controls take a little getting used to but I was getting there. I think the puck is a little too bouncy at the moment.

    There was a couple of clipping issues where the puck went through the stick but that was pretty rare.

    Overall though it's a good start. Looking forward to your progress.


  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    Were you using a controller or the mouse?

    I just implemented the mouse last night so anyone trying it out without a controller would at least be able to try it, but it wasn't by intended way of playing (although its not bad.. kinda!)

    Bouncy Puck: Ya maybe, that is easily changed thankfully.

    Clipping: Ya I've seen that a few times myself, That side of the physics is left completely up to box2d so I'm not sure what to do to sort yet. I never had that issue with Soc-Car, but the stick and ball are pretty small so I guess there is more scope for it to happen. I think I can fix it by changing the world.step method up. I'll raise it as an issue on Github but I probably won't spend too much time on it at the moment, see If I can build out the rest of the game

    There is a ton of performance improvements I need to make to it too, for example the Box2d debug render that is currently on is pretty resource heavy apparently. I'm also creating too many new objects in my render loop (indirectly). I should be creating one property outside of the loop and reusing it every time. This will mean the garbage collector will not be needed to come clean up all the un-referenced objects.

    Thanks for the feedback


  • Moderators, Category Moderators, Computer Games Moderators Posts: 52,410 CMod ✭✭✭✭Retr0gamer


    Clipping happens in Box2D when physics objects are moving so fast that the step through each other in the frame without touching each other.

    You could try using a pre-collision method to check if a collision will occur in the next frame. I'm pretty sure Box2D has this built in, Corona has it in it's version of Box2D.


  • Registered Users, Registered Users 2 Posts: 7,264 ✭✭✭witnessmenow


    I put a ad up on reddit gameDevClassified section and I'm after getting an artist.

    He seems very good and organised so I'm looking forward to continuing on it.

    I made a change to make the puck less bouncy, while it is more realistic to what a puck would do, I think its less fun, so I might revisit it.

    I also seem to have pasted over the clipping issue by changing the input params to the step function, I need to understand it better though. I think I may cause performance issues on lower end machines whit the change I made.

    I also created my first ever AI! It's really dumb, it just chases the puck blindly, doesn't even swing the stick yet

    Hopefully will get to spend some time at the weekend with it.


  • Registered Users, Registered Users 2 Posts: 8,449 ✭✭✭Call Me Jimmy


    Played it there and I think it has a lot of potential. I was using the mouse and keys which I understand is not the default control method and there was too much of a logical gap for me between input and player movement/ball interaction. Will try with the 360 controller when I get it back tomorrow.
    For me the key ingredient to it being possibly very good (and the same ingredient I'm going to use for my tennis game) is giving the player full control and making it wholly about skill. Judging angles, striking the ball as close to as you would in real life so that all the variables are within the user's control.

    Great work and I'm really interested in seeing how it develops. Will there be networking?

    I am doing a similar thing for a tennis game (has its own thread) except using 3d physics (2d rendering) so it'll be good to see how you get on.


  • Registered Users, Registered Users 2 Posts: 454 ✭✭Kilgore__Trout


    Had a crack there. Definite potential here. Main quibble: difficult to control, but in saying that, I rarely use a controller. Looking forward to seeing more.


Advertisement