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

Project: Fraud Simulator

One small step in algorithms

KrisWolfe

1098 views

So, from my last update, I got most of it working. Using 3 interfaces, I have the CEO of a company being created, and all the idle employees being placed into the idle panel, along with an empty slot being spawned in order to start getting people managed and working.

ProgressUpdate.thumb.JPG.a2eb1a505b99555e8d04ba3bceedf99a.JPG

Which is all fine and good. I'm pretty happy with how the concept worked out. I had trouble working with interfaces for the first time, because I didn't realize what properties were. When I tried to put a field into an interface, it would kick it back. So I thought I couldn't have guaranteed fields for interfaces. I tried to make get methods, but as I began to work on the display level of the code, it was causing all kinds of problems. I finally looked it up online if I could guarantee fields, and discovered properties and get/setters. I don't really understand what the difference between a field and a property is, as in why you would have fields at all if there are properties in the language, but here we are.

As soon as I put properties into my interfaces, the display code just fell out easily.

So, now I'm at a crossroads. How does the tree know where to place all these card holders onto the board? Clearly we can't have them stacked on top of each other. How does it detect to place an empty? Where does it place it? What if I pull a card out of a slot...does it disappear? Do the other slots need to be reordered? I want to add managers to managers, increasing the tree. Where does it place these cards? Do we start at the bottom or the top?

This is going to require math, unfortunately. I'm going to have to develop some algorithms on detecting which tier of the tree we are at, how many items are in the tree at that tier level, and so forth.

So for now, at a wall. Time to research and figure out how it needs to be displayed.




0 Comments


Recommended Comments

I took a simplified version and said, all fields are private. If I want to expose that, I make a property. At the property level, I can control the access of my get and set or not at all. [ref]. Next, when I found out from [here] what could be done in code with the editor interface, the game changed. Check it out a little if you have not already. If your cards are actual game objects, then "tutorial:Building a graph" may be helpful. Something decent under every stone over there.

Share this comment


Link to comment
4 minutes ago, GoliathForge said:

I took a simplified version and said, all fields are private. If I want to expose that, I make a property. At the property level, I can control the access of my get and set or not at all. [ref]. Next, when I found out from [here] what could be done in code with the editor interface, the game changed. Check it out a little if you have not already. If your cards are actual game objects, then "tutorial:Building a graph" may be helpful. Something decent under every stone over there.

Thanks for the advice! I'm looking at some code that displays binary trees as well. I'll check out yours as well!

Share this comment


Link to comment

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 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 SquallySubset43
      Hey, everyone. I'm quite new to game development but I dabble in blender and unity. I'm just looking to see if anyone would like to collab or mentor me. I'm in the UK and just looking for someone to talk to about how to get started such as how should I start off. Should I just get a college diploma in game development or just do it as a hobby etc. 
       
      Thanks josh
    • By kensarto
      I'm looking for pointers before I get started developing one from scratch, I do not have, or plan to spend money on other peoples scripts or products to import into my project which means I can neither see how they do it, nor use their systems directly. As such, this will be entirely hand written to match what I need.

      The specifications are as follows:
      Unique Actors that prompt different conversations, whether that be an NPC conversation, or the interaction with a work station and selecting options. Branching conversation paths (and therefore a method of storing variables to short and long term store flags for different states) Localised scripts.  I do not want to have 3 or 4 different scripts on every object just for this, it would be optimal in my opinion to have a single dialog manager script, but i will be happy if i have to include an "actor" script on the different NPCs along with that. UI (arguably the easiest of the requirements that will sort itself out when I've got everything else working over time) Is there anything obvious I'm missing about functional requirements, non-functional requirements? What is the best place to get started?
    • By Titanomachy Studios
      Project Name: Condors Vs. Ocelots
      Team Size: 15ish
      Genre: Strategy RPG
      Engine: Unity
      Roles Available:
      3D Artists - generalist or hardsurface w/textures
      2D Artists - Characters, World, and UI
      C# developer/engineer(s)
      Social Media/Marketing/Community Manager
      If you feel as if you can offer the team something more that isn’t listed, we are always open to making an exception, just send your resume/portfolio to us!
      Project Length: Currently planning on release Q1 2020.
      Compensation: Rev-share
      Project Status: Vertical slice is done and iteration development has begun.
      Send emails to careers@titanomachystudios.com
       
      Must speak English and have access to a Mic.
       
      Our store page can be found here, https://play.google.com/store/apps/developer?id=Titanomachy+Studios
      Our website here,
      http://titanomachystudios.com/#/
       
      Project Story: Condors and Ocelots have been at war for generations. Battles have left some settlements in ruins. Others teem with refugees. Even away from the fighting, towns and villages suffer from having their fighting-age citizens lured away or conscripted by one faction or the other. Players control their armies and try to wipe out their opponents! Use terrain, abilities and pure cowardice if need be to achieve victory for your faction!
    • By RoKabium Games
      The Riverine design looking like a snake didn’t work very well with the animation so we re-designed this creature to look more like a colourful caterpillar type of animal.
  • 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!