I want to make a mobile game called "Granny Panties" where players can design a senior…
- User
I want to make a mobile game called "Granny Panties" where players can design a senior citizen character that lives in an assisted living facility, who is trying to sneak into their friend's room without being caught by security guards and nursing staff. The game's camera would be from a bird's eye view as the player controls the character from above. The player would move their character by swiping in the direction they want their character to move in, but the character would only move one step at a time. What would be the best way to build this game? What game engine should be used? What platforms would be best to release this game? What would be the best way to monetize this hyper casual game?
- Assistant
There are a few different options for building a mobile game like "Granny Panties." One popular choice for game development on mobile is Unity, a cross-platform game engine that supports both iOS and Android. Another option is Unreal Engine, which also supports both iOS and Android and is known for its high-performance graphics capabilities.
As for monetization, a common strategy for hyper-casual games is to offer in-app purchases or ads. In-app purchases could include items like additional characters or power-ups, while ads could be shown between levels or as a way to "skip" certain levels. Another option would be to offer a free version of the game with ads, and a paid version without ads.
It would be best to release the game on both the iOS and Android platforms in order to reach the largest possible audience.
Keep in mind that the game's subject matter and gameplay may raise some ethical and legal questions, it would be important to consult a lawyer and verify if the game does not infringe any laws or rights.
- User
If I were to use Unity to design this game, how would you recommend I build this?
- Assistant
If you decide to use Unity to build "Granny Panties," here are a few steps to consider:
- Start by creating a new Unity project and setting up the basic layout of the game, including the camera view and the overall scene.
- Create the character model and animation for the senior citizen character. You can use Unity's built-in tools for animation, or import animations from external software.
- Implement the character movement controls using Unity's input system. This can be done by using touch input (swipes) to move the character in different directions.
- Create the AI for the guards and nursing staff, and set up the collision detection and response for when the character is caught.
- Design the different levels or rooms in the assisted living facility and place the guards and nursing staff in the appropriate locations.
- Design the user interface (UI) for the game, including elements such as a score counter, a pause button, and a game over screen.
- Implement the monetization strategy, whether it be ads or in-app purchases.
- Test the game thoroughly to ensure that it is functioning correctly, and fix any bugs that are discovered.
- User
Can you list out the different logic needed to develop this game with Unity?
- Assistant
Here is a list of some of the logic that would be needed to develop "Granny Panties" with Unity:
- Character movement logic: This would involve using Unity's input system to detect touch input (swipes) and move the character in the corresponding direction.
- Collision detection and response logic: This would involve detecting when the character collides with a guard or nursing staff member, and triggering the appropriate response (e.g. game over screen).
- AI logic for guards and nursing staff: This would involve programming the behavior of the guards and nursing staff, such as their patrol routes and reaction to the character's presence.
- Level design logic: This would involve creating the different rooms or levels in the assisted living facility, and placing the guards and nursing staff in the appropriate locations.
- User
Can you code the character movement logic?
- Assistant
Sure, here is an example of how you could implement character movement logic using Unity's input system:
using UnityEngine; public class CharacterMovement : MonoBehaviour { public float moveSpeed = 2f; // movement speed of the character private Vector3 moveDirection; // direction of movement void Update() { // get input for horizontal and vertical movement float horizontalMove = Input.GetAxis("Horizontal"); float verticalMove = Input.GetAxis("Vertical"); // create a new vector for the direction of movement moveDirection = new Vector3(horizontalMove, 0f, verticalMove); moveDirection = moveDirection.normalized * moveSpeed * Time.deltaTime; // move the character based on the input transform.position += moveDirection; } }This script assumes that you have already set up the input axes in Unity's input manager. It uses the Input.GetAxis() function to get the horizontal and vertical input from the player, and then creates a new Vector3 to represent the direction of movement. The moveDirection vector is then normalized (to ensure consistent movement speed) and multiplied by the moveSpeed variable and Time.deltaTime to move the character. The character's position is then updated based on the moveDirection vector.
- User
Can you code this logic with Touch Input?
- Assistant
- User
Is it possible to adjust the code so each swipe moves the character only one space?
- Assistant
- User
Based on the logic you have already scripted, can you code the Collision Detection and Response Logic?
- Assistant
Sure, here is an example of how you could implement collision detection and response logic in "Granny Panties" using Unity's built-in collision detection system:
using UnityEngine; public class CollisionDetection : MonoBehaviour { public GameObject gameOverScreen; // reference to the game over screen object private void OnCollisionEnter(Collision collision) { // check if the character collided with a guard or nursing staff object if (collision.gameObject.CompareTag("Guard") || collision.gameObject.CompareTag("NursingStaff")) { // display the game over screen gameOverScreen.SetActive(true); // disable the character's movement this.enabled = false; } } }This script uses the OnCollisionEnter() function, which is called automatically by Unity when the object with this script attached collides with another object. The function takes a Collision parameter, which contains information about the collision, such as the point of impact and the colliding objects. In this example, it checks the tag of the colliding object, if it's "Guard" or "Nursing Staff" then it activates the game over screen and disables the character's movement.
- User
Can you please code the AI logic for the guards and nursing staff?
- Assistant
Sure, here is an example of how you could implement the AI logic for the guards and nursing staff in "Granny Panties" using Unity's NavMesh system:
using UnityEngine; using UnityEngine.AI; public class GuardAI : MonoBehaviour { public Transform[] patrolPoints; // array of patrol points private int currentPatrolPoint = 0; // index of the current patrol point private NavMeshAgent agent; // reference to the NavMeshAgent component void Start() { agent = GetComponent<NavMeshAgent>(); agent.destination = patrolPoints[currentPatrolPoint].position; } void Update() { // check if the agent has reached the current patrol point if (agent.remainingDistance < 0.5f) { // move to the next patrol point currentPatrolPoint++; if (currentPatrolPoint >= patrolPoints.Length) { currentPatrolPoint = 0; } agent.destination = patrolPoints[currentPatrolPoint].position; } } } - User
Can you please adjust the code to add a line of sight system and a randomized patrol points?
- Assistant
Sure, here is an example of how you could modify the previous AI logic to add a line of sight system and random patrol points:
using UnityEngine; using UnityEngine.AI; public class GuardAI : MonoBehaviour { public Transform player; // reference to the player object public Transform[] patrolPoints; // array of patrol points private int currentPatrolPoint = 0; // index of the current patrol point private NavMeshAgent agent; // reference to the NavMeshAgent component public float viewAngle = 110f; // the guard's view angle public float viewDistance = 5f; // the guard's view distance public LayerMask viewMask; // the layers that the guard can see void Start() { agent = GetComponent<NavMeshAgent>(); currentPatrolPoint = Random.Range(0, patrolPoints.Length); agent.destination = patrolPoints[currentPatrolPoint].position; } void Update() { // check if the agent has reached the current patrol point if (agent.remainingDistance < 0.5f) { currentPatrolPoint = Random.Range(0, patrolPoints.Length); agent.destination = patrolPoints[currentPatrolPoint].position; } // check if the player is within the guard's view if (CanSeePlayer()) { agent.destination = player.position; } } bool CanSeePlayer() { // calculate the direction to the player Vector3 direction = player.position - transform.position; // check if the player is within the view angle if (Vector3.Angle(direction, transform.forward) < viewAngle / 2) { // check if the player is within the view distance if (Physics.Raycast(transform.position, direction, out RaycastHit hit, viewDistance, viewMask)) { // check if the raycast hit the player if (hit.collider.gameObject == player.gameObject) { return true; } } } return false; } } - User
Based on the previous logic, can you code the level design logic. I would like to have each level design to be randomly generated and as players progress, the size of the level to grow slightly larger.
- Assistant
Sure, here is an example of how you could implement level design logic for randomly generated levels in "Granny Panties" using Unity's GameObject instantiation and random number generation:
using UnityEngine; public class LevelDesign : MonoBehaviour { public GameObject[] levelTiles; // array of level tile prefabs public int levelSize = 5; // starting level size public float tileSize = 1f; // size of each tile private Transform levelHolder; // reference to the level holder object void Start() { // create a new level holder object levelHolder = new GameObject("Level").transform; // generate the level GenerateLevel(); } void GenerateLevel() { for (int x = 0; x < levelSize; x++) { for (int y = 0; y < levelSize; y++) { // choose a random tile from the array int randomTile = Random.Range(0, levelTiles.Length); // instantiate the tile at the current position GameObject tile = Instantiate(levelTiles[randomTile], new Vector3(x * tileSize, 0, y * tileSize), Quaternion.identity); // set the tile as a child of the level holder tile.transform.parent = levelHolder; } } } }In this script, the levelSize variable determines the
- User
Can you code the User Interface logic?
- Assistant
Sure, here is an example of how you could implement a basic user interface (UI) in "Granny Panties" using Unity's built-in UI system:
using UnityEngine; using UnityEngine.UI; public class UserInterface : MonoBehaviour { public Text scoreText; // reference to the score text object public Text livesText; // reference to the lives text object public GameObject gameOverScreen; // reference to the game over screen object private int score = 0; // the player's score private int lives = 3; // the player's remaining lives void Start() { UpdateScore(); UpdateLives(); } public void AddScore(int amount) { score += amount; UpdateScore(); } public void RemoveLife() { lives--; UpdateLives(); if (lives <= 0) { // show the game over screen gameOverScreen.SetActive(true); // disable the character's movement this.enabled = false; } } void UpdateScore() { scoreText.text = "Score: " + score; } void UpdateLives() { livesText.text = "Lives: " + lives; } }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.