@mongoose8: Not sure if this is getting easier with an orthographic camera. It's already all on a fixed distance and only 2D objects.
@Zerowalker: Be aware that you can't have it zoom perfectly to any screen as well as showing the same stuff without messing up aspect ratio on different screens. You have to decide on one (think 16:9 vs 4:3 movies - you either get scaling or a black border on your TV).
Drawing 2D and having a Camera for movement?
Re: Drawing 2D and having a Camera for movement?
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
-
- Posts: 20
- Joined: Mon Feb 16, 2015 3:05 pm
Re: Drawing 2D and having a Camera for movement?
Primary resolution is supposed to be 320x240, so 4:3.
Then scaling will be just multiplying that resolution.
Will try orthographic camera, see if i can get that working.
EDIT:
Okay didn't help much, not even sure if i got it working:S
I can't believe it's this hard to put a distance of a billboard correctly.
I have set the CameraFOV to (4/3), so with a correct distance i should be able to look at a place on a billboard and it will appear as if it was "320x240", "640x480" etc.
I just can't figure out the distance to make it.
Then scaling will be just multiplying that resolution.
Will try orthographic camera, see if i can get that working.
EDIT:
Okay didn't help much, not even sure if i got it working:S
I can't believe it's this hard to put a distance of a billboard correctly.
I have set the CameraFOV to (4/3), so with a correct distance i should be able to look at a place on a billboard and it will appear as if it was "320x240", "640x480" etc.
I just can't figure out the distance to make it.
-
- Competition winner
- Posts: 688
- Joined: Mon Sep 10, 2012 8:51 am
Re: Drawing 2D and having a Camera for movement?
My initial thoughts:
1) Make a billboard that fits the texture, and use cutealien's function to set its distance.
2) Keep the distance.
3) Set the billboard's width to the texture's width, and set the billboard's height to the texture's height.
4) This is untested, and I have no idea if this will work.
Seems to me, though, it'd be easier doing all of it in 2D, and just keeping track of layers. Edit: And adding effects later can be done with sprites.
hm... Paper Mario comes to mind... I miss that game.
1) Make a billboard that fits the texture, and use cutealien's function to set its distance.
2) Keep the distance.
3) Set the billboard's width to the texture's width, and set the billboard's height to the texture's height.
4) This is untested, and I have no idea if this will work.
Seems to me, though, it'd be easier doing all of it in 2D, and just keeping track of layers. Edit: And adding effects later can be done with sprites.
hm... Paper Mario comes to mind... I miss that game.
-
- Posts: 20
- Joined: Mon Feb 16, 2015 3:05 pm
Re: Drawing 2D and having a Camera for movement?
Actually just tried doing it after a friend recommended it.
I thought my method was plain and simple.
Well in theory it is, the camera and billboard concept is easy to get, but it's much harder to actually get working.
And you are also limited to the size of the billboard and stuff like that,
painting on the screen is "infinite" if you move the world (same could be done in billboard of course, but it would lose it's meaning.).
Programming sure is hard xd
I thought my method was plain and simple.
Well in theory it is, the camera and billboard concept is easy to get, but it's much harder to actually get working.
And you are also limited to the size of the billboard and stuff like that,
painting on the screen is "infinite" if you move the world (same could be done in billboard of course, but it would lose it's meaning.).
Programming sure is hard xd