Game Development

Game development and other polite discussion. Game development...
Nov 25, 2021 01:56
I've also been dabbling in some HTML and JS. And also C. ;)
Nov 25, 2021 01:19
I decided to port to WPF after getting multiple reports that it just didn’t run well (or at all) and after hearing that WPF was sorta easier.
Nov 25, 2021 01:17
@DMGregory Yep. Another tool in the belt. Or something like that. I forget the phrase.
Nov 25, 2021 01:09
@Summer Thank you! I’ve looked and apparently it’s still being used. Now I’m just porting it to WPF, because WinForms is a pain.
Nov 25, 2021 01:06
I made my first app that I got paid for. Although it was crypto, it's still something at least.
Nov 25, 2021 01:05
@Summer Basically me this month
Nov 25, 2021 01:04
@Summer 🙂
Nov 25, 2021 01:03
I feel you. I've hardly had any time to do anything this week.
Nov 25, 2021 01:02
How have you been?
Nov 25, 2021 01:02
Hello!
Nov 25, 2021 00:48
Bit quieter than I remember as well.
Nov 25, 2021 00:43
Wow, it's been quite a while since I've been here.
Aug 3, 2021 23:37
@Vaillancourt Thank you! I have a second game that’s about done was well. I’ve been working on it separately as a fun thing to see how quick I can make a game.
Aug 3, 2021 19:30
I’ll try to get a web version soon.
Aug 3, 2021 19:30
Thanks! Here’s the game if you would like to see it:
Aug 3, 2021 19:27
I finished my first game. It’s not very much and has some issues, but I’m proud of it.
3
Aug 3, 2021 19:19
Hello!
Jul 9, 2021 17:37
@DMGregory I kinda feel that because I’m making a game that looks like it could be from an 1980’s arcade machine. In 2021, where ray tracing and high end graphics are popular, I don’t feel like it fits in.
Jul 9, 2021 17:12
But you’ve created some pretty amazing games in short amounts of time. Games I would play for hours.
Jul 9, 2021 17:12
Really?
Jul 9, 2021 17:08
I hope it goes away though once I’m done with this game and get some feedback.
Jul 9, 2021 17:07
Well, that makes dealing with it a little easier.
Jul 9, 2021 17:07
So it’s not just me?
Jul 9, 2021 17:06
Unfortunately, sometimes I’ll still feel like an imposter. Not sure why though.
Jul 9, 2021 17:06
@Vaillancourt I didn’t do that on my first project and had no idea what to do. Thankfully, now I have a pretty good understanding of C# and Unity, and plan stuff out.
Jul 8, 2021 20:09
@doppelgreener Thank you! I can’t wait. I’ll have to give free copies to all you folks, for all the help you’ve given.
Jul 3, 2021 19:23
That's the thing. I call the LoadLevel() method at Start(), which runs every time I scene is loaded. When I put the scene loading code into LoadLevel(), it creates an infinite loop of scene reloading.
Jul 3, 2021 19:20
// Loads the player's level variable from a file to the game
    void LoadLevel()
    {
	    if (File.Exists(Application.persistentDataPath + "/player_level.dat"))
	    {
		    BinaryFormatter bf = new BinaryFormatter();
		    FileStream file = File.Open(Application.persistentDataPath + "/player_level.dat", FileMode.Open);
		    PlayerLevel data = (PlayerLevel)bf.Deserialize(file);
		    file.Close();
		    level = data.savedlevel;
            }
    }
Jul 3, 2021 19:19
Here's the load code:
Jul 3, 2021 19:19
Dang, I had it all written down and then only partly copied.
Jul 3, 2021 19:18
If I load the game at 7 and kill everything, I get into a boss scene. But, if I try to load into the game at level 8 from the serialized save, it doesn't change to the boss scene.
Jul 3, 2021 19:15
    public float speed;
    public float enemies_left;

    // Start is called before the first frame update
    void Start()
    {

        // Calls the load method on start
        LoadLevel();

        // Finds the proper proportion of allowed enemies
        enemies_left = level * 2f;
    }

    // Update is called once per frame
    void Update()
    {
        // Detects whether enemies have been depleted
        if (enemies_left <= 0)
        {
            NextLevel();
        }
    }

    // Moves the player onto the next level
Jul 3, 2021 19:15
Here's the relevant code:
Jul 3, 2021 19:11
I fixed the crashing issue, but can't get this part to work properly yet.
Jul 3, 2021 19:11
I've been attempting to implement a boss scene that the game will transition to whenever the player reaches the level 8, 16, 32, 64, or 128. For some reason, the game will change scenes perfectly fine when I level up to reach the required level, but won't change the scene to a boss when I load into the game from a save file.
Jul 3, 2021 17:22
I put it in the NextLevel() method instead.
Jul 3, 2021 17:21
I fixed the error.
Jul 3, 2021 17:06
Dang, I had that issue a long time ago, I just can't remember how I fixed it.
Jul 3, 2021 17:05
Also, it appears that just trying to load the scene "Game" crashes. It must be some sort of issue with the Awake() function, as it doesn't happen with the Start() code in the menu.
Jul 3, 2021 17:05
Do you have a tilemap component attached?
Jul 3, 2021 17:03
Try to click on the GameObject with the tile palette.
Jul 3, 2021 17:00
Yep. Just tested it again now.
Jul 3, 2021 16:59
Nothing in the logs.
Jul 3, 2021 16:58
No compilation errors either.
Jul 3, 2021 16:58
Nope. The entire editor just stops functioning whatsoever. Both on PC and macOS.
Jul 3, 2021 16:55
    // Awake is called on Start
    void Awake()
    {
        // Checks if the next level should be in the boss scene or not
        if (level == 8 || level == 16 || level == 32 || level == 64 || level == 128)
        {
            SceneManager.LoadScene("Boss");
        }

        else
        {
            SceneManager.LoadScene("Game");
        }
    }
Jul 3, 2021 16:55
Does anyone know why this piece of code seems to crash my Unity Editor? I'm attempting to make a system that goes to the boss scene if the level is 8,16,32,64 or 128, but it just seems to not even run. Am I missing something simple or is the code just too inefficient?
 
Aug 3, 2021 19:10
@Dragonrage I have a dead meme page so I’m all set!
 
Jul 5, 2021 17:24
To add an example onto the comment from @DavidW, the Matrix is a science fiction, even though most of the premises (human batteries, etc.) are illogical and don’t hold up.