Jump to content
  • Advertisement
  • entries
    26
  • comments
    0
  • views
    1708

Project: Fraud Simulator

My code really isn't as bad as I thought

KrisWolfe

961 views

This week I've been working on bugs and doing a little refactoring.

I finally hooked up the scheduler to the economy. This actually made me realize I'm a much better coder than I was giving myself credit for. For instance, my old rescheduler code took strings in of the skillnames and then looked through my scriptable objects for it. I changed the code and deleted it from scriptable objects because I want to edit skills with a JSON editor eventually. Well, instead of a string, I gave it a reference to the skill. And it worked. I was applying all the SOLID principles without even realizing it.

So then I thought, "Well ok, I have a list of skills from the scheduler, now how do I get it to affect things." The skill I was messing around with was "Execute recipe." The skill itself is linked to a company, so it doesn't care what kind of company it is. I went to go and write the code to execute the recipe, but I'd already written it for NPC's to mess with. And since my player was also an NPC through inheritance, I literally just called the method and it worked...without a bug. Open closed principle, done and done.

Now instead of hiring an employee, the player can simply work for 8 hours and do the same thing for their company. So there will be a decision of what you want to handle in your company, or whether to hire someone to accomplish it, and you only have so much time in the day.

I realized I hadn't even set it up so you could hire an employee. So opened up the market code after taking about a week from looking at it, and started to see some issues. Just by looking at the code, I found some other bugs...like the method that went through and counted all the inventory at the end of the day wasn't working, so had to check that...and if a job contract expired, the employee wouldn't stop working and would keep getting paid.

Another issue I saw was performance. When I hit the next day button or initialize the economy, it went freeze up for a couple seconds. I figured I would run into that eventually. But then I realized it was my Debug.Logs that were hitting performance...a bunch of outputs to show me what was happening. Once I took them all out, I have no noticeable slowdown. My computer is from 2010, as well.

All in all, I felt really worried about my code. But now, I'm starting to see it's actually not too bad. It still needs to be refactored, but it's easily navigable, simple to add behavior to, and adheres to alot of the SOLID principles I was worried about.

I am running into an issue of motivation. I don't have the drive I did before that would keep me up until 3 in the morning. My creation is kinda boring to mess around with. It's now WORK. And work sucks. I went through all the screens, adding buttons and functionality to navigate. But I'm finding myself being drawn to do other things. I want to start making a different type of game, or do another hobby. After reading a lot of blogs on game makers running into the same issue, I know not to do that. Don't rewrite my entire code base. Don't keep starting projects that I know I won't finish. Finish the game.

I find it best not to listen to music, but to listen to game developers talk about making their game in the background. Keep the motivation up.

Here's a picture of my scheduler at the moment with it's single skill in the game. I will add skills to the game as I run into something I want to code. For instance, I want the player to have a managing skill that gives bonuses to employees. I think I might make a screen that shows the company hierarchy next, where you can drag and drop employees and yourself into roles, and then have internal controls for each job as well...some jobs require certain controls to even function...and if you give too many controls, employees can steal from you. Guess that'll set myself up to begin creating the main mechanic of the game, Fraud.

Scheduler.JPG

Scheduler2.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 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.
    • By intenscia
      mod.io is an cross platform mod service created by the team behind ModDB.com and IndieDB.com. It can be integrated in-game using the  REST API, C/C++ SDK or engine plugins (if available) Unity is ready and Unreal Engine is in development.
      Features include:
      Platform agnostic (support 1 click mod installs on Steam, Epic Games Store, Discord, GOG, itch.io and even consoles in the future) Clientless (mod.io has no other dependencies and works behind the scenes in your game) Embeddable web app UI, so you can integrate your mod community anywhere Powerful search, filtering and tagging of mods Moderation and reporting systems built-in Steps to getting mod.io integrated:
      Add your game to our test environment or production Read our API documentation for an overview of how mod.io works Choose an Engine Plugin, API or SDK to integrate mod.io into your game and mod making tools Ready to launch? Add your game to our production environment then let's discuss promoting your release Need help? Our team is available on Discord to assist and our getting started guide has more information for you  
       
      Benefits of using mod.io:
      mod.io offers the same core functionality as Steamworks Workshop (1 click mod installs in-game), plus mod hosting, moderation and all of the critical pieces needed. Where we differ is our approach to modding and the flexibility a REST API offers. For example: 
      Our API is not dependent on a client or SDK, allowing you to run mod.io in many places such as your homepage and launchers Designing a good mod browsing UI is hard, our plugins ship with a UI built in to save you a lot of effort and help your mods stand out We don’t apply rules globally, so if you want to enable patronage, sales or other experimental features, reach out to discuss Our platform is built by the super experienced ModDB.com team and is continually improving for your benefit Your community can consume the mod.io API to build modding fan sites or discord bots if they want Large studios and publishers:
      A private white label option is available to license, if you want a fully featured mod-platform that you can control and host in-house. Contact us to discuss.
      Find out more:
      Visit mod.io | About us | Add your game | Chat on Discord
      These screenshots are from our Unity plugin:




    • By INTwindwolf
      THE PROJECT

      INT is a 3D Sci-fi RPG with a strong emphasis on story, role playing, and innovative RPG features such as randomized companions. The focus is on the journey through a war-torn world with fast-paced combat against hordes of enemies. The player must accomplish quests like a traditional RPG, complete objectives, and meet lively crew members who will aid in the player's survival. Throughout the game you can side and complete missions through criminal cartels, and the two major combatants, the UCE and ACP, of the Interstellar Civil War.
      Please note that all of our current positions are remote work. You will not be required to travel.
      For more information about us, follow the links listed below.
      INT Official website
      IndieDB page
      Also follow social media platforms for the latest news regarding our projects.
      Facebook
      Twitter
      CURRENT OPEN POSITIONS
      Website Manager
      3D Character Modeler
      3D Environment Modeler
      3D Animator
      Unity Engine Programmer
      REVENUE-SHARE
      The project is marching increasingly closer to be ready for our crowd-funding campaign. Being an Indie team we do not have the creative restrictions often imposed by publishers or other third parties. We are extremely conscientious of our work and continuously uphold a high level of quality throughout our project.
      We are unable to offer wages or per-item payments at this time. However revenue-sharing from crowd-funding is offered to team members who contribute 15-20 hours per week to company projects, as well as maintain constant communication and adhere to deadlines. Your understanding is dearly appreciated.
      TO APPLY
      Please send your Cover Letter, CV, Portfolio (if applicable), and other relevant documents/information to this email: JohnHR@int-game.net
      Thank you for your time! Please feel free to contact me via the email provided should you have any questions or are interested to apply for this position. We look forward to hearing from you!
      John Shen
      HR Lead
      Starboard Games LLC
  • 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!