Showing posts with label hi. Show all posts
Showing posts with label hi. Show all posts

Sunday, March 4, 2018

2048 Clone in Java, a Journal

I am revitalizing this blog to try and keep track (and think through) design choices with my next project in Programming 2. The first two projects were mostly a flop, and I wondered out loud to my friends if doing this would help me stay on track. This is essentially a rubber-ducky journal. If it helps anyone else, that's awesome, but it is mostly for me.

Our goal is to create a version of the math game 2048 with a themed spin on it. The theme we are assigned as default is Star Wars, but if we can come up with another theme, it will be an extra 5 points.

The original 2048 can be found here: http://2048game.com/
The Star Wars version we are mimicking is here: https://0x0800.github.io/2048-STARWARS/

I'm only starting to set up my class structure, of which I've determined I need at least 3 things.

  • The Game class will handle:
    • Game States - currentGame, gameOver (gameWin and gameLost), restartGame
    • Current score and best overall score
  • The Tile class will handle:
    • Tile borders and whether a tile can combine with another tile
    • Tile values
    • Tile colors/symbols
  • The Board class will handle: 
    • Number of tiles on the board
    • Tracking tile positions
    • Tracking empty tiles
    • Spawning new tiles
There is also an FXML document and a Controller class, since we're using JavaFX and SceneBuilder to create the UI and handle animations, soundFX, and music. Here's a rundown of what the game should have:

  1. Background music
  2. Animations
  3. Sound effects for each piece
  4. Tile must be abstract
  5. Must use an interface
  6. Must correctly keep track of current score, high score, and if the game was won or lost
  7. Bonus: A HELP function that will highlight possible moves
  8. Bonus: A theme other than Star Wars
  9. Bonus: A SWAP (cheat) function to allow for the swapping of two tiles
What I would like to add is an extendable panel that will display the values of the pieces, since we'll be working strictly with symbols. I think I can do so with the Gluon Navigation Drawer, but I'll need to research how it works and make sure it will do what I'm envisioning.

I'll update with my progress as this week goes on. Hopefully, with it being Spring Break for the next week, I'll have plenty of time to get some of the structure hammered out!

Tuesday, June 4, 2013

Slacker...

Oh man. These past few days have been so so SO so busy... Ahhhh...

First, I didn't study coding at all this past weekend because I was lazy on Friday night and Saturday. Shame... I can't help it though, I get home from work for the weekend and all I want to do is lounge like a lethargic kitten who just drank too much milk...

Sunday was a very exciting day because Andrei and I announced our engagement to a big group of our friends and family! I know a bunch of people took photos, but I've only seen a few so far... Not everyone has emailed them to me yet. But, one of my favorites...


Andrei wasn't expecting to have to give a speech, but he moved us all with his words, regardless. That's me getting all teary-eyed over what he's saying. Ahh, I love this man.


Anyway. I may end up bogging down some of my posts with messy pseudo-code. I'm going to be using my knowledge with C to design a text game (I've mentioned that before). I need to get some of the main functions down for features I want to offer, and in the process, I'll be trying to figure out if they're going to be possible.
Things like save-files that are password protected for characters... Garages or stables where they can store animals/vehicles for mounts or minions... A leveling/storage system for minions that allows them to gain experience and skills alongside their masters (it is SO Pokemon-y, but I hope that the end product won't feel like that at all)... Crafting that actually makes it feel like you have complete control over how a piece of armor looks, instead of making the same shirt/pants/boots over and over... Not to mention, items that give invisible flags, like comm-links that allow a character to talk into an IC channel that is only available to other characters with that comm-link item...

Idk, I just have so many ideas. I didn't ever ever EVER think I would get into game-design... but if I can get good with this coding bit, or find someone who likes the ideas I have enough to help me... Oh man. Ohhhh man. I just get all excited thinking about it.

I've got note-taking on my list of things to do today, if I can tear myself away from Facebook and Tumblr. I've got to keep my goals in sight. I know I can do this as long as I keep myself motivated!!

Wednesday, May 8, 2013

Obligatory 1st Post

Gonna retire the other blog and use this as a place to document all of my discoveries while I teach myself how to design and write code.

I'll come up with a nice look for it eventually. Maybe. :D