Categories
DevLog

Gun Runner v2 DevLog #7

[vc_row customize_messenger_channel=’preview-0′ customize_changeset_uuid=’90a689c5-1276-4e79-9d72-3aac4d897fb8′ row_type=’none’ type_width=’full_size’ box_size_states=’content_box_size’ el_class=” row_fit_to_height=’no’ row_vertical_align=’no’ row_equal_column_heigh=’no’ row_content_vertical_align=’0′ row_padding_top=’45’ row_padding_bottom=’45’ row_padding_right=’0′ row_padding_left=’0′ row_margin_top=’0′ row_margin_bottom=’0′ background_color=’rgba(255,255,255,1)’ row_webm_url=” row_mp4_url=” background_color_image=’rgba(0,0,0,0.2)’ row_image_position=’default’ row_bg_image_size_tab_image=’cover’ row_bg_repeat_image_gp=’no’ first_color=’#000′ second_color=’#000′ row_gradient_color=’pixflow_base64eyJjb2xvcjEiOiIjZmZmIiwiY29sb3IyIjoicmdiYSgyNTUsMjU1LDI1NSwwKSIsImNvbG9yMVBvcyI6IjAuMDAiLCJjb2xvcjJQb3MiOiIxMDAuMDAiLCJhbmdsZSI6MH0=’ row_image_position_gradient=’fit’ row_bg_image_size_tab_gradient=’cover’ row_bg_repeat_gradient_gp=’no’ row_inner_shadow=’no’ row_sloped_edge=’no’ row_slope_edge_position=’top’ row_sloped_edge_color=’#000′ row_sloped_edge_angle=’-3′ parallax_status=’no’ parallax_speed=’1′ align=’no’][vc_column customize_messenger_channel=”preview-0″ customize_changeset_uuid=”90a689c5-1276-4e79-9d72-3aac4d897fb8″ el_class=”” margin_top=”0″ margin_right=”0″ margin_bottom=”0″ margin_left=”0″ padding_top=”35″ padding_right=”35″ padding_bottom=”0″ padding_left=”35″ border_color=”rgba(0,0,0,1)” border_style=”solid” border_top_width=”0″ border_right_width=”0″ border_bottom_width=”0″ border_left_width=”0″ background_color=”rgba(0,0,0,0)” css=”{margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:35px;padding-right:35px;padding-bottom:0px;padding-left:35px;border-color:rgba(0,0,0,1);border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;background-color:rgba(0,0,0,0);background-image:undefined;border-style:solid;background-size:;}” md_laptop_visibility=”yes” md_tablet_portrait_visibility=”yes” md_tablet_landscape_visibility=”yes” md_mobile_portrait_visibility=”yes” md_mobile_landscape_visibility=”yes” md_tablet_portrait_width=”0″ width=”12/12″][md_rev_slider customize_messenger_channel=”preview-0″ customize_changeset_uuid=”b5b897c8-6a92-486b-a750-1360c379c65e” md_rev_slider_alias=”gun-runner-devlog-7″][/md_rev_slider][md_text customize_messenger_channel=”preview-1″ customize_changeset_uuid=”a5639ad9-8271-47ed-88ce-45cf19d18db8″ md_text_alignment=”left” md_text_title_line_height=”40″ md_text_desc_line_height=”21″ md_text_title_bottom_space=”10″ md_text_separator_bottom_space=”10″ md_text_description_bottom_space=”25″ md_text_title_separator=”no” md_text_separator_width=”110″ md_text_separator_height=”5″ md_text_separator_color=”rgb(0, 255, 153)” md_text_use_desc_custom_font=”yes” md_text_desc_google_fonts=”font_family:Roboto%3Aregular%2C100%2C100italic%2C300%2C300italic%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:400%20regular%3A400%3Anormal” md_text_use_button=”no” md_text_style=”solid” md_text_solid_color=”rgba(20,20,20,1)” md_text_gradient_color=”{‘color1′:’#8702ff’,’color2′:’#06ff6e’,’color1Pos’:’0.00′,’color2Pos’:’100.00′,’angle’:0}” md_text_title_size=”32″ md_text_letter_space=”0″ md_text_hover_letter_space=”0″ md_text_easing=”cubic-bezier(0.215, 0.61, 0.355, 1)” md_text_use_title_custom_font=”no” md_text_title_google_fonts=”font_family:Roboto%3Aregular%2C100%2C100italic%2C300%2C300italic%2Citalic%2C500%2C500italic%2C700%2C700italic%2C900%2C900italic|font_style:400%20regular%3A400%3Anormal” md_text_number=”1″ md_text_title1=”pixflow_base64IA==” md_text_title2=”Typography Shortcode” md_text_title3=”Typography Shortcode” md_text_title4=”Typography Shortcode” md_text_title5=”Typography Shortcode” md_text_content_size=”14″ md_text_content_color=”rgba(20,20,20,1)” md_text_button_style=”fade-oval” md_text_button_text=”READ MORE” md_text_button_icon_class=”icon-angle-right” md_text_button_color=”rgba(0,0,0,1)” md_text_button_text_color=”rgba(255,255,255,1)” md_text_button_bg_hover_color=”rgb(0,0,0)” md_text_button_hover_color=”rgb(255,255,255)” md_text_button_size=”standard” left_right_padding=”0″ md_text_button_url=”#” md_text_button_target=”_self” md_text_animation_speed=”400″ md_text_animation_delay=”0.0″ md_text_animation_position=”center” md_text_animation_show=”once” md_text_use_title_slider=”yes” md_text_fonts=”null”]

 

Dove down a rabbit hole.

 

While trying to get the positioning correct for the parallax background, I noticed that it was basically impossible to avoid some overlap. Seemed like some subpixel issues. This led me to start looking into the random 1 pixel lines that would sometimes appear while scrolling by the tilemap. It’s most noticeable in the trees but once I started looking, it was EVERYWHERE.

 

I messed around with adding padding to some of the tiles. I created the tree as a single image rather than it being made up of tiles. I made sure everything was being drawn with integers for positions rather than floats. Finally, FINALLY, I tracked it down to the scale mode on the SKScene that contains everything. I had messed around with this before, attempting to make it look decent on iPad so I could have Universal easily. I switched it from AspectFill to ResizeFill and *poof* the flickering lines were gone. Of course, this means it doesn’t scale well to iPad, but I’m going to push on and focus on iPhone and look at a solution for iPad later. During this debugging process, I did introduce a way to override everything’s display position so I’m thinking I can do some scaling there and all will be fine. 

 

tl;dr – Found and fixed root level issue. Back to fun things.

[/md_text][/vc_column][vc_column width=”8/12″][/vc_column][vc_column width=”2/12″][/vc_column][/vc_row]