Skip to content

luvluvdt3/TheLittlePrincess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Little Princess

TheLittlePrincess_ShortDemo.mp4

Unity version

Unity version to run the project: 2022.3.19f1. At the beginning of the course we were told that the version of Unity does not matter as long as all our team members are using the same. Because one of our team members has been running Unity on Linux we were based on what version he has.

đź’ˇ How to use

(!) To clone completely this respository, please do install Git LFS

Fetch all the LFS files from the remote git lfs fetch

Replace the pointer files to the actual files git lfs checkout

  • Go to Build folder
  • Launch TheLittlePrincess.exe
  • Enjoy

If you import the game using unity package and launch the game you won't be able to change scene because the index won't be declared in the parameter. You'll be able to launch individual scene but every transition will lead to an error after the teleportation effect.

How to play in general

  • Control character with WASD / ZQSD or arrow keys
  • Rotate the planet on the third planet by holding the left mouse button and zooming with the mouse wheel.
  • To skip dialogue, enter SPACE or wait for 15 seconds

⚙️What we did


Menu

UI

We used UI Samples with some small modifications in content to create it.

Features

  • New Game: Start the game from the beginning
  • How To Play: The panel showing the manual of the game
  • Quit: Exit the game
  • The 3 planet symbols buttons:
    • Allow to start by choice from planet 1, 2 or 3

Planet 1

As the planet of forms and motions, it was created by an ancien wizard that admires and desires to create a museum-like planet to preserve the beauty of different beautiful creatures that he has found

Features

  • Import Blender files with animations
  • Control animations/materials/sounds/... dynamically
  • Usage of PostProcessing to enhance visual effect
  • Player control with keyboard
  • Dynamic Camera following different characters
  • Control of particles system

Importing Blender files


Planet 2

The planet of velocity and purpose: the race planet. Modern and futuristic, it is a place where the most advanced technology is used to create the most thrilling experience.

UI

The planet starts with a menu where the player can choose the number of laps and the number of opponents. The player can also pause the game and go back to the main menu.

Controls

Apart from the classic controls, the v key allows the player to change camera view. There are 3 camera views available:

  • The main camera
  • An interior camera (this one is not really useful because the car was not designed to be seen from the inside)
  • A first person view from the front of the car

Also pressing escape will open a pause menu that freeze the game for the player to be able to take a break if needed.

Race mechanics

Checkpoints are put along the race. They are intentionally visible, so that the player can see where to go and not try to cut the circuit.

The player can do as many laps as they want, with as many bots as they want. However, the more the number of opponent the more chaotic the race will be, as the circuit is quite small.

Physics are enhanced compared to the TDs so the driving experience is more realistic.

Features implemented

Almost all features from the TDs are implemented in the game. The main difference is the camera animation at the beginning: it was removed because it didn't look good in the game.

The AI is similar but it handles better collisions with obstacles.

And just to make thing clear, yes the asset 'Racing starter kit' that we used contains similar script to the one used in our submission, it's because in order to solve some of our issues we took inspiration from it by reverse engeneering some features to see how to use wheel collider correctly for example. The main thing we took directly from this asset is the race circuit in itself.


Transition 2-3

The main characters movement from the 1st planet have been used as well as the camera tracking. The local character chases the player moving his head in the user's direction (done by Animation Rigging).

Developed/Modified elements

  • Gravitation changes
  • Camera does not goes through the colliders (In the worst cases it moves towards the user)
  • Blinking light
  • Colliding all the scene

Planet 3 - Real-time 3D weather channel

The lab of interaction and exploration, where the user can learn about the current weather in different countries and the climate change in the past.

Arya, still breathing heavily with adrenaline in her blood after the Planet of the Present, moves forward towards the future. However, it turns out that it's not as bright and colorful as she thought. Here, she learns about the pressing problems facing humanity, particularly climate change, and how throughout their history, humanity has been destroying the environment. This makes her contemplate.

Features

We have implemented a real-time weather channel using the OpenMeteo API, which provides 10,000 calls per day for free from one IP address. After the limit is exceeded, the IP is blocked by the API. While 10,000 calls per day may seem like a lot, because we fetch coordinates for several countries simultaneously (in order to display the real-time weather of what the user sees), as well as a climate change graph for each selected country (which requires approximately 7 calls at once), it becomes extremely easy to reach the limit. Additionally, the API sometimes returns an internal error due to the number of simultaneous calls. This is why sometimes you need to click on a country twice to see the climate change graph.

In our planet, we use several complex mathematical calculations, including:

  1. Converting 3D coordinates into 2D coordinates to transform what the user actually sees at the exact moment on Earth and search for countries within the user's field of view.
  2. Transforming 2D coordinates (latitude and longitude) into 3D (X, Y, Z) coordinates for displaying weather labels on Earth and rotating these labels. While not ideal, it is at least readable and understandable. An interesting point to mention is how we search for countries that the user sees. Although there are only 195 countries in the world, we have created our planet targeting a larger number of coordinates for future optimization. To optimize the search in the list of coordinates, we utilized a data structure called KD tree, commonly used in Olympiad programming contests.

Course topics

Planet 3 covers deeply several course topics, including:

  1. Patterns: 1.1. Observer: Whenever one action finishes its execution, it notifies all dependent actions (e.g., LoadData - WeatherAPI - WeatherDisplay, etc.). 1.2. Builder: Rest-API link constructor.

  2. Immersive maps: We are using an exocentric map representation for a planet 3. In spatial representation, an exocentric description (or map) is one that is viewed from an external viewpoint, as if you’re looking at a situation objectively. In our case, it's like viewing the Earth from space.

  3. Architecture: MVC architecture pattern

Developed/Modified elements

All scripts, controllers, and UI elements, except for the models listed in the section below, have been implemented by our team. We did not have any specific examples or tutorials on how to implement this in Unity; we simply drew inspiration from TV weather forecasts.

Used external ressources

General Usage:

Menu:

Planet 1:

Transition 1-2:

Planet 2:

Unity store (mainly asset, script from Racing starter kit only to debug our features) :

Transition 2-3

Unity store (only models):

Planet 3

Unity Store (only models, no scripts):