Posted: 15th Jan 2023 20:25
So I was recently cleaning up my drives, and came across my projects from when I was experimenting with AGC.
I have decided to make a public repository for it, perhaps it could help others.
Any constructive code reviews or pull requests are most definitely welcome, I would love to see if there were things I could have improved on.
Here's the GitHub repository:
https://github.com/Tweak4141/AppGameKit-Projects
Posted: 27th Feb 2023 1:35
Tweak4141,

skimming through your Sprite project, some thoughts/advice:
  • consider SetSpriteShape(ID,3) on the player and egg sprites for more-accurate checks.
  • making sure that you know that using GetVirtualWidth/Height() as you are, you are checking against 1 pixel beyond the Screen's Right/Bottom borders. it's a minor issue and i do it all the time myself but it's our bad habit.
  • during gameplay, you're allowing the player to (somewhat) "leave" the screen and then moving it back to completely within the screen bounds in the next iteration while it's best to make sure it's in bounds before you SetSpritePosition().
  • instead of:
    + Code Snippet
    function getRandomCoordinates(a ref as coordinate_pair, id)
    	Random_X = random(0, GetVirtualWidth() - GetSpriteWidth(id))
        Random_Y = random(0, GetVirtualHeight() - GetSpriteHeight(id))
        a.x = Random_X
        a.y = Random_Y
    endfunction

    why not:
    + Code Snippet
    function getRandomCoordinates(a ref as coordinate_pair, id)
    	a.x = random(0, GetVirtualWidth() - GetSpriteWidth(id))
        a.y = random(0, GetVirtualHeight() - GetSpriteHeight(id))
    endfunction

  • instead of Background and Welcome sprites (1 and 5?), you could SetClearColor()
  • +1 for your usage of CHR(10) while setting Text strings. most Newcomers don't.
  • while there's nothing wrong with your pikachu movement If/Thens, consider:
    + Code Snippet
    	Pikachu_Coordinates.x = Pikachu_Coordinates.x + (GetRawKeyState(68)-GetRawKeyState(65))*10
    	Pikachu_Coordinates.y = Pikachu_Coordinates.y + (GetRawKeyState(83)-GetRawKeyState(87))*10

meanwhile, i can't say i've seen so many Do/Loops with Exit used but whatever works, works

otherwise, you obviously understand functions which i recommend you use a lot more for efficiency's sake.
IE, how about creating an AddText() function which accepts X, Y, Size, String, R,G,B, Visible parameters?

i've obviously reviewed the shortest of your projects but i urge you to continue experimenting, refining and adding to it. IE, how about:
  • increasing the Egg speed each time it hits a wall?
  • increasing the Player's Size each time it gets hit by the Egg?
  • adding something to Collect and keep Score?
  • perhaps PowerUps/Downs that decrease/increase the Player size?
  • use SetSpriteFlip() based on the direction the player is moving; a minute detail but i suggest that they matter


...you get it. just pump it full of functionality and squeeze as much FUN out of an otherwise simple premise.

thanks for sharing, and i hope this feedback nudges you to continue coding AND sharing what you're up to
Posted: 7th Sep 2023 3:06
I see, thank you again for the feedback!
I'll implement those changes, and I'll definitely be sharing my future projects.