Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Off-screen rendering?
#1
[Image: rendering.png]

Ported by dynamic maps & camera code over from my Dx8 engine and came up with this. Tiles and shit won't render half-way off screen or anything.

Fixes?
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#2
I don't know a fix. But everything looks messed up and off. The stat bars, Inventory+ Buttons, Map info. Is that like um? Purposely done?


But as for the in-game problems. Looks like something messed up the x and y map props? I wouldn't know. I don't code LOL
Reply
#3
I'm not showing off the game, I'm showing a specific problem. I obviously haven't worked on the GUI yet. As for you guessing what the problem is, you kinda failed because I explained what the problem is.

Don't bother posting if you're gonna post such useless stuff ;D
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#4
What happens when you walk to the edge?
Reply
#5
The way i usually fix this is by when setting the rec, check if it is going to draw offscreen, and adjust accordingly.


ie, if x < 0 then recx = recx + x

eh not sure if that makes sense, but hope it helps Big Grin
Reply
#6
Robin Wrote:I'm not showing off the game, I'm showing a specific problem. I obviously haven't worked on the GUI yet. As for you guessing what the problem is, you kinda failed because I explained what the problem is.

Don't bother posting if you're gonna post such useless stuff ;D

'Kay. Learnded lesson XD
Reply
#7
You're changing the games name O.O!?
Reply
#8
As in when you walk towards a direction it renders only part by part and has black at the edges

of the screen?
Reply
#9
Basically, the tiles around the edge won't render because a few of the pixels are off-screen.

If anything is even slightly off-screen, it wont render the entire thing.

You can see that in the tiles & trees.

Jacob found an alright method of fixing it, though.

Labmonkey Wrote:The way i usually fix this is by when setting the rec, check if it is going to draw offscreen, and adjust accordingly.


ie, if x < 0 then recx = recx + x

eh not sure if that makes sense, but hope it helps Big Grin

I do that for sprites & animations, but doing this for EVERY tile would be laggy as fuck.
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#10
Did you take this screenshot while walking? Or is it like this when standing still too?
Reply
#11
Danno if this would work since i just started programming again but

Code:
OpenSpace = PIC_X - (ScreenSizeX / PIC_X)
  
  If OpenSpace < PIC_X Then
  rec.left = pic_x - openspace
Reply
#12
TonyNooblet Wrote:Danno if this would work since i just started programming again but

Code:
OpenSpace = PIC_X - (ScreenSizeX / PIC_X)
  
  If OpenSpace < PIC_X Then
  rec.left = pic_x - openspace

"but doing this for EVERY tile would be laggy as fuck."
Reply
#13
I thought you ran away to the army?
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#14
SIR YES SIR
Reply
#15
Camera is easy, I not needed fpses atm ;D
Quote:Robin:
Why aren't maps and shit loaded up in a dynamic array?
Jacob:
the 4 people that know how are lazy
Robin:
Who are those 4 people?
Jacob:
um
you, me, and 2 others?
Reply
#16
Well is there a way to fix this for DX7?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)