fix offscreen sprites sometimes being visible
This commit is contained in:
parent
f576a47282
commit
431a591481
2 changed files with 2 additions and 4 deletions
2
_NOTICE
2
_NOTICE
|
@ -7,8 +7,6 @@ TODOs: (that i can remember right now)
|
||||||
- settle on a network architecture
|
- settle on a network architecture
|
||||||
- detect frames when Mario is in a controllable state
|
- detect frames when Mario is in a controllable state
|
||||||
- compute how many input neurons the network needs instead of hardcoding
|
- compute how many input neurons the network needs instead of hardcoding
|
||||||
- rewrite positions to be relative to Mario
|
|
||||||
'-> fix offscreen sprites sometimes being visible to network
|
|
||||||
- add some detection for enemies later in the game
|
- add some detection for enemies later in the game
|
||||||
- fix cfg.enable_overlay (smb.lua doesn't see it being changed)
|
- fix cfg.enable_overlay (smb.lua doesn't see it being changed)
|
||||||
|
|
||||||
|
|
4
smb.lua
4
smb.lua
|
@ -88,9 +88,9 @@ local function set_timer(time)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function mark_sprite(x, y, t)
|
local function mark_sprite(x, y, t)
|
||||||
if t == 0 then
|
if t == 0 or x <= -8 or x >= 0xFF or y <= 0 or y >= 0xE8 then
|
||||||
-- place unused/unseen sprites
|
-- place unused/unseen sprites
|
||||||
x = -0x08 -- just off the left side of the screen
|
x = -8 -- just off the left side of the screen
|
||||||
y = 0xC8 -- at ground level.
|
y = 0xC8 -- at ground level.
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue