General questions from a beginner [engine logic, physic]

Hi, I’m starting now with game development and I would like some help.

Right now I’m doing some some preliminar testing for a 2D scroller game and I have some questions.

Game loop - What function/event should I use to handle the updates?
Tick seems to do the job pretty well but how do I handle different frame rates? (if it’s a problem)
How about a retriggerable delay?

Physic - Even after setting linear/angular damping to 0 my “character” (actually a cube, it will be a sprite later) keeps falling aside.
Do I have to hardcode the axis to 0 at every update or there is a better way?
If not should I consider to write my own physic since it’s really simple?

General tips - I’m starting to understand how to “do things” but I don’t know how to do them well engine-wise (which function is better do do what, which approach should I use…).
I also know nothing about patterns for game development. If you know some kind of tutorial about that it would be great!

Thank for reading, have a nice day :slight_smile:

  1. Tick is what you want. Tick should have a DeltaTime parameter which tells you how much time has passed between two ticks. You can use that to handle different Framerates.
    For Delays you can use the delay Node if you are using Blueprint or timers.

  2. For Character Movement it is better to use a MovementComponent to handle movement and not the physics simulation. Can you explain what you tried and what you want to do?

  3. Just look into the youtube channel for UnrealEngine. There also are a lot of users that made tutorials.
    https://www.youtube.com/unrealengine
    https://www.youtube.com/user/MetalGameStudios

There are also a couple of others so keep looking. They should be pretty easy to find.

Thanks for the answer ^^

My project is a flappyBird like experiment, no graphic at all, just a flying cube and obstacles with random position.
To make the cube fly I used setActorLocation with a simple loop for the animation. When it falls if it’s controlled by the physic sometimes it changes its position and rolls down the ground.
To avoid this problem I recreated the gravity with a counter for the accelleration and setActorLocation.
I know it’s not the way to go but it’s just an experiment to get the hands dirty.
The obstacles are a simple BP class generated every 2 seconds inside the level BP, I push them into an array and spawn them at targetPoint_1 location. They are destroyed when reaching targetPoint_2

Also thanks for the tutorials, i saw almost every of them on unrealegine but not on MetalGameStudios.

I don’t have problems with programming logic and art stuff (IT student in university, art in college) but I don’t know yet what the engine expect me to do :stuck_out_tongue: