Thinking-Earth / sinkingus

0 stars 2 forks source link

Implementing Perfect Responsiveness #43

Open fivebellhyun opened 4 months ago

fivebellhyun commented 4 months ago

Overall

We developed the game text style using static(In addition to this, in as many areas as possible to save resources) because there is no need to change the screen size during gameplay.

However, according to the competition rules, the more responsive the game is, the higher the score it receives. Currently, on the web platform, we set the value to the size of the screen when the program first starts to optimize our efficiency. If the screen size changes afterward, the website can be refreshed to adjust accordingly. Should we change this to be fully responsive in real-time?

Considering the efficiency aspect and the evaluation criteria of the competition related to responsiveness, what would you recommend?

Examples

maximum 스크린샷 2024-04-15 오전 3 23 56

When reducing the screen without refreshing 스크린샷 2024-04-15 오전 3 24 48 image

It is responsive and adapts to the screen size at the time of refresh, so it is adjusted when refreshed. 스크린샷 2024-04-15 오전 3 31 01

Codes

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:sinking_us/helpers/constants/app_colors.dart';

@immutable
class AppTypography {
  const AppTypography._();

  static final blackPixel = TextStyle(
      fontFamily: 'Galmuri', fontSize: 10.sp, color: AppColors.textBlack);
  static final whitePixel = TextStyle(
      fontFamily: 'Galmuri', fontSize: 10.sp, color: AppColors.textWhite);
  static final grayPixel = TextStyle(
      fontFamily: 'Galmuri',
      fontSize: 10.sp,
      color: const Color.fromARGB(255, 166, 166, 166));
  static final timerPixel = TextStyle(
      fontFamily: 'Galmuri',
      fontSize: 20.sp,
      color: AppColors.textBlack,
      fontWeight: FontWeight.w900);
}