Grame frozen on start [4.1]

So i spent a few days moving everything from 4.0 to 4.1 and everything was in places and looking good and it was time to compile my game, no errors, game starts and.... ist frozen, theres no player and everything inside the HUD is missing too.
unknown.png


I have already tried setting screen to use gravity and the zero sprite detection checkbox.

I tried to create a new project just to test and that worked fine but now a new surprise, the HUD doesnt stay and scrolls with the screen
unknown.png


Aso, theres a bunch of different input scripts now, which ones should i use for a scrolling platformer?
 

TurtleRescueNES

Active member
I had something similar happen. No characters, just the background. It ended up being a Sprite 0 thing (get used to that). If you followed the tutorial, you probably set the Sprite 0 Index to 127. If so, make sure that tile (bottom rightmost) in the GameObjects BMP is a solid nontransparent color. That's what fixed it for me.
 

dale_coop

Moderator
Staff member
Yep exactly... the non-transparent color is the key ;)
(...I've spent hours with that "issue"... on my graphics :p)
 

Mugi

Member
yeah, it totally looks like sprite0 issue. In the first image you posted, on the top left of the HUD, a stray pixel can be seen drawn, which looks like that it's drawing the sprite0 there.
double check the settings, and yeah, make sure that the sprite index you used actually has opaque pixels in it.
(i will never get enough of the awesomenes of your graphics @.@)
 
I dont get it, i did mark the sprite zero checkbox and i set sprite 0 index to 127 in the HUD settings and i gave that square a color instead of transparency, i still get a frozen screen with empty HUD and no player on screen, i dont think this sprite zero thing has anything to do with my problem
lzrNldj.jpg

xKxlgLf.jpg
 

dale_coop

Moderator
Staff member
Yep but try to put it at another place, check again the tutorial (pause the vid)... it needs to be just under the bottom right corner of your HUD.
 

Mugi

Member
yeah, assuming that the screen scrolls to the right, you will have to have sprite0 on the bottom right corner of the HUD.
if your screen is supposed to scroll to the left, then im not sure how it works, but then again, this scroller module is only supposed to be used for scrolling to the right anyway :p
 

dale_coop

Moderator
Staff member
I think it any of the 20min tutorial from http://www.thenew8bitheroes.com

Sprite: 127(or any sprite you want to use)
H-blank: 1
X: 246
Y: 30

;)
 

Mugi

Member
in this case, propably closer to 24 than 30, because the hud is 3 rows high, wherease Joe's values came from a HUD that is 4 rows high.
but yeah, something like that.

also, you can set the X to 248 or so, to completely hide the sprite0 in case it stays visible for you.

if you still experience flickering issues with the hud, try adjusting the H-blank a little. (Joe didnt really talk about how that works, and i only have a really rough idea though, so im not entirely sure what happens when you change it.)

here's a link to the shooter tutorial that shows hot to set it up.

https://youtu.be/bwtXDoRse-k?t=188
 
Ok no this is not it, i watched the tutorial and i tried it on my test project and it works fine there both with or without the sprite zero setting, but setting it on the actual game project im working on does not fix it, i still cant see anything inside the HUD or my character, i will instead try to export things from the main project piece by piece and import it into my test project to see where it broke.
 

Mugi

Member
try placing the empty tile to the first slot in the hud graphics, that's atleast propably why it's printing zeroes everywhere, as it assumes that's where the blank tile is. maybe it's hardcoded somewhere in the new engine.
 
the zeros are not the problem, the problem that the game freezes and player isnt drawn if i change these tile locations to my own ones

heres a video of it - first you see the game works fine with the default tile locations, than after that i change the HUD border tile locations to my own and that makes the game freeze
https://www.youtube.com/watch?v=QwrsP191hq0&feature=youtu.be
 

dale_coop

Moderator
Staff member
have you tried to place your sprite 0, under your HUD... maybe Y:46 ?
If your HUD is 2 rows, the value should be around Y:30 (like Joe did)
 

dale_coop

Moderator
Staff member
I did. I think it’s relared to the sprite0 somehow
And in your video the sprite 0 is not correctly placed.
It should be just under your HUD.
 
if i do that, part of the background gets stuck with the HUD and doesnt scroll

This position works best for me and it seems to fix the issue with custom tile positions too
E28fGnu.png
 

Kasumi

New member
I watched your video. Sprite 0 hit happens when a non transparent pixel of sprite 0 overlaps a non color 0 pixel of the background. Here's a side by side of when it works vs doesn't in your video:
uoYnalP.png

If your color 0 is that teal, then on the right it looks like sprite zero is not overlapping a non color 0 pixel. None of the orange in the sprite is overlapping a color that isn't color 0. On the left it's overlapping a lighter color in the text.
 
Kasumi said:
I watched your video. Sprite 0 hit happens when a non transparent pixel of sprite 0 overlaps a non color 0 pixel of the background. Here's a side by side of when it works vs doesn't in your video:
uoYnalP.png

If your color 0 is that teal, then on the right it looks like sprite zero is not overlapping a non color 0 pixel. None of the orange in the sprite is overlapping a color that isn't color 0. On the left it's overlapping a lighter color in the text.

So if i understand that correctly, if a transparent tile of the HUD graphics overlaps with the non transparent zero tile, it causes the game to crash, but if the overlapping HUD graphics tile is not transparent, game doesnt crash?

Also i still dont think this zero pixel thing has anything to do with my game freezing on start, i just tried to redo everything i did in my test project that worked right and it still freezes :C
This works in the test project https://i.imgur.com/E28fGnu.png, but doesnt in the actual project.
 
Top Bottom