Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

162 Neutral

About ZeroRadius

  • Rank

Personal Information

  • Interests
  1. ZeroRadius

    Aspect Ratio in Unity?

    Thank you for the reply. I think I will just put extra filler (walls, trees, etc) between each "screen" that way the stuff being cut off in some aspect ratios will not be important (or playable area)
  2. ZeroRadius

    Aspect Ratio in Unity?

    Hello, I started a new project, it is a slightly angled top down RPG. The camera will not follow you but instead when you walk to the edge of the screen it will take you to the next screen that the edge was connected to by moving both the camera and the player to the next "room". I would like each screen to look exactly the same across all devices no matter the aspect ratio (right now things get cut off when I change the aspect ratio), is there a way to do this so that I get a consistent experience across all devices?
  3. Hello Guys and Gals, I am in the early stages of building a board game (turn based) for Android. I want to store data about ongoing games such as player positions (on the board), player scores, player turn order, etc. The game can go via multiple sessions (you don't have to complete the game all at once) So I need to store the game data on a server. Can I use something like hostgator (a shared server that (says it) has unlimited bandwidth? I already have a hostgator account that I use as a test area for web dev (no active sites on it). Or does google play have a solution?   Thanks in advance ~Zero
  4. ZeroRadius

    Unity MovePosition() not working?

    Thanks! Now my character is not toppling over. I never realized one of those said rotation. I don't know how to mark this as answered but it is. Thanks to everyone for the help!
  5. ZeroRadius

    Unity MovePosition() not working?

    Thanks for the reply. I might end up writing my own physics but I'm going to try and use addForce first. I figured out why the addForce was not working. I had the Constarints >> Freeze x/y on so tht my character would not topple over. I think i will try creating an empty game object and making the sprite and the collider seprate. Thank you both for the help.
  6. ZeroRadius

    Unity MovePosition() not working?

    Thank you for the reply. I did try Fixed update but when it did not change anything i changed it back. I would use addForce as a last resort but I can't  seem to get it to work for moving right/left, i can only get it to work for jumping.   I:m doing this:: this.GetComponent<Rigidbody2D>().AddForce(this.transform.right * this.Speed * Time.deltaTime); I moved my speed up to 5000 from the 5 that I was using with the transform.translate and my character does not move. The only thing I can get to move my player left and right is transform.translate. I even tried using .velocity
  7. Hello,   A bit of background::::: I wrote a 2D player controller in C# and it was working fine until I realized that I could go through the back of box colliders. if I hit the collider from the front it pops me up to the next collider up (it's stairs doe they get smaller as you go up) if you hit it from the back (where the stack of colliders are aligned) it lets you go through the collider and back to the front of the object. I tried adding a Polygon collider to see what would happen and it pops you to the bottom of the collider rather than treating the back of the  collider as a solid wall. I am using transform.translate() for movement   I posted this problem on unity answers and was told that I should use addForce or if I did not want to do that then use Moveposition and it would fix my problem. My problem now is that I cannot get moveposition to work.   I have it written like this: void MoveRight() { //this.transform.Translate(Vector2.right * Speed * Time.deltaTime); this.GetComponent<Rigidbody2D>().MovePosition(this.transform.position + transform.right * this.Speed * Time.deltaTime); } Here is the full player controller:: please note that I am only using movePosition in the MoveRight() method which is what I am trying to get working. using UnityEngine; using System.Collections; public class PlayerController : MonoBehaviour { public float Speed = 2f; //Player Movement Speed; public float JumpForce = 300f; // Fource to add to player jump (how high he goes) private string Platform = "Desktop"; // What device is game being played on private int Jumps = 0; // How many jumps has player made (resets to 0 when player lands, this helps with Double jumps) public Transform GroundCheckPoint; //Empty Game object, check if it touches ground to allow jumping public float GroundCheckRadius; // How big a radius to give GroundCheckPoint public LayerMask GroundLayer; // Layers to allow jumping on public bool Grounded = true; // Is player touching the ground public bool TouchLeft = false; public bool TouchRight = false; public bool TouchJump = false; public bool TouchPowerUp = false; public bool TestMobileControls = false; void Start() { if (Application.platform == RuntimePlatform.WindowsPlayer) this.Platform = "Desktop"; else if (Application.platform == RuntimePlatform.Android || Application.platform == RuntimePlatform.IPhonePlayer) this.Platform = "Mobile"; if (TestMobileControls) this.Platform = "Mobile"; //If they are not playing on mobile. Hide touch controls if(this.Platform != "Mobile") { GameObject[] mobileUI = GameObject.FindGameObjectsWithTag("MobileControl"); foreach (GameObject ui in mobileUI) ui.SetActive(false); } } void Update () { Grounded = Physics2D.OverlapCircle(GroundCheckPoint.position, GroundCheckRadius, GroundLayer); switch(Platform) //Change controls based on device that game is being played on { case "Desktop": this.PcMove(); break; case "Mobile": this.MobileMove(); break; } } void MoveLeft() { this.transform.Translate(-Vector2.right * Speed * Time.deltaTime); } void MoveRight() { //this.transform.Translate(Vector2.right * Speed * Time.deltaTime); this.GetComponent<Rigidbody2D>().MovePosition(this.transform.position + transform.right * this.Speed * Time.deltaTime); } void Jump() { if (this.Grounded) { // If player is touching the ground this.GetComponent<Rigidbody2D>().AddForce(transform.up * JumpForce); } } void PcMove() { if (Input.GetKey(KeyCode.D)) this.MoveRight(); if (Input.GetKey(KeyCode.A)) this.MoveLeft(); if (Input.GetKeyDown(KeyCode.Space)) this.Jump(); } void MobileMove() { if (this.TouchLeft) this.MoveLeft(); if (this.TouchRight) this.MoveRight(); if (this.TouchJump) { this.Jump(); this.TouchJump = false; } } } I have been searching the web but my code looks correct to me. any ideas what I am doing wrong in MovePosition() ?   Thanks in advanced ~Zero  
  8. Hello Guys and Gals, So I am working on my first game which i do not plan to release but I am trying to get together all the resources that i will need when I create my first "real" game. I am building mobile games. I want to release on mac/android/windows mobile stores. I have a PC but I know that I need a mac to compile the Xcode that unity spits out. I want to get an old mac mini that will be used only for compiling the xCode. What are the minimum requirements that I can use (hardware and os version).   Thanks in advanced, ~Zero
  9. (>.<) Wow, yah it was also attached to a empty Game. I forgot I originally had this script set up for OnClick and thus had it attached to  a empty game object. Seriously I read your reply and went "I wouldn't do that" then decided to double check everything in the hierarchy and found it. Thank you For the help and I'm sorry that I wasted your time.
  10. Hey guys and gals,   So I'm working in unity using C#. I am trying to get OnPointerUp / OnPointerDown to work. Right now I'm just using Debug.Log() to show that everything is working correctly. At first I had the Debug comands in the OnPointerUp / OnPointerDown methods and everything worked as expected. Then I moved the debug statements to the Update method and used an if/else statement to determine if the button is up or down. The weird thing is that the message to be shown  OnPointerUp  executes continuously even if I have the mouse pointer down. The message for OnPointerDown only goes when the mouse pointer is down.    I tried switching the else to an if else (I knew it would not work but i'm desperate) and I changed the Debug message to make sure that I don't have a random message in another code displaying the same thing.     Here's my code: using UnityEngine; using System.Collections; using UnityEngine.EventSystems; //Added public class MultiTouchForMobile : MonoBehaviour, IPointerDownHandler, IPointerUpHandler { public GameObject Target; private bool isDown = false;//Is the button currently being held down private bool undo = false;//Keeps track of wether decrement has been called. If true decrement has not been called private float downTime; public void OnPointerDown(PointerEventData eventData) { this.isDown = true; //this.downTime = Time.realtimeSinceStartup; } public void OnPointerUp(PointerEventData eventData) { this.isDown = false; } void Update() { if(isDown) { Debug.Log("Down"); } else { Debug.Log("UpEvent"); } } public void Ignore() { Target.GetComponent<PlayerMovement>().AddIgnored(); } } Thanks in advanced, Zero
  11. ZeroRadius

    Stuck in a programmers rut.

    try project Euler http://projecteuler.net/
  12. ZeroRadius

    Allegro installation?

    ok, I think I got it. I am no longer getting those errors. I am instead getting 1>------ Build started: Project: test1Console, Configuration: Debug Win32 ------ 1>LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== [/quote] After a little googling it looks like I have to uninstall my vs 2010 and 2012 along with frameworks 4.0 and 4.5 and then re-install vs 2010 ..... the point is the code that is calling allegro is no longer underlined in red and no longer throwing an error (unless this new error for console apps is just taking precedence). Any way it looks like it will be work for my next day off. This issue was solved. Thanks everyone. Black-rook your a life saver Edit: Actually I only had to install SP1 for VS 2010 and now it is working!!! I finally get to start my adventure in game programming! Thank you!!!
  13. ZeroRadius

    Allegro installation?

    OMG you are awsome! That worked ....on the first error. I have another error: 1>------ Build started: Project: AllegroTest2010, Configuration: Debug Win32 ------ 1> main.cpp 1>c:\allegro\include\allegro5\allegro.h(26): fatal error C1083: Cannot open include file: 'allegro5/base.h': No such file or directory ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== [/quote] even thou I knew it would not work I tried to use an include directive for it ....... obviously it did not work.I am going to try googling it, but if anyone knows how to fix it I would appreciate you telling me. @Black-Rook - Does this website have rep/karma if so how do i give it to you (or is that what the little arrows under your avatar is for?) Thank you so much, I'm glad to make progress on this, I was about to give up.
  14. ZeroRadius

    Allegro installation?

    same thing: 1>------ Build started: Project: AllegroTest2010, Configuration: Debug Win32 ------ 1> main.cpp 1>c:\users\zeroradius\documents\visual studio 2010\projects\allegrotest2010\allegrotest2010\main.cpp(2): fatal error C1083: Cannot open include file: 'allegro.h': No such file or directory ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== [/quote]
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!