ChrisPritchard / Xelmish

XNA + Elmish - 2D game development framework with F#
MIT License
168 stars 15 forks source link

2D Camera support? #16

Open RickyYCheng opened 2 years ago

RickyYCheng commented 2 years ago

Is there already a 2D camera implementation?

ChrisPritchard commented 2 years ago

No I dont think so? What sort of thing, like a point that the engine would offset everything else by? In the games I've made I've just hand rolled my own as needed.

RickyYCheng commented 2 years ago

I think shoule use

spriteBatch.Begin(transformMatrix = yourCameraMatrix)

spriteBatch.Draw(xxx)

spriteBatch.End()