Community Pass-Around Project (RPG)

This project is made by the Unity Community and is open to all who wish to participate! The only rule for contributions is nothing NSFW. Other than that you can create anything your heart desires, from flying unicorns to bridge trolls!
Original thread.

Builds:
WebGL

How to Participate:
The current Unity version is 5.5.2p4 (Windows Installer | Mac Installer)

Using git:

One of the admins of the repository will merge your work, or let you know if there are any problems.

If you prefer not to use git (though I highly recommend it), you can send either myself or @GarBenjamin a .zip file of your project and we will merge it in.

Artists are welcome! If you don’t want to dive into the project you can post your art pieces here for someone else to integrate into the project.

You can also contribute in the form of ideas or story by replying in this thread.

Guidelines:

  • Don’t rewrite someone else’s contributions unless it is to add a feature you need.
  • Focus on small, focused additions. Expand it over time if needed.
  • Do not use 3rd party libraries unless they are completely free with no license restrictions.
  • Have fun!

Collaborative Tools:
These tools are managed by members of the community and are completely optional.
If you would like to use a new collaborative tool, feel free to create one and let me know so I can link it.

Trello (view | join)

Notes:
With many people working on the project, file conflicts are expected. To reduce the chances, participate in some of the collaborative tools so you can know when the project is not currently being worked on.

I encourage you to post a screenshot or gif of your additions on this thread if you are able. Many of us would like to see them before the pull request can be merged!

If you have an alteration you believe should be made to this post, let me know!

3 Likes

Not sure what was going on I pulled down the latest updates and had missing script errors.
So I just deleted my Asset folder, downloaded the project from your page @DanielQuick and pasted it into my local repo folder. Tested and that fixed it up. All working again. So I committed that to be up to date.

Anyway, then I merged in the updates I made in my dev copy committed and pushed to the web repo.

This is the work I started on the Blacksmith menu system. It is still very much a Work In Progress. I will do more on it in the future. Just wanted to get what I have so far committed and pushed up there.

So… all of that rambling to say… Do A Pull to get the latest.

@GarBenjamin Great! I’ve updated the WebGL build.

I saw you mention stacking cows with the UFO tractor beam over on the past thread and thought I’d give it a try. I managed to make a tower 8 cows high! You can see my first attempt on the left didn’t go so well.

2 Likes

Ha ha! Excellent.

Added a berry bush with regenerating berries. In the future I hope for them to be added to an inventory to be eaten later.

3 Likes

This is getting very nice!

But I thought the game was going to have a top-down camera.

Looks awesome. They look great visually and very nice for gameplay too.

I need to take a deeper look at how your Interaction system works this week. I remember from my first look at it several days ago a simple implementation of the IInteract interface on the target object, adding an Interaction Input Trigger child and wiring up the the target GO reference to that in the Editor handled the Interact start which also makes the little marker go away. What I don’t know is how to make the marker repappear. Like in the case of if I use this for the Blacksmith shop menu. When player exits menu how would I do the InteractEnd or whatever is needed?

I think that is the gist. I am in the dentist chair atm waiting… lol

I added multiple camera views. Top-down, 3rd person, first person, high up top-down Map Generation view and also one for the UFO. The UFO now has its own dedicated camera though but still its own view.

1 Like

As of now it’s a little messier than I would like. You need to have a reference (either through inspector or GetComponentInChildren) to the InputInteractTrigger component and call the ResetTrigger function.

1 Like

Just so people know (and most of you probably already did)…

One of the secrets to working with Unity in git is to make sure you have Auto-Refresh (under Preferences) enabled.

Otherwise when you pull down updates that affect the scene and open the project in Unity it will be broken.

Even doing the Ctrl+R manual refresh at that point won’t resolve the issues and you will get the updates in the scene saying missing scripts and missing prefabs.

I generally keep Auto-Refresh disabled but I make sure to open a project in Unity, enable Auto-Refresh, close it and then do a pull to get latest from git.

I must say I am looking forward to working on this tonight. After I get updates done and working I’ll probably refactor it all. I tend to write up a bulk of code (more like write a bit of code then copy paste edit that code several times) and then later refactor it all to reduce it.

