1. Welcome to TalkBass, the Premier Bass Player Community and Information Source. We've been uniting the Low End Since 1998!

    We're glad you've found us. Register a 100% Free Account to post and unlock tons of features.

Check out my game design project

Discussion in 'Off Topic [BG]' started by john turner, Dec 13, 2012.


  1. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
    i know i'm being a copy cat :D but i've been wanting to post it and seeing ggvicviper's cool game reminded me.

    i wrote this game as part of a group of 3 (i did the majority of the coding, and actually recoded a lot of the stuff the guys in my group did) for a senior level game design class. we did this in 3 weeks, although it ended up being ~10,000 lines of scripting code in c#.

    this game uses the unity3d plugin (unity is a very cool game playing engine). this is a very cool engine plugin - very secure (don't worry about any kind of browser hijacks/etc - it's not that kind of thing. just enables a game to run within a browser).

    please read the webpage instructions first - the game can be pretty hard :D.

    http://db.tt/hEjhuPg4

    i made all the models except for the turret and the spawner tower, all the animations, all the movement and shooting code, rewrote much of the gui code, etc.

    if anyone is interested in making games, check out unity3d - www.unity3d.com. it's a free development environment for many things (you need to buy a license if you want to sell games), and allows for really awesome games - you can make pro level games (and some pro level games are in fact made with unity).
     
  2. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
  3. Simo98

    Simo98

    Joined:
    Jun 18, 2009
    Location:
    QLD, Australia
    I have to install something? Bah! Who do they think I am!




    I'll have to give it a crack after work :)
     
  4. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
    :D the unity plugin enables the games to run within a browser. it's sorta like flash, but better built, much more secure, much more advanced, technology-wise, and capable of running any kind of game. unity itself is a game engine comparable to the source engine and unreal sdk, enabling professional level games to be built without too much effort (relatively, games are some of the most difficult programming period, many orders of magnitude harder than most consumer computer applications) and, most importantly, for free.

    generally licences to the various pro-level game design engines/environments are usually thousands of dollars per dev - UDK is on the order of 100k per dev. it's amazing that such a geat engine is available for free.
     
  5. Register to disable this ad
  6. ggvicviper

    ggvicviper Call me Marc or Marky Potatoes. Gold Supporting Member

    Joined:
    Jul 16, 2011
    Location:
    Fresh Meadows (Queens), NY, US
    I'll check it out on a normal PC when I can, sir! On an iPad now...
     
  7. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
    heh yeah, i wouldn't want to try my game on an ipad.
     
  8. ggvicviper

    ggvicviper Call me Marc or Marky Potatoes. Gold Supporting Member

    Joined:
    Jul 16, 2011
    Location:
    Fresh Meadows (Queens), NY, US
    What languages did you use with Unity? I'm a bit unfamiliar with it.
    I heard C# before, but does it use its own scripting language?
     
  9. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
    c# is the scripting language i used. unity supports c#, javascript and boo.

    the only thing "scripty" about the language is that you attach the code controlling behaviours to physical assets you create or import into the game. in a way, all the behaviour scripts are very similar to applets, in that they have an update loop that controls the behaviour and responds to input.

    the trick is when you have multiple scripted objects in the game - they all have their own loops going, and you have to maintain execution order so that you don't attempt to do inter-dependent things in an inappropriate order.

    for instance, in my game every object has at least 3 running scripts going. along with that, the core fundamental functionality is offloaded to non-script code - every robot and vehicle in the game inherits most of their behavior from an abstract class with about 40 methods controlling shooting, animation, movement, and other behaviors for direct player control, indirect player control (all the bots you're not directly controlling can be ordered via keystrokes to attack nearby enemies, or follow you or attack your target, etc.) or enemy behavior and AI. all in the same abstract class. keeps the scripts themselves relatively small.
     
  10. MakiSupaStar

    MakiSupaStar The Lowdown Diggler

    Joined:
    Apr 12, 2006
    Location:
    Huntington Beach, CA
    I'll check it when I get back on my computer John.
     
  11. Ziltoid

    Ziltoid Supporting Member

    Joined:
    Apr 10, 2009
    Location:
    Canada
    The controls are not working for me. WASD, clicking, numbers, shift-clicking, shift-numbers etc. do nothing.

    Firefox 17.0.1 on OSX 10.8.2
     
  12. oniman7

    oniman7

    Joined:
    Jun 1, 2010
    Location:
    Saint Augustine, Florida
    Cool. I'm doing music and sound effects got a mobile game the team us doing with the Shiva engine. Can't check it out in my phone though
     
  13. ggvicviper

    ggvicviper Call me Marc or Marky Potatoes. Gold Supporting Member

    Joined:
    Jul 16, 2011
    Location:
    Fresh Meadows (Queens), NY, US
    Finally took a look with the Unity plugin. It was fun - although it started to run a little slow on my MacBook Pro, and the controls are a little rough on someone who uses a touchpad, not a mouse.

    Still, blowing up stuff with robots and tanks is always awesome. Congrats on your first project JT.

    Did someone make the 3D models on your team, or did you find them for free online? Let's see if we can get you into WebGL and JS soon - it seems like you might want to get into web game programming.
     
  14. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
    thanks for checking it out - i'll look into what might be causing that. we try to lock the mouse in the frame of the game but something might be screwy with that. it sounds like the game itself wasn't "in focus" - did you try clicking on the window off the game? it should have started "in focus" but if you clicked outside the game it might have lost the focus.

    thanks - yeah, it was geared toward keyboard + mouse-style play, so i can imagine attempting to play it with a touchpad would be ridiculous. i'm working on including an alternate interface for a different control layout, something that will also use more gui elements and rely less on so many different keypress combinations.

    in fact there's a huge amount of work i want to do on this - it still has some issues, and it sort of throws you into the deep end when you start - that wasn't the intention, but the project was supposed to illustrate about 1-2 mins of "game feel/game play" so we sorta built the project around

    i made all the models except for the tower that is used as a spawner.

    i made them out of primitives in the unity environment - the tank was all cylinders, the spider-centaur was all cube-based polygons, and the demon was all spheres , cones and capsules. imported the cone from blender, but otherwise all were built from primitives provided in the unity environment. i used specific sets of primitives to help them each have their own unique feel.

    then i manually animated them (as opposed to putting them together in an animation-focused environment like maya or blender, and then using the full animation tools provided by unity). it was sorta the hard way to do things, but we were time crunched - did the whole game from scratch in a little over 4 weeks - and so some corners had to be cut.

    i ended up doing the bulk of the coding on this project, since the original vision was in a large part mine. one of my teammates and i spent a lot of the semester talking about what we were wanting to do, and he contributed a lot to the design, but both of them sorta deferred to my wishes in the general design of things, which was really cool of them. it made me do more work, but it also allowed me to realize my vision. as any creative artist knows, getting good teamates willing to do that kind of thing is rare.

    unity allows for javascript too, but we made the decision to use c# early on. i favor c# due to its improved speed and rigor as a language -don't get me wrong, javascript is fine, i just like how c# does things a little more.

    i definitely do like game programming - i always have. i remember trying to write games on my apple ][e back in 10th grade when i first got it and my first actual computer games (wizardry and ultima 3 were 2 of the main ones, which were new at the time :D (i'm old) ). doing something like this was 30 years in the making, and in hindsight i'm surprised it took me so long to even get started.

    my research focus at school has been graphics but i also love games and augmented-reality-based stuff (ga tech's got a fantastic graduate program in both fields), so i may evolve into a game programmer as time goes on.

    thanks for your interest :).
     
  15. Ziltoid

    Ziltoid Supporting Member

    Joined:
    Apr 10, 2009
    Location:
    Canada
    That was not it, the controls juste seemed really messed up SD and Z would make the character move, arrows worked correctly, so did the space bar and everything else did not. I could still move around, look around but not actually do anything.
     
  16. ggvicviper

    ggvicviper Call me Marc or Marky Potatoes. Gold Supporting Member

    Joined:
    Jul 16, 2011
    Location:
    Fresh Meadows (Queens), NY, US
    Cool.

    The reason I continue to bring up JavaScript is because I'm interested in the direction you want to continue going in.

    A few years ago, I was interested in making my games native (downloadable) PC and Mac programs, and I wrote them in C++, and later plain C. I distributed them via the internet. This was around the time the iPhone came out. Soon, the market was on the iPhone and "apps" became all the rage, including games. Fewer and fewer people cared about freeware on PC and Mac, because the iEverything was taking over.

    I started looking at mobile/tablet vs web. I went back and forth - a LOT. My career started taking me in the direction of the web, and eventually I decided to stick with it - with the advent of HTML5 and all the new (and some still upcoming) standards, plus JavaScript speeds have gotten a lot better if you want to play in browser. Not perfect yet, but it's a start while the browsers continue to improve. Plus, if you like 3D, many are starting to implement WebGL, which is also a soon-to-be standard.

    I think if you're interested in making your games in the browser, WebGL and JS is something you should seriously look into - and they have libraries to make things easier to code with. If you want to continue with Unity and C#, cool, but I would try to lean more towards native mobile or tablet apps if that.

    Here's a demo of WebGL - The Aquarium. Right now you do it on Chrome, Opera and Firefox. Safari needs 5.1 (and for it to be enabled), and it doesn't seem like IE supports it yet.
    http://webglsamples.googlecode.com/hg/aquarium/aquarium.html

    JT, I'm ALWAYS interested in code talk - it's my career. :D :bassist:
     
  17. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
    ooo, that's strange - i'm overriding the internal unity key-capture and hardcoding the keys, so if you press the "w" key it should register as a w. do you have an unusual key-mapped keyboard? like a dvorak or something like that?
     
  18. Ziltoid

    Ziltoid Supporting Member

    Joined:
    Apr 10, 2009
    Location:
    Canada
    Standard MBP 13" Qwerty keyboard in Us English.

    I just did another test here's what it gives me in details:
    Q makes it go left
    S makes it go backward
    D makes it go right (those two work normal)
    Z makes it go forward
    Space: jump
    shift: sprint
    control, command, numbers, etc. :nothing

    The mouse movement works flawlessly, even on my trackpad
    Clicking does nothing

    Moving with the arrow keys works well.

    And that's about it I think.

    edit: if you think it may be a problem on my end I don't mind testing specific things and whatnot.
     
  19. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
    yeah, good points, and i'll probably look into these other platforms eventually. we used unity for the class, and i'm still working in it to get the game to where i'd like it to be (class is done, i'm still just expanding and fixing the game :D).

    sweet! me too :D i was a business app developer from when i graduated from tech the first time ('92) until relatively recently, but i've gone back to do something a bit more interesting and less soul-crushing.
     
  20. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
    that's wild - q is doing what 'a' should do, and z is doing what w should do.

    i wonder if this is somehow a mac thing - i'll put it on my mac and give it a spin.

    thanks a lot for the bug info! :)
     
  21. john turner

    john turner You don't want to do that. Trust me. Administrator

    Joined:
    Mar 14, 2000
    Media:
    1
    Location:
    atlanta ga
    could some more mac guys check this out and see if they get the same result?
     

Share This Page