Hackster is hosting Hackster Holidays, Finale: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Tuesday!Stream Hackster Holidays, Finale on Tuesday!
Dinesh GundamSamhithaG.MadhupriyaAsam Shivulusaiteja
Created July 31, 2024

Interactive Learning KIT for KIDS Using AI

This kit enhances the interest of AI based learning and inculcate the learning abilities in kids & improve the AI interfacing skills

20
Interactive Learning KIT for KIDS Using AI

Things used in this project

Hardware components

Minisforum Venus UM790 Pro with AMD Ryzen™ 9
Minisforum Venus UM790 Pro with AMD Ryzen™ 9
×1

Software apps and online services

Unity
Unity

Story

Read more

Schematics

Launchpad Blueprint

this image indicates the launching the game and its launching blueprint

moving platforms in the game

india map interfacinfacing

by clicking different states we will get different state portals and information

Telangana state portal

Andhra Pradesh state portal

village atmosphere

this shows the building of village atmosphere in the game

designing blueprint

this is the design blueprints of the schemes

levels in the designing mode

Code

CODE TO DEVELOP VILLAGE ATMOSPHERE IN UNREAL ENGINE 5 STEP 1

C/C++
#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "VillageActor.generated.h"

UCLASS()
class YOURPROJECTNAME_API AVillageActor : public AActor
{
    GENERATED_BODY()
    
public:    
    // Sets default values for this actor's properties
    AVillageActor();

protected:
    // Called when the game starts or when spawned
    virtual void BeginPlay() override;

public:    
    // Called every frame
    virtual void Tick(float DeltaTime) override;

    // Mesh component for the building
    UPROPERTY(VisibleAnywhere)
    UStaticMeshComponent* MeshComponent;

    // Initialize building properties
    void InitializeBuilding(UStaticMesh* Mesh, FVector Location, FRotator Rotation);
};

CODE TO DEVELOP VILLAGE ATMOSPHERE IN UNREAL ENGINE 5 STEP 2

C/C++
#include "VillageActor.h"
#include "Components/StaticMeshComponent.h"

// Sets default values
AVillageActor::AVillageActor()
{
    // Set this actor to call Tick() every frame.
    PrimaryActorTick.bCanEverTick = true;

    // Create and initialize the mesh component
    MeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("MeshComponent"));
    RootComponent = MeshComponent;
}

// Called when the game starts or when spawned
void AVillageActor::BeginPlay()
{
    Super::BeginPlay();
}

// Called every frame
void AVillageActor::Tick(float DeltaTime)
{
    Super::Tick(DeltaTime);
}

// Initialize building properties
void AVillageActor::InitializeBuilding(UStaticMesh* Mesh, FVector Location, FRotator Rotation)
{
    if (MeshComponent)
    {
        MeshComponent->SetStaticMesh(Mesh);
        SetActorLocation(Location);
        SetActorRotation(Rotation);
    }
}

CODE TO DEVELOP VILLAGE ATMOSPHERE IN UNREAL ENGINE 5 STEP 3

C/C++
#include "MyGameMode.h"
#include "VillageActor.h"
#include "Engine/World.h"

// Called when the game starts
void AMyGameMode::BeginPlay()
{
    Super::BeginPlay();

    // Spawn several village actors
    for (int i = 0; i < 5; ++i)
    {
        FVector Location(1000 * i, 0, 0);
        FRotator Rotation(0, 0, 0);

        AVillageActor* NewVillageActor = GetWorld()->SpawnActor<AVillageActor>(Location, Rotation);
        
        if (NewVillageActor)
        {
            // Set a mesh for the actor (assuming you have a UStaticMesh* called BuildingMesh)
            NewVillageActor->InitializeBuilding(BuildingMesh, Location, Rotation);
        }
    }
}

Credits

Dinesh Gundam
2 projects • 0 followers
Btech 2nd year student at Vardhaman collage of engineering, shamshabad from Electronics and Communication Engineering Department
Samhitha
0 projects • 0 followers
G.Madhupriya
0 projects • 0 followers
Asam Shivulu
0 projects • 0 followers
saiteja
1 project • 1 follower
Electronics and communication engineer in diploma and undergraduate student at Vardhaman College of Engineering Hyderabad, Telangana, India.

Comments