Why move the map and not create a "camera"?

before I took a break to brush up on my C/C++, I was following Pigsy’s YouTube tutorial series on SGDK. He has a video on movement as well, but instead of scrolling the map, you create a camera of sorts and actually move the character around the map, stopping the camera when meeting up with a boundary.

what would be the differences in approach between the two styles? is one beneficial over the other?

Coincidentally, Raylib does have its own camera object you can use.

The main difference is going to be location based on a given “origin point”. In our example, everything in the world is relative to the player on the screen, with everything moving based on the player’s “world position” as its origin point.

Whereas with a camera, everything is shown and moves based on the origin in the world (we’ll ignore parent-child relative transforms for simplicity).

woah, thanks for the link! that’s a really neat class. the rotation is really cool.

I was thinking of it more from watching the Sega Genesis tutorial. I was thinking about it after I posted it, and resolutions are so much bigger nowadays compared to the Genesis/SNES, so making a “Camera” that followed the character made sense on large maps.

does/will gamedev offer more Raylib courses? there seems to be a lot of design left on the table including changing levels/maps, co-op, music, saving data, etc.

The intent of this course was to help get students familiar with C++ before jumping into something more complex like Unreal Engine, Raylib being as lightweight as it is allowed us to create a more C++ centred course while still keeping it about game development. There’s nothing additional planned as far as I know.

That said, if there’s enough interest it could very well happen! I like Raylib myself and would love to explore it more when I have more time.

oh. that’s a little disappointing. so I would have to buy the 2D Unreal course to really get into game development? I kind of feel like I wasted money a bit.

if I buy the course on this site, do I take it here or on Udemy?

“Have to” is a strong combination of words here, you can still continue to explore Raylib with the examples on their website and possibly additional tutorials elsewhere. The 2D Unreal course isn’t necessary.

Buying the course on our site would mean taking the course on our platform. That said, it is possible to make a request to transfer to Udemy or vice-versa by contacting our support.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms