Search Unity

Building My First Game... NEED HELP WITH CODING!

Discussion in '2D' started by Gem1984, May 27, 2017.

  1. Gem1984

    Gem1984

    Joined:
    Mar 18, 2017
    Posts:
    2
    Hi Unity Community,

    Like many here I am new to Unity and am looking to create my first mobile, but the coding aspects is very difficult for me. I have gone through several tutorials from YouTube to Lynda and many more. I understand the basics of coding fundamentals, for me its about putting the aspects together to create the mobile game. Well that’s enough about my boring life lets get the good S***...

    I am trying to make a simple seek and destroy game that uses submarines around a world map. This game can either be 2d or 3d map. What I need to know is the following…

    1. Game Hub: I need a game map that can response to “drag-drop gestures”, similar to a “World Conquest Game” I also want the map to light the position your submarine is going heading towards. There will be only “7 locations” to move around on the world map.

    My interpretation of code:

    You would need to create 7 vector2 points on the PNG map. As for the highlighting aspect you would need to use a mask layer over the map layout to create the highlight mechanic with a conditional statement so that the user cannot dart round the map from across from opposites sides, instead the user must chart his way around the map. As for the gesture


    2. Finding Battle Mechanic: The battle mechanic required another screen to pop-up after a “double-tap” gesture on the screen.

    My interpretation of code:

    Keep track of any taps (the time and position of the tap), then if there is another tap close (in time and position) to the previous tap, consider it a double-tap and call a method to display the other screen

    3. Puzzle Mechanic: The puzzle mechanic requires the user to use 3 dials that must be “rotated gesture with your finger” to control the mechanics of the puzzle. The puzzle mechanic is used to seek out your opponent on the world map. The only other way to t

    My interpretation of code:

    Not really sure how to go about this part done. I believe there is finger gesture for the rotation of the three dials. Each dial will affect the behavior of the 6 plot points on the scope as it causes a push and pull resistant so the user must have precision. Once the puzzle is solved correctly the player will see the enemy submarine or just ocean, so it’s a guessing game.


    4. Game Rules: The game will be a best out of 3 or out of 5

    My interpretation of code:

    Creating a conditional statement with a ELSE that will include a game over method after 3 or 5 games are done.


    5. Game Timer: The game has 3 minute rounds

    My interpretation of code:

    Creating a public function that ends after with a win and lose condition.
     
  2. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    Did you try this section? https://unity3d.com/learn/tutorials/s/scripting
    Along with some of the tutorials about making a game (the ones on Unity's site)

    If you're just starting out, it's a good idea to get comfortable with Unity and settle in. And because you're new to learning coding, you should get used to using code in a few situations (ie: the tutorials, and such).

    You have ideas, and notions about how you might go about it, but there is no actual code here. Each piece that you want to add comes with the possibility of additional issues beyond what you wrote, and how they might integrate into your game (plan/design).

    Intro to scripting in Unity is a good resource, as it removes parts of the language you'd use in other applications, and focuses on what you'll be using in Unity. The tutorials will be good hands-on experience, for you to practice with - maybe even expand on.
    Good luck and have fun :)
     
  3. StormHerald

    StormHerald

    Joined:
    May 29, 2017
    Posts:
    17
    I think if this is literally your first game, I suggest not going on with your idea. even if you the fundamental knowledge to do it coding wise, if you have no experience whatsoever building an actual game from the ground up with unity, that knowledge will fail you. instead, try creating dozens of "test" games. like a simple pong game, make sure you finish it though! then move on to something harder, like a frogger game. then maybe even try to build a snake game. once you do have prior experience building games with unity, making more wouldn't be any harder!
     
  4. Gem1984

    Gem1984

    Joined:
    Mar 18, 2017
    Posts:
    2
    Hey methos5k and StormHerald thanks for replying l have been looking at tutorials and am having problems with tutorials getting old and Unity upgrades which create problems with the code not working. I have done a few games like Pong clone and a simple card game but in Xcode. At the moment l am going through Unity's Roguelike game tutorial and have read up on countless C# tutorials. Guess coding and using the script library seems pretty difficult.

    Once again thanks!

    Game references:
    http://unity.grogansoft.com/beginners-guide-create-a-pong-clone-in-unity-part-1/
     
  5. methos5k

    methos5k

    Joined:
    Aug 3, 2015
    Posts:
    8,712
    I also made some apps/games in Xcode before moving to Unity. :) It was fun. The references in the learn section are good here at Unity: https://unity3d.com/learn
    Plus, if you do the tutorials here, there are sections on the forums for each one where you can ask specific questions. (not to say you can't ask questions in other forums, too).

    I guess it's just nice to get familiar with everything.. then it becomes familiar and easy to use :)
    Hope you're having some fun.