Friday, April 27, 2012

PP with SP

What was planned:
Fix the GameBoxModel so it isn't as slow adding and removing components. Now, it adds everything once the save, export, or play test buttons are clicked.
Which makes me wonder, if we should tell the user there are unsaved changes when he tries to load a new game.

What happened:
We did that.
We ALSO finished the ROLL die feature.

A window shows up, which allows the user to input a set of dies, in the fashion

Number of die: 3 Die Sides:6
Number of die: 4 Die Sides: 5
The user can also roll these individually, or roll the whole conjunction of his set together.

(Maybe we could have a checkbox for Roll Selected)... just an option

Problems:
Trying to write average or median I think, in haskell. Taylor Berger was having problems with that, and we tried to help him. Other than that, no problems!

What is next:
To comment stuff.... like cray cray

Thursday, April 26, 2012

PP with Joe

What was planned:
I don't remember, I don't think we planned anything really.

What happened:
We decided to take a look at the GameBoxModel, since adding 99 components to the gamebox would take a while. We found something within the update method, where it just recreates the whole thing, for every component ever added...

We decided to start over again, and not use Observer/Observable. Instead, I'm using a different system so only the definition that gets updated, will be notified instead of the whole thing.

Problems:
Understanding what was going on, and trying to fix it, took a whole out of our time.

What's next:
More stuff to do, and finish the new game box model thing. It seems like there is always more stuff to do.

Tuesday, April 24, 2012

Tuesday PP with Brady

What was planned:
To do some fixes to some stuff
AND to design the roll button

What happened:
we did some fixes to some stuff

What's next:
Finish the roll button, unless brady finished it already.
I was uncertain about how exactly I wanted it to look, or to work.
We settled for a text box which will bring up a list and let you insert the values for each die

Saturday, April 21, 2012

Saturday.... *sigh*

Everything is broken, apparently.

We're going to redesign the play test environment to let you add to a view, without dragging and dropping into it, but simply through a menu.

Maybe, we could do it by just dragging the component onto the Tree thing within the comm.... that wouldn't seem too bad.

However, I don't see any of the menu's we used to have before.
I tried adding a new deck to the game today.... so I could see the actions for the deck, and somehow, it did not work.

*sigh*

Maybe tomorrow when I have refreshed my energy pool, I will be able to focus better and fix stuff. one can only hope.

The pressure is coming onto us, with releasing news about "new features" coming, and what we are working on, to our beta testers; the water is getting pretty up to our necks.

People blogging about table top studio, that's crazy; people talking about it on forums, that is crazy too.

I had never had anyone give feedback and actually "like" any of the programs I had done, granted I'd never release one. I guess that's part of growing up and being a CS person.

I just need to calm down, and fix things, one bug at a time.

Friday, April 20, 2012

PP with SP

What was planned:
To fix the pte

What happened:
we realized things weren't being sanitized (user input)
and we got the drop thing to work, and place in a different view.

Problems:
There are more bugs in the code than in the move "A Bug's life", or even "AntZ".

What's next:
Clean stuff.
Make it less glitchy.
Make windows resizable.
Be able to leave views.
Be able to place components in a view, even when you haven't joined the view.

Thursday, April 19, 2012

Thursday Night / PP with Joe

What happened:
Joe left to be a wazy butt

What happened after that:
I did some deck stuff so it indicates what you're currently editing

After that, CJ and I took a nap.

And did more stuff.

What's next:
to finish more stuff.

Wednesday

I was gonna do my psyche thing, and then joe wanted me to do some stuff; so clearly, i did some stuff.


I had to fix some layouts, that was trivial. And then I worked on the deck part, making it so that you can edit a pre existing card. Things are going pretty well on that term, I added a visual aid for what is selected. I'm gonna add a label that indicates what you're currently working on, and everytime you add a card, it will give you a new untitled card instead, and have some fields where you can select which CustomImageWizards to preserve or not, by using check boxes. It makes no sense to clear things, when you're making a deck if you want to keep the back all the same. 


However... there might be problems if you want to replace your back image on a created deck already... hmmmmmmmm; i shall investigate this while cj and I nap....


but basically, that's what I did lastnight.

Tuesday, April 17, 2012

Tuesday Night / Pair Programming with Brady

What happened:


Stephen Patel, who is super duper duper duper duper awesome, fixed the Game Box Model. (+5 raccoon hugs for him)

Brady, abandoned me to hang out with some girl, most likely, so no raccoon hugs for him.

What was planned:
To clean up the hackyness of the Grid we're using now.

Cleaned it, and improved it.

People can now select which items to view and which items to hide.
People can sort (a through z) also.

I'm gonna make it so people can sort by PRICE and also by Quantity.

What's next....
sleep
and to finish these sort and show features.
THEN, on to... redesigning the play test environment


Confession:
I kinda like writing guis now.... I know... gross.

Monday Aftermath

After the somewhat disappointing occurrences of Sunday and being too tired to think of how to fix the grid issue at 2 am, I've done some things that helped us get back on track and make things look not so scary.


