« first day (45 days earlier)      last day (3816 days later) » 
00:00 - 21:0021:00 - 00:00

21:03
i think i see what you are saying
it seems like the server can only handle one game at a time?
@bazola it should be able to handle more, although I have not tested that properly yet
[Zomis/Cardshifter] Zomis pushed commits e29298ec and 890430ba to ecs
[Zomis/Cardshifter] Zomis pushed commit a409080a to ecs
[Zomis/Cardshifter] build #28 for commit a409080a on branch ecs passed
[Cardshifter/Cardshifter] build #85 for commit 5669664a on branch ecs passed
21:14
Stil not working, I am trying to debug but no luck yet. This is my play() method:
	//this method only runs once at the start
	public void play() {
		String name = "Player" + new Random().nextInt(100);
		this.send(new LoginMessage(name));

		try {
			WelcomeMessage response = (WelcomeMessage) messages.take();
			if (!response.isOK()) {
				return;
			}

			//display the welcome message on the screen
			Platform.runLater(() -> serverMessage.setText(response.getMessage()));

		} catch (Exception e) {
			e.printStackTrace();
		}

		this.send(new StartGameRequest());

		try {
			Message message = messages.take();
here's what I would do:
			Message message = messages.take();
			if (message instanceof WaitMessage) {
				//display the wait message on the screen
				Platform.runLater(() -> serverMessage.setText(((WaitMessage)message).getMessage()));
				message = messages.take();
			}
			this.gameId = ((NewGameMessage) game).getGameId();
			this.playLoop();
well, its complaining saying that variables inside a lambda must be final, so it won't let me do the Platform.runLater(). Also it doesn't seem like it fixed the problem but I have to step through in the debugger to make sure
> updated gitignores
			Message message = messages.take();
			if (message instanceof WaitMessage) {
				//display the wait message on the screen
				String displayMessage = ((WaitMessage)message).getMessage();
				Platform.runLater(() -> serverMessage.setText(displayMessage));
				message = messages.take();
			}
			this.gameId = ((NewGameMessage) game).getGameId();
			this.playLoop();
[Cardshifter/Cardshifter] build #86 for commit cac3f08f on branch ecs passed
21:30
debugger says that it gets the welcome message, and thats it
@bazola what do you mean "that's it"? does it get stuck on WelcomeMessage response = (WelcomeMessage) messages.take(); ?
it definitely gets the WelcomeMessage in listen(), but it never gets anything else
	private void listen() {
		while (true) {
			try {
				MappingIterator<Message> values = mapper.readValues(new JsonFactory().createParser(this.in), Message.class);
				if (values.hasNextValue()) {
					Message message = values.next();
					this.processMessageFromServer(message);
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
		}
	}
i have the breakpoint at Message message = values.next()
and the line after also
change if (values.hasNextValue()) { to while (values.hasNextValue()) {
might work
i guess i was thinking that the listen() loop would run over and over because of while(true)
Well, it should...
but MappingIterator is a weird beast
21:35
same thing is happening
here is the server message:
[2014-09-16 16:35:14,084]  INFO   Handlers [    Conn-0] (         Handlers.java: 26) - Login request: Player10 for client com.cardshifter.server.clients.ClientSocketHandler@3d3c6978
[2014-09-16 16:35:14,084]  INFO   Handlers [    Conn-0] (         Handlers.java: 31) - Client is welcome!
[2014-09-16 16:35:14,097]  INFO   ClientIO [    Conn-0] (         ClientIO.java: 31) - Send to Player10: {"command":"loginresponse","status":200,"message":"OK"}
here is the client console:
--- exec-maven-plugin:1.2.1:exec (default-cli) @ cardshifter-fx ---
Sending: {"command":"login","username":"Player10"}
i don't get it, but I know I had more progress a couple of commits ago.. I will push what I have now, and then if I have some more time I will try to change things back and then track down what is happening
@bazola git diff HEAD~1 is a useful command I learned today :) You can also use HEAD~2 and HEAD~3 and so on...
You can even do git checkout HEAD~1 (repeatedly if necessary) and find the commit that works the best, then you might find what you changed which made it stop working
Then you can use git checkout javafx again to return to where you were
I can investigate in a little while, just need to commit some changes here...
21:51
I would like to figure it out, I just hope the problem is not MappingIterator because I don't know anything about the technical side of that one
> debugging incoming messages
for viewing changes in commits, the desktop GUI is pretty good
[Cardshifter/Cardshifter] build #87 for commit b7219e88 on branch javafx passed
@bazola Me neither :) I haven't studied it enough.
@bazola What gui is that?
21:56
GitHub
the desktop app
Incoming massive @Duga spam ^^
> Modified groupId for Maven
> Basic ECS methods, with a working test
> removed .classpath files from repository
> merge changes
> Added travis integration
> fixed travis
> Added a PhaseController with corresponding test
> Added Phase for the PhaseController
> Added simple actions
> Formatting in the old Lua script
this will probably take a couple of minutes.... :)
> Added Events support
> Added events and systems. Specifically events for changing phase
> Fixed a test. Added error message when no event handler for Component
> Added Resource component, for occations where there are integer values
> Removed HealthComponent, which has been replaced by Resource component
> Action events for hooking into allowing/denying, and performing actions
> Added Random in ECSGame, accessible to Components
> ActionComponent returns 'this' for chaining
> Entity.addComponents method for adding multiple components at once
one thing is for sure, the startGame command is not being sent in the most recent push
22:02
> Added simple Card component and some Zone components for various zones
it really should be though
> Added CreatureTypeComponent
> Added/Changed the known functionality for zones
> Added game state
Now I'll switch to your branch and investigate @bazola
> Added some useful methods to make life easier
> Added card move functionality
> Game State class
> Zone Change Event
> Resource retreiver
> Draw cards functionality
> Take Damage system for when there is no card to draw
> Resource-related systems
> Added isGameOver method
you've been spamming for 12 minutes now @Duga :)
22:08
> Added getSuperComponents method to get all components that share a type
> Made a static factory method for ResourceMap
> Added methods to return all actions in ActionComponent
> Added forEach method for zones
> Added TargetSet for Actions
> Added toString methods for Entity and Zone
> Added functionality for removing an entity from the game entirely
> ComponentRetriever for when there is only one such component in the game
> Corrected GameOverIfNoHealth system
> ResourceValueChange Event includes information about which resource
> Fixed ActionTest
> Added Entity owner to DrawCardEvent
> Added very useful systems
> Added an (unfinished) implementation of the 'Phrancis-game'
> Renamed System to ECSSystem because of collision with java.lang.System
> Organized some components and systems into category instead of type
@bazola I see the problem, you never add any messages to the messages BlockingQueue.
> Added utility method for retrieving a component when only one exists
You need to do messages.offer(message); when receiving a message
> Added getCurrentEntity method for convenience in PhaseController
> Initializing mana for starting player to 1
> Added get method in Entity for getting with a retreiver the other way
> Added a Stream method to Zones
> Added an (unfinished) PhrancisGame test
@SimonAndréForsberg sorry that it is something so simple!
22:21
> Fixed test
@bazola the simplest things can be the hardest to find :)
> Implemented targeting, and implemented attack and in Phrancis-game
@Duga You've almost spammed for 30 minutes now...
But I see @Duga is soon finished
> Added log4j to core
> Added some more systems
> Clearing action targets when action has been performed
@bazola if you want I can push some minor changes to get it working for you, then you can just use git pull, hopefully it won't be too many merge-conflicts
22:24
> Added simple ECSResource class for a named resource
> Added more testing
@SimonAndréForsberg I just made the fix and pushed it from my end
> fixed travis yml
oh nvm, it wouldn't let me push
> Made Entity final and added isRemoved method
one thing that is happening is that I have to shut the server down each time to do a proper test, because if I disconnect and try to connect again it gets stuck on Waiting For Opponent.. forever
22:26
@bazola that is strange, why not?
> Added SpecificActionTargetSystem for deciding if entities are targets
maybe it is not making another AI?
@bazola that's because the Server only gives you an AI the first time... I guess I could change that though
> Refactored ResourceRetriever a bit to be able to throw NPE
did you push changes to the javafx branch? if so that is why it will not let me push
22:28
@bazola No, I didn't. what does the output of git push say?
> Added Enchant systems for use with PhrancisGame
To github.com/Cardshifter/Cardshifter.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://github.com/Cardshifter/Cardshifter.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
I added the AI when I was making a lot of changes to the server, so I restarted the server every time either way. Didn't think about the case when only the client is changed...
> Rename PlayCostSystem -> UseCostSystem, added Enchanting to PhrancisGame
@bazola It rejects to push the master branch, but that's OK, you don't need to push that either way.
22:29
> Merge with Zomis/ecs
I think you have pushed, it's just that @Duga is still busy with my ecs-merge messages that it hasn't told you about it yet
Now only 2 more spams from duga
> Restored groupid to com.cardshifter
ah okay
> Updated version to 0.2-SNAPSHOT
22:31
about 35 minutes to send all those messages, nice @Duga!
@skiwi ^^
> client now properly receives messages from server
2
[Cardshifter/Cardshifter] build #89 for commit c005c0f4 on branch javafx passed
still mad that i didn't figure out the messages.offer() thing :)
@bazola if you're not used to BlockingQueues, it's not that easy to figure out
yeah
the MappingIterator is tough to watch in the debugger because the key variable data is buried down behind some other variables
22:46
yeah, I can imagine...
22:56
I'm just glad to be learning Java. I know I'm going to want to port my iOS games over to Android one day
2
Glad to hear that ^^
And I would like to port my Android app to iOS one day...
And I really should finish my second Android app...
You wanna trade, @bazola? I implement your iOS game in Android and you implement mine in iOS? :)
hehe well yeah I would be interested in that :) The hard part is making complex animations and stuff, still learning how to do that on any platform
anyway I am heading out for the night, thanks again for the help and sorry that I couldn't find that stupid bug. But I think that tomorrow I will be able to implement something useful, now that messages are coming in properly
@bazola that part is actually incredibly easy on Android! It's possible to define an Animation both in XML and in code.
@bazola just be sure to push your latest changes
I am considering doing a bit of cleanup of your code (adhering to Java-conventions, cleaning up some compiler warnings, etc...)
yeah Sprite-Kit has options for doing that, but its not so much making them as making them good animations
> small refactor
23:03
there you go
have at it :)
@bazola are you as bad a designer as I am? :)
not sure what you mean exactly, but normally I write code before I plan out a big picture. However when making a full game, I will design a lot of it on paper to try to get good gameplay ideas
[Cardshifter/Cardshifter] build #90 for commit b81cb19a on branch javafx passed
anyway, heading out for now. talk to you later!
23:55
> added debugging help and changed gitignore
> Code cleanup, formatting, and some compiler warnings removed
> Code cleanup
> Merge branch 'gameplay-fix' of github.com:Cardshifter/Cardshifter into javafx
[Cardshifter/Cardshifter] build #91 for commit 5e98d14f on branch javafx passed
[Cardshifter/Cardshifter] build #92 for commit f0b47c38 on branch javafx passed
@bazola I mean graphical designer. I am not very good in making things look good.
00:00 - 21:0021:00 - 00:00

« first day (45 days earlier)      last day (3816 days later) »