so... nothing yet, about the camera system.
Asked Answered
L

13

0

my previous post is more specific about my issue:
https://mcmap.net/q/131/godot-topdown-rpg-camera-must-move-only-when-character-hits-the-edge

but after some time messing around, I truly find what I need:

  • a way to link many "rooms" (a node with a portion of my map), like in the old Zelda games, or more recently, FAITH: the Unholy Trinity.
  • if it helps, my project is a topdown FAITH fangame, you know, atari/NES-style, kinda "lowpoly".
  • the camera must frame the "room" which the camera is in, not follow the player.
  • the "rooms" entered should not be random, but instead created by me. the character just move inside the rooms, cycling between them.

I was following this tutorial, but I don't get exactly how this work. like, it "destroy" the previous room, when the player moves to the next room, creating another right on side (?). maybe my script, and my map can be simplier than this. any help, question or tip is welcome!

Leathery answered 9/11, 2023 at 14:23 Comment(0)
F
0

Leathery it "destroy" the previous room, when the player moves to the next room, creating another right on side (?)

I can't watch the video right now, but I imagine if you're "moving" from room to room by destroying the old room and creating a new one, then you'd create it in the same spot as the old room. In that case the camera wouldn't move either (assuming all rooms are the same size), you'd only have to move the player.

Flareup answered 9/11, 2023 at 14:44 Comment(0)
L
0

Flareup yea, but I don't really like that "setup", got it? I just want it to move between the "rooms".

Leathery answered 9/11, 2023 at 14:51 Comment(0)
S
0

Leathery Do you want to keep your old, out-of-view rooms alive and in memory or do you want to remove them?

Supervisor answered 9/11, 2023 at 14:54 Comment(0)
F
0

With one big map, the way I'd think to do it is:

  • decide on the size of one room, set the camera/game resolution to the same size
  • create boundaries around the edges of the screen
    • make them around the camera, not inside it, so the player has to actually "leave" the screen to trigger them
    • make them move with the camera, so you don't have to create them for every room (and so the player doesn't trigger edges of rooms they're not in)
  • if player moves past the right boundary, and a room exists to the right, move the camera(+boundaries) horizontaly by the width of one room
  • if player moves past the bottom boundary, and a room exists to the bottom, move the camera(+boundaries) verticaly by the height of one room
  • same for left and top, just move them by negative values...

Writing this one the top of my head, so I'm sure there's some issues with it... :-)

Flareup answered 9/11, 2023 at 15:2 Comment(0)
F
0

Supervisor Leathery
Yep, do you plan on having enemies or moving objects? if yes, do you want them to reset every time you leave the room?

Flareup answered 9/11, 2023 at 15:4 Comment(0)
L
0

Supervisor remove them looks better from now on.
think a step-by-step tutorial should be better to me, since I don't know what exactly do.

Leathery answered 9/11, 2023 at 15:13 Comment(0)
L
0

Flareup the problem is I'm a begginer, it's hard to understand exactly what I should do, got it?

Leathery answered 9/11, 2023 at 15:26 Comment(0)
L
0

Flareup no, I don't want them to reset. I was thinking about creating a "room template", and afterwards, placing enemies and tiles from my tileset. Its a topdown "RPG", and I'm wishing to do it turn-based.

Leathery answered 9/11, 2023 at 15:29 Comment(0)
L
0

is this really that complex? ๐Ÿ˜•
I just... don't know.

Leathery answered 9/11, 2023 at 21:50 Comment(0)
H
0

Leathery the problem is I'm a begginer, it's hard to understand exactly what I should do, got it?

You should make a simpler project then. Perhaps do an introductory tutorial from official docs that shows how to build a simple game from start to finish.

Hegumen answered 9/11, 2023 at 22:16 Comment(0)
L
0

Hegumen oh... well... any advice tho?
feeling kinda bad about that, but if it's better like that...

Leathery answered 9/11, 2023 at 22:44 Comment(0)
H
0

Leathery Just go through the tutorial. It introduces all the main concepts in the engine. It's a very good starting point to get you up to speed. You need to be able to walk before you can run ๐Ÿ˜‰

Hegumen answered 9/11, 2023 at 22:56 Comment(0)
L
0

Hegumen well, I was thinking my original work was simple, lol. ๐Ÿค•
but thx, bud. I will take note on that.

Leathery answered 9/11, 2023 at 23:2 Comment(0)

© 2022 - 2024 โ€” McMap. All rights reserved.