Jump to content
  • Advertisement
  • entries
    27
  • comments
    0
  • views
    1824

Project: Fraud Simulator

Setting up core mechanics

KrisWolfe

737 views

This week was a little tougher than the last. Specifically, I wanted to create a skill tree, but I didn't have an idea of what exactly I wanted in the skilltree. I had some general ideas of what I wanted to happen, but nothing specific.

What I want to do is have a scheduler that you choose which active skills you have available, and the more you use a skill, it will unlock others. At the same time, as you progress in a day, the skill will "do stuff".

This week I tried Scriptable Objects, but I did not want my skilltree to be persistent. I decided I would use JSON to load my skilltree eventually. For now I have some test skills hardcoded into my skilltree class. My scheduler was tricky, because I couldn't use prefabs. Each skill would be different, and my attempts at injecting the skill into the prefab failed.

Eventually I decided to recreate a gameobject completely from scratch. This was a huge pain, because there are so many components it needs. Especially Text, which has all kinds of toggles and enums to sort through to get it right.

But today I got it working. I have a grid on the right that spawns "spawners" on the right for each active skill in the skill tree, and these spawners will create 1 object I can drag around. When I drag that object, it will create another object, so I can have multiple objects. My scheduler has 16 hours that will attach the draggable object to itself, so that my day schedule can count how many of each skill are in the scheduler.

It works. It might be horrible code, but it works.

This week: Get a visual skill tree up that shows what skills unlock, and have the skills actually do something when we're in the schedule. 

 

So to recap, what I currently have working: Purchase Orders work, with a 2 day delay, recreating an aspect of "The Beer Game". Customers vary depending on the day. All calculations for storage and inventory works, and if you have too much it gets rid of it, and if you don't have enough to sell to customers, it won't sell. Small economy is working, allowing us to hold inventory and cash and deduct and add as you sell. A scheduler that counts how many skills are in it. A skilltree that has unlocked and locked skills, and the ability to unlock skills and make them active.

Pretty happy with what's done in a week.

 

Here's some crappy photos of my game so far with free art assets I found off the store. Lots to polish when the game mechanics are in place.

IncomeSheet.JPG

Schedular.JPG

BalanceSheet.JPG




0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By cody_owens
      Hello everyone! I have recently been developing a small game in unity for web browsers. I have noticed that the game plays slightly differently in browser vs in editor. The main thing that changes is the movement speed of the main character. I was wondering if anyone could give me a run down of things to watch out for when developing for browsers in Unity.
    • By LightScythe
      Q: Hy guys , i am working on a racing game and i made the roads as a rigged model in maya (joints will control the tracks curves) , and when i imported the FBX model to UNITY i couldn't make the collider match the track when it curves , used mesh collider and feed it the skinned mesh to use to collide but it won't work , made a script to feed it the mesh realtime and it still won't , anyone knows how to do this ? (P.S: i am working on a VR game so performance is crucial)
    • By Gautti
      Hi, I have developed the  Slot game for Linux and Windows in Unity. Right now the game is in testing phase. The issue is when tester play the game continuously for 5 to 10 hours, Ram of the system increases drastically and sometimes the game is crashing.  So please give me the best way to solve the ram issue and crashing issue as well.
      I am using following system configuration :
      Ram :  8 GB
      Processor : Ryzen 3
       
       
    • By kensarto
      RectTransform rect = RCPanel.GetComponent<RectTransform> (); float width = rect.sizeDelta.x; float height = rect.sizeDelta.y; float distanceLeft = Input.mousePosition.x - (RCPanel.transform.position.x - width/2); float distanceRight = Input.mousePosition.x - (RCPanel.transform.position.x + width/2); float distanceTop = Input.mousePosition.y - (RCPanel.transform.position.y + height/2); float distanceBottom = Input.mousePosition.y - (RCPanel.transform.position.y - height/2); //Debug.Log (Input.mousePosition.x + ", " + Input.mousePosition.y); Debug.Log (distanceLeft + ", " + distanceRight + ", " + distanceTop + ", " + distanceBottom); if (distanceLeft < -10) { RCPanel.SetActive (false); } if (distanceRight > 10) { RCPanel.SetActive (false); } if (distanceTop > 10) { RCPanel.SetActive (false); } if (distanceBottom < -10) { RCPanel.SetActive (false); } I am currently using the following script to determine whether the mouse is within 10 units of the mini menu (RCPanel stands for right click panel, i.e. the panel that i want to open when i rightclick). Mathematically it makes sense but there appears to be a flaw in my logic somewhere in the calculation of the 4 distance variables that I believe has something to do with the canvas scaling or conversion between mousePosition in real space and canvas space.

      How can I account for the differences so that regardless of screensize or canvas size, the calcuation works correctly. Image provided below of how the mouse doesnt sit where it says it should be sitting. (distance left states a value of 10, but the mouse was positioned just barely to the right of the left border, which should produce a number between 0 and 1 units roughly) (had to redraw the cursor position in to show where it was since it wasnt captured)

    • By Cuber01
      Hello,

      I am trying to create a smooth camera movement script. I have been able to get the smooth movement that I wanted but the gameobject that the camera follows moves forwards as well as bounces up and down. I only want the camera to follow the gameobject when it is moving forwards and not when the gameobject is bouncing. I am looking for a way to have it where I can restrict the movent of the camera along the x-axis. Here is the script that is on the camera
       
         
          public Transform target;
          public float smoothSpeed = 0.125f;
          public Vector3 offset;
          private void FixedUpdate()
          {
              Vector3 desiredPosition = target.position + offset;
              Vector3 smoothedPosition = Vector3.Lerp(transform.position, desiredPosition, smoothSpeed);
              transform.position = smoothedPosition;
          }
       
      If anybody has any suggestions that would be great!
       
      Thanks!
  • 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!