Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Wanting to create a game like this...

Discussion in '2D' started by diabeticcop, Jan 18, 2015.

  1. diabeticcop

    diabeticcop

    Joined:
    Jan 18, 2015
    Posts:
    4
    Dont know if anyone ever played a old game called Cokemusic. Its where you can buy furniture and walk around and talk to people and have your own rooms. Its kinda like Habbo Hotel also. Well right now I am just wanted to create a game I can play alone, then later add the feature of other people joining. The problem im having is that I am new to Unity2D. I am used to Unity3D. Creating the level is no problem, But where can I find a good tutorial on teaching me how to have my character walk on tiles. I am creating the game right now off of this picture I have of cokemusic and I want my charcter (box right now) to walk only on the tiles. How would I go into selecting which tiles my character can walk on so he doesn't walk off the map. Thank you in advance!

    Cokemusic.jpg
     
  2. Zoubidub

    Zoubidub

    Joined:
    Jan 18, 2015
    Posts:
    3
    Hello, you must make a 2D Array with the size of your room. Fill it with 0 or 1. 0=walkable 1=forbidden. Example for the form of the room from your image : int[,] room = new int[4, 4] {{1, 1, 0, 0},{1, 1, 0, 0},{0, 0, 0, 0},{0, 0, 0, 0}};
     
  3. KaaPex

    KaaPex

    Joined:
    Jan 17, 2015
    Posts:
    16
    Hi!
    You have to discover some isometric engines and how dose they are working. For example OpenSpace.

    First of all set up your main camera as "Orthographic"))
     
  4. diabeticcop

    diabeticcop

    Joined:
    Jan 18, 2015
    Posts:
    4
    Do you know of any tutorials that I could view for this? Sorry, I'm pretty new to 2D in Unity. Also, Would I have to create a level, or could I just add a picture in the background and have the character pretty much float on the background. I created this picture in photoshop for the background/floor, could I just use the image or do I have to create something new in Unity? Thanks so much!

    plain.png
     
  5. Cybearg

    Cybearg

    Joined:
    Jan 18, 2015
    Posts:
    46
    There's no reason why you couldn't use that image. Really all you're doing is positioning the character sprite in font of the image in a way that fools the eye into making it look like the character is standing in the room.

    However, I'd imagine that it would be overall better if you set up some kind of system that could allow you to build a level up from smaller pieces, modularizing the process. Having a bunch of levels consisting of large, static images is pretty inefficient.
     
  6. diabeticcop

    diabeticcop

    Joined:
    Jan 18, 2015
    Posts:
    4
    I actually went in and created a level inside Unity using cubes. Everything looks good but I have to try and find out a click to move script and still I don't know how to make him move by squares.

    Untitled-5.jpg
     
  7. Cybearg

    Cybearg

    Joined:
    Jan 18, 2015
    Posts:
    46
    Hey, nice job on that isometric view! Looks great!

    Don't quote me on this, but I would think a click-to-move script would be fairly simple to make. You click, the event handler gets the mouse vector and sets it to a moveTo variable on the player, and the player moves toward the moveTo vector. I'm guessing you'd also want to make sure that the mouse click is clicking on a valid object.

    Can a collider detect mouse clicks? Maybe if you put a dummy object at the mouse's vector and then checked its collision when the mouse clicks, thus determining if the player is clicking in a valid move location (that is, clicking on a floor tile) or not...

    Those are just my thoughts. Maybe someone else knows of a robust, pre-built option.
     
  8. MordeKaiser07

    MordeKaiser07

    Joined:
    Nov 25, 2021
    Posts:
    1
    How was everything now?? Im from 2021 XD And I wanted to make the same game like Habbo Hotel please contact me on my email if you have time "zyrllpasilan7@gmail.com" I want to learn it and make it too or we could collaborate
     
  9. MelvMay

    MelvMay

    Unity Technologies

    Joined:
    May 24, 2013
    Posts:
    10,417
    You're resurrecting a thread from 6 years ago and replying to a user who last posted around the same time. Please don't do this.

    We have a dedicated forum for Non Commerical Collaboration so please post there instead.

    Thanks.