Giter VIP home page Giter VIP logo

lightsout3's Introduction

Hey there ๐Ÿ‘‹I'm Chuck

I am a simple hobby programmer from the US who works on small games in my spare time. I am an IT Professional by trade. The best place to reach would be on discord BearDooks#4451

โœ My Blog/Website

Currently I run my blog off of Github Pages and use Jekyll. You can find it at https://www.chucklindblom.com

๐Ÿ”ง Tech and Tools I Use

๐Ÿ”ญ Iโ€™m currently working on ...

๐ŸŒฑ I'm trying to learn

  • Firebase
  • Docker

๐Ÿ“ˆ My GitHub Stats

BearDooks's github stats

lightsout3's People

Contributors

beardooks avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

boyquotes

lightsout3's Issues

Setup stat tracking in Firebase with RTD

All users need to have their stats tracked in Firebase if they choose to. This should be an option presented to the user.

Note that since this game will now use data we will need to change the android permissions of the app

Add 'Easy' difficulty level to the game to start

Since the game is based off of difficulty levels, we need to add 'Easy' to start. We can add more later, but this is more a MVP to get the game working and set the framework for the other levels.

Setup highscores in Firebase RTD

The plugin has been added and the game is tied to it. Need to push high scores up to Firebase and have ability to pull top 10 as well as the current users rank

Edit save/load game code for version 1.2.1 to 1.3 upgrade

The old save and load code will need to be updated to look for the old version 1.2.1 style. If this save version is present the game will need to update to the new method of saving the entire dictionary.

The version check is in the global.gd script. It has been updated from nothing, to version 1.3 for this release

Here is the original code:

	# This function will save the game. It creates a dictionary to store all the variables in, and then writes it to a JSON file.
	# If the function is unable to open the file for any reason, it will return without saving instead of crashing the game
	# After the file is written to, this function will close it to avoid any corruption issues
	func saveGame():
		# Create a dictionary for the save game to use
		var gameData = {
		sgTotalGamesPlayed = 0,
		sgTotalEasyGamesPlayed = 0,
		sgTotalMediumGamesPlayed = 0,
		sgTotalHardGamesPlayed = 0,
		sgTotalGamesWon = 0,
		sgTotalEasyGamesWon = 0,
		sgTotalMediumGamesWon = 0,
		sgTotalHardGamesWon = 0,
		sgTotalTime = 0
		}
		
		# Update the dictionary
		gameData.sgTotalGamesPlayed = stats.getTotalGamesPlayed()
		gameData.sgTotalEasyGamesPlayed = stats.getTotalEasyGamesPlayed()
		gameData.sgTotalMediumGamesPlayed = stats.getTotalMediumGamesPlayed()
		gameData.sgTotalHardGamesPlayed = stats.getTotalHardGamesPlayed()
		gameData.sgTotalGamesWon = stats.getTotalGamesWon()
		gameData.sgTotalEasyGamesWon = stats.getTotalEasyGamesWon()
		gameData.sgTotalMediumGamesWon = stats.getTotalMediumGamesWon()
		gameData.sgTotalHardGamesWon = stats.getTotalHardGamesWon()
		gameData.sgTotalTime = stats.getTotalTime()
		
		# Check for issues opening the file
		var gameFile = File.new()
		if gameFile.open_encrypted_with_pass("user://LightsOutData.sav", File.WRITE, "ThisPassWordIsTheBest") != 0:
			return
		
		# Convert file to JSON and save it
		gameFile.store_line(gameData.to_json())
		gameFile.close()

	# This function will load the game from the save file and write all the data into the variables for the stats page
	# If the function is unable to open the file for any reason, it will return without loading instead of crashing the game
	func loadGame():
		# Check if the game file exists
		var gameFile = File.new()
		if not gameFile.file_exists("user://LightsOutData.sav"):
			return
		
		# Check for issues opening the file
		if gameFile.open_encrypted_with_pass("user://LightsOutData.sav", File.READ, "ThisPassWordIsTheBest") != 0:
			return
		
		# Load the JSON into a dictionry
		var gameData = {}
		gameData.parse_json(gameFile.get_line())
		stats.setTotalGamesPlayed(gameData.sgTotalGamesPlayed)
		stats.setTotalEasyGamesPlayed(gameData.sgTotalEasyGamesPlayed)
		stats.setTotalMediumGamesPlayed(gameData.sgTotalMediumGamesPlayed)
		stats.setTotalHardGamesPlayed(gameData.sgTotalHardGamesPlayed)
		stats.setTotalGamesWon(gameData.sgTotalGamesWon)
		stats.setTotalEasyGamesWon(gameData.sgTotalEasyGamesWon)
		stats.setTotalMediumGamesWon(gameData.sgTotalMediumGamesWon)
		stats.setTotalHardGamesWon(gameData.sgTotalHardGamesWon)
		stats.setTotalTime(gameData.sgTotalTime)
		gameFile.close()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.