Please do a pull to get the latest:

  • I cleaned up the structure in the Scene a little.

  • Implemented @DanielQuick 's IInteraction method for entering the Blackshop menu for consistency.

  • Also, added an isBusy flag to PlayerControl so if the player is busy (in menu, etc) they cannot move and turn.

I didn’t refactor the Blacksmith menu code yet but I will at some point as well as finishing it off.

1 Like

Okay, I decided to get back to this real quick and refactor the code for the Blacksmith menu to reduce & simplify the page navigation and button click handling.

Please do a pull to get the latest.

Now, I am in a good spot to actually make some forward movement whenever I work on this again. Probably tomorrow.

So… yeah… I wasn’t going to bother with the second pass of refactoring now but I had some time and thought just get it done and out of the way so I don’t have to come back and do it later.

Consolidated the 3 sub menus into 1 sub menu and cleaned up the code for the Blacksmith menu.
Updated the sub menu in the process increasing the overall size and the width of the buttons.
Added the price calculations and display.

Please do a pull to get the latest.

Now, I really am at a good spot to make some forward movement the next time I work on this.

Sure, I might refactor the item display consolidating the 3 sub menu display methods down to 1 at some point but I certainly won’t focus on that next time.

This is just how I work so folks need to get used to it. lol

I pound out some code to get things working and then I go back and refactor later. I suppose it is just designing via code. Sometimes I actually think about it first and even design on paper. All depends on my mood. lol :slight_smile:

Mine craft?

Yeah… so I said I wasn’t gonna do it… and I didn’t plan to… but I should have known I would do it.
I just couldn’t help myself. One more round of refactoring on the Blacksmith Menu.

It was needed especially since I also fixed an issue. I forgot that Finding GOs only works if they are enabled. Of course, can use GetComponentInChildren and specify to include disabled but yeah since Unity seems to be made to wire everything up in the Editor that is what I did.

I don’t mind hard-wiring up references if it is obvious. That is the part I do not like about projects I see in Unity. There is no way other than checking every thing in the Editor or checking the top of every script to find evidence of these Editor hard-wiring requirements.

So, what I did was try to make it clear in the Editor WIRE THESE THINGS. As well as making the Blacksmith menu itself throw exceptions when things have not been wired up literally spelling it out… Did you forget to wire this up? I can live with hard-wiring under these circumstances. And I think this is something that would be good for Unity to recommend as a best practice really. But anyway… I didn’t apply this to everything I have hard-wired but I will do that in my next development session.

Also, ideally I should make the exceptions give some identifying issue to make it easier to locate the relevant GO in the Editor such as EditorPath=Game->Environment->Hamlet->Buildings->Blacksmith Name-BlacksmithMenu, tag=somethingorother. Probably do that next time as well.

Anyway, I think I am content at this point. Because I have made some great progress toward resolving things and have a plan for the rest of the way.

Please do a pull to get the latest.

I think I probably left a couple debug messages in there some place. No worries, I will remove them next time if that is the case.

I do want to move forward but I just want to have a solid pattern & solutions in place to some of the things that have bugged me about Unity. I’m getting there. Should be able to push ahead very soon.

1 Like

Updated to add more of the new pattern to verify the hard-wired Editor dependencies have been set up.

Also added a Translations singleton to serve as an Adapter with methods to convert objects of one kind to another such as converting general GameObjects into CollectibleItems. Yeah, laying groundwork for collecting those berries, identifying them as food… as well as anything else that will be collected in the future.

Please do a pull to get the latest.

  • Updated CollectibleObject to track quantity of items.

  • Updated inventory system to account for duplicates and increment quantity instead of adding as a new item.

  • Updated Blacksmith Menu to display quantity information.

  • Implemented adding the red berries to player’s inventory when they are collected.

Please do a pull to get the latest.

You can now collect the red berries. Only way to verify is to go to the Blacksmith and on the Sell “screen” you will see them.

@DanielQuick I’ve noticed some odd behavior with the interact markers. Go to the bush near the Blacksmith shop and press E once to spawn the berries. Then go inside to interact with the Blacksmith. Sometimes the Interact marker doesn’t appear. It seems to mainly happen if a berry is passing close by the outer wall and is showing its marker. But not sure. And sometimes I have noticed the markers floating around almost randomly. Not sure what is causing it though.

It’s entirely possible the “floating” thing is just how it looks due to the 3D as in a marker appears a ways ahead of the player and if they stop moving and turn around the marker seems to stay directly ahead all of the time. So maybe there is not a check for the marker location being in the player’s los possibly?

Anyway, you may already have it on your list. Just wanted to mention it in case you didn’t.

Finally, making some headway.

Please do a pull to get the latest.

This is an important update for working with Collectible Game Objects (meaning items that anyone wants the player to be able to pick up and they appear in their inventory).

  • Modeled a simple wooden club (much like a somewhat “shaved” stick).

  • Added a CollectibleGameObject Monobehaviour class that can be added to any GameObject we want the player to be able to collect into their inventory.

  • Added 1 wooden club to the scene.

  • Added 3 gold nuggets to the scene.

  • Implemented the conversion from GOs to CollectibleItems for the wooden club and gold nuggets.

Look! A gold nugget is here and in the distance we see a wooden club.

About to pick up the wooden club

IGNORE THIS… Adding a new Collectible GameObject is now simpler and done right in the Inspector. Yes, I am embracing the Unity Way.

See this post below for how it is done now.

…

the old way (well old as in last night)…

How to implement a Collectible Game Object with the new framework

A Collectible Game Object is an item that when picked up (pressing E) goes into the player’s inventory.

  • Look at the Hierarchy and you will see a new empty GameObject named “CollectibleGameObjects”.
  • *
  • You can see 4 CollectibleGameObjects I added. 1 WoodenClub and 3 GoldNuggets.
  • You can just Duplicate one of these to use it to create your new CollectibleGameObject.
  • The WoodenClub (which appears to be whacked in some way but I don’t know about enough Unity to know what. It works fine but at the top in the Inspector simply says “Missing” and doesn’t tell me anything as to WHAT is missing. lol) uses a very simple model I made.*
  • A GoldNugget is just a cube. So just choose the one that is appropriate.*
  • Probably should create prefabs for these things to make it easy but I didn’t do that yet. :wink:*
  • You MUST create a new tag and use it for your new CollectibleGameObject.
  • In the Translations singleton class you will find a method named “GameObjectToCollectibleItem”.
  • You can see how I added the GameObject to CollectibleItem Translations for the RedBerry (which I did previously on an object @DanielQuick created), WoodenClub and GoldNuggets.*
  • *
  • The translation uses the GameObject tag so this is why it is critical that you followed step 4.*

The idea here is that we now have an actual system and process in place for adding CollectibleGameObjects in a way that is consistent and gives them backing data so they are tracked internally and show up in the inventory system. Meaning when you pick up stuff it will be listed when you bring up the Blacksmith menu.

For example, here I am on the Sell “Screen” of the Blacksmith Menu after collecting some gold nuggets, the wooden club and some berries. Yeah, the blacksmith doesn’t want any berries. He can pick them himself but would prefer maybe some fish or deer or wild yagga bagga or whatever. :wink:

Eventually, I will update the Blacksmith menu so some item types will be suppressed. Obviously, the gold nuggets don’t need to show up there. I just left them in for testing purposes.
Also we could make food perish. I have thought about this a few times now and although it is easy at this point I haven’t implemented it. Mainly because I think it is not needed.

Well that is it. It may seem like a lot but in practice adding a new Collectible Game Object takes just a bit of time. So far the system supports Money, Weapon, Armor, Shield, Food and Misc item types. We can always add more if needed.

As you can see we also track a decent amount of information for each item but you only need to fill in what is relevant.

Okay, if any questions just ask.

I will probably take a break on this project until Sunday or Monday. If I do work no big deal I always work in a copy of the folder and do a pull first so I can merge my stuff in before doing a commit and a push.

Doesn’t Unity have a 99 or 100 tag maximum?