After getting sleep, I skipped class on monday after getting lunch to try to fix the stupid grid which is stupid and didn't let us debug in development mode.


I made something that looked almost the same, it has an image field, a name label, and some quantity stuff.


That took me like 10 minutes to do so... which makes me think that if I had been less tired, we could have fixed the grid in like 30 minutes. BUT that is in the past.


The new hacky grid (which shall be renamed later) works great and allowed joe to do whatever he needed to do so he could debug the image's not flattening. 




It seems like we have progress! YAY.


HOWEVER: there are still some problems with the game model. One that I'm trying to figure out, but haven't yet, is why I can load a game's components, but then when I try to add another component that was already in the game (to increase the count) things blow up and it says that the model never had that definition in it! :( :(


Sooooooooo that will be done and debugged today, hopefully.
and maybe I will have nap time with CJ (the raccoon)... that would be nice.

Monday, April 16, 2012

Sunday / Monday

Well, we're still here and it's almost 3 am....

we're probably going to sleep here. Mhmmmmmm.
AAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHH.

Sunday, April 15, 2012

Sat of Doom

Joe Brady SP and I got together in CEC lab so we could work on this thing.


I kept on working on the deck wizards, and we decided that we wanted a simpler scrollable wizard (from left to right) and a more intricate wizard, to be available when you clicked a button. 


Then, I had to clean my hackyness and make them both be part of a thing called DeckEditors master, which changes the deckDefinition; 


And for some reason, my posts from wednesday, thursday and friday didn't post.


Sad Sad Sad raccoon

Thursday, April 12, 2012

Da Deck

After the amazing news we heard from Joe today, we all entered in a "shit's got to get done mode".

I Worked some more on the custom part of the deck. I'm making things clean.

I will use a different window for the "edit elements" option, which will promp up the deck window. It allows for deleting components, and rearranging them based on individivual location or by row (group of components).

I will work on Dragging an element from the component selector into the deck.
This will be slightly tricky, since I use special objects called ReorderableComponets, which take a GameComponent.

However, I was researching how we were doing this in the creator, and I'm going to allow a user to drag a "GameComponentCanvasDefinition", then call the controller, requesting it add a GameComponent there.

Then the canvas will call a special method, which will take that GameComponentCanvas, and extract the GC from it, and reorganize everything.


In the future:
Joe suggested we give the user the option to undo something, like what if they, messed up by accident and want to undo the last action.

For now, I think the easy way is to store 2 lists, one with the previous contents of an action.

He suggested I make special DeckReorganizeActions, which know how to undo themselves.... this might be complicated, since I have no idea what gets called when a component gets dragged within the same HStack...
AND no one knows :(

PP with Mo Joe Joe Joe

What was planned:
To work on getting the key listeners for the deck

What happened:
I did this during 481, so we worked on what each of us had to do.

Problems:
Procrastinating 251 students who stole joe away from me and needed help.

What's next:
Get er done.

Wednesday

Worked on more deck stuff.
Got the deck to delete stuff by double clicking,
however pressing delete after selecting it would be Amazing.

Will do this next!

Tuesday, April 10, 2012

PP with brady my love

What our goal was: We set out to finish the creation of a new Game Area View.

What was done: This pretty much consisted of adding the correct handlers to the buttons on the CommView, and then debugging an error with the GameSessionModel as its observable was not being set correctly. This was because the BasicObservable() needed to be created on the constructor of a GameSessionModelImpl(). Once that was fixed, we were able to register the CommView as an observer of the GameSessionModel in addition to the CommModel. Now, when a new view is created and the observers are notified, the CommView gets the notification. 

What needs to be done: Display the created views in the Communicator of the PTE. All join of a view, removal of a view and show/hide rulebook

Saturday, April 7, 2012

Deck Customizer Wizard

Today, I spent most of my day working on something cool that I would like for the deck wizard.

I first started by making a standard 52 card deck, Ace through King, for each suit, and loading that up in the PreMadeComponents class. That was trivial, and super easy.

The next thing I wanted, was something like in the designer. I wanted a tool that allowed users to move cards around freely, to the top, middle, or bottom of the deck and that would reorder the deck for them that way.

This was a little bit more tricky than I thought.

I started with a flow layout, which did the reordering for me! That was great... except it couldn't grab multiple elements. In addition, if I tried getting the members of the flowlayout, they would print out out of order... which seemed like a drag.

I researched around SmartGWT showcase, and saw these two cool things, HStack and VStack. They had a drop option that would automagically reorder things! So, I thought... what If I just use these?

Well, the tricky thing is, I wanted every row to only have 5 elements, and HStack doesn't have a setMaxMemberSize() method. So I had to do some tricky stuff within the drop handler to avoid adding a 6th element once there were already 5.

Then, I thought, well what If I have more than 5?

So I made a VStack with a bunch of HStacks. This worked great, except that I couldn't REALLY grab more than one. So I made the HStacks dropable too!
BUt, I had to make sure not to drop an hstack within an hstack, or else things die.

I also made it so that when you drop an HStack within a VStack, that is a valid drop, but a component between two Hstacks, is wrong. I might change this so that it gets wrapped in a new Hstack row.


Everything seemed cool, except, what about the cool thing the flow layout does, where it automagically reorders everythign?


This was the tricky part, I spent a while trying to find the index of each member, just to find out that they aren't stored. I tried using a map, but that also wasn't working.


I resorted to having an "autofix" option, that fires after every move which would require a fix (something not within an hstack that isn't full). A reorder within a row that has 5 elements, wouldn't trigger it. 


The autofix, attempts to move everything upward and to the left. It just fills in every "hstack" with the 5 most recent elements. 


It is pretty hacky, but it works.


It also users a timer, with 375 ms delay, to do so. If It is anything faster, it will do some weird stuff or never get triggered properly. 

Thursday, April 5, 2012

PP with JC

What was planned:
Refactoring


What happened:
Cool stuff. 


We refactored some of the DeckActions so that they automagically change their state when they are either empty or get something added. The deck will now have only 1 state (the empty state) and everything else will be the top most element shown. 


Problems:

¯\_(ツ)_/¯ 




What's next:


More refactoring. There's tons of copy code that I should change, just like the super class (DeckAction) and it should have. 





Tuesday, April 3, 2012

PP with BK

We refactored some code and made some changes to the PTE..

Basically, we first made it so that the shift + enter combination enters a new line.
We did this buy just calling setContents(getContents()). WIthin the update, we use a replace all for "\n" and change it to the html line "<br>".

The second thing was trickier. We made it so that the scrollbar doesn't auto scroll to the bottom, unless it is all the way at the bottom. That way, users can read previous messages without being interrupted by the new incoming messages.

Monday, April 2, 2012

Refactoring Monday

We're in Refactoring / Code Clean up week.


I admit, we all have nasty code here and there... I have some comments in my files that say "//XXX hacky as f... clean". and others in spanish.


Today, I worked on refactoring the PTE part that controlled the Deck actions, focusing on the ones that should be available after a component gets dropped onto them.


The way I was doing it,was hacking a dropHandler to show a menu, with some menu items.
They would call a special PutOnTop or PutOnBottom action.


I abstracted all this. I made an interface called TriggerHandler, which basically is a way to communicate with a DeckDropMenu (which is what ultimately calls a doAction). The TriggerHandler is used to set the Trigger... that means which component caused the drop event to occur. Then, we can call the perform actions using the old version of a PutonTop and PutOnBottom actions. 


I was basically modelling of of the components automagically built context menu, by making this a custom thing just for decks. 


Today, I also added the Shuffle Action. The shuffle action should be brought up after you double click on the deck. 


What I have left to do:


Merge decks (this should be a DROP action)... this will be tricky.
Got this done today!!!!


Update the Display when a deck is empty, so it calls next state. (Will have to research on how to do this). 


Have a "Count: #" which displays the number of elements in a deck... basically, I think I'll have to call a "CountAction" everytime someone double clicks on a deck...
the CountAction will set a MenuItem count title to be the size of the deck.

Doom Weekend

I guess, I was just too busy this weekend with coding that I forgot to update whoever reads this.

So.. hello fellow raccoon lovers!

It has been a crazy weekend. We managed to get the decks into the PTE!

It required Joe and I to rewrite a whole bunch of the server... I kept a daily work log, so the details of it are command+c command+V'd here:



Friday/Saturday
Worked with stephen patel to try to get the deck into the PTE. We tried making it a game component, but realized we had to change some variables in game and gamecomponent (a boolean in display) for example, and we’d have to create different game actions as well as update the PTE to display a context menu based on the game actions each specific component had.
The good thing is, joe created some randomizer class, and explained the process of how to get a component that requries serverside data keeping . Hopefully, I can view it after I upload all the 251 test scores and understand it and start on it before our meeting.

Saturday/Sunday
Spent a bunch of time with jo from like 9pm to like 2 am, working on getting all the back end working to build the TakeTop action for a deck. The new framework seemed simple, except that we had to add a bunch of stuff for the server so it maintained a list of the decks, and it knew what deck to refer to. We used a SeverGameService interface which lets you get a deck based on a StringID for the deck.

Sunday, I worked on figuring out which listener to use for drop, within the PTE, for the deck component (embedded in a game component canvas). After playing around with dropOver, drop, and a combination of these, attached to different things, in order to determine the “source’ and “destination”. I remembered that the source was always fixed... for each different deck. So I could just use a drop for the “source” and pass in the destination as the constructor argument for a special type of Drop Handler. I think it was the not-sleeping properly and being sick, which took me so long to figure out.

Finally, I was able to do some magic, to get PutOnTop and PutOnBottom on, changing a bit of the code for both the server side and client parts. But it wasn’t too hard once I got joe’s expertise again, and a 2nd pair of eyes.