PlaceholderGames / DinoPark-2017

repo for Dino Park 2017, the testbed for CS3S667
2 stars 0 forks source link

Stat menu with camera thats follows dinosaur #12

Open rbakerusw opened 6 years ago

rbakerusw commented 6 years ago

The idea is to create a little pop up on the side of the screen when you click on a dinosaur. The pop up will contain a camera that follows the selected dinosaur along with the stats like health, damage etc

Here is a similar implementation with the camera following the handyman: https://youtu.be/be5NrmTHGa0?t=219

rbakerusw commented 6 years ago

A basic camera now appears and follows a heron you clicked on. cameraexample

The camera will disappear when you click on something else.

rbakerusw commented 6 years ago

Thanks to @Pagec531 for noticing an issue where you had to click on a heron with the mouse pointer and not the center of the screen. We may need a cross-hair on the main camera to show where you are clicking.

Edit: I have added a crosshair

rbakerusw commented 6 years ago

Updated version: Camera will now always be positioned behind the object it is following and now a box appears behind the camera that will be used to display stats about the dino such as what state it is in, health etc

I will write a guide on how it works and how the code can be extended to include certain objects soon.

ghost commented 6 years ago

Could this be used alongside my camera hud issue, the hud will give a list of dinos, a key on the keyboard can be assigned to a specific dino in the list, a single press can bring up a camera showing the dino, double tapping it could then let you take over observation camera? https://github.com/PlaceholderGames/DinoPark-2017/issues/30

rbakerusw commented 6 years ago

I can edit it if you want, all I would have to do is change the method I use to get the dinos position.

ghost commented 6 years ago

No that's fine. We will see what Mike thinks as having a camera for each Dino on screen at once might put alot of strain on the system. Your current implementation is fine. I would just need to use it and put it in my branch as I already have the working HUD system

rbakerusw commented 6 years ago

We wont need a camera for each dino, we can have the 1 main camera but change it from mouse click to a key press like you said. We could use the num pad or something to view each dino.

For example, if "1" set position to anky 1, if "2" set position to raptor 1 etc

We just need to decide where the camera will be located on the hud

rbakerusw commented 6 years ago

Never mind this approach would not work because potentially there can be too many dinosaurs so having a key correspond to each one wouldn't work.

ghost commented 6 years ago

Might be worth doing it for only those Dino's that have a panel on screen

DoctorMikeReddy commented 6 years ago

Can you tell me which branch this is on, and what it's current status is @rbakerusw

rbakerusw commented 6 years ago

13194461, currently theres a minimap and the follow cam but right now it doesn't work 100% sometimes the minimap gets stuck and it wont update correctly

DoctorMikeReddy commented 6 years ago

I'll leave it for now then. No point putting something less than 100% in the master branch. However, I do think this is a cool option, so may look at it later.