This site requires JavaScript, please enable it in your browser!
Greenfoot back

SPower's Comments

Back to SPower's profile

Ok, I understand it now. Thanks for the lesson, davmac!
@davmac Do you mean the same as I do? http://qt-project.org/doc/qt-4.8/images/raycasting-demo.png is what I think of raycasting, where this is the map: http://sinepost.files.wordpress.com/2012/06/raycasting-map.png?w=540 Three tutorials: http://www.permadi.com/tutorial/raycast/ http://lodev.org/cgtutor/raycasting.html http://sinepost.wordpress.com/2012/06/16/raycasting/
And raytracing is what you're doing here :)
'this uses a technique called "raycasting" (or "raytracing")' These are totally different things, raytracing is simulating rays going out of the camera and hitting things, being bent by glass, etc. Raycasting is also simulating rays, but they just stop when they hit something and the rays are casted in a 2 dimensional world. I hope this made it a bit clearer. And also, great work!
The 'relationship' is that the fullWidth and fullHeight are the width and height of the greenfootimage 'bigBackground'. That represents the background, which is as big as the full world: that is also what moves when you move the camera. And the background you give can be bigger than the viewport.
Well, I've already tried it some time ago, but it seems there's a bug in the scroll bar class I'm using, and I guess I won't have time to look at it the coming time.
@erdelf In some way, it is. Of course, there is a limit, but when its lower than that limit, faster hardware will let it run faster.
SPowerSPower

2012/12/22

Does it happen immediately when you reset it?
SPowerSPower

2012/12/22

I'll look at it right now.