« first day (46 days earlier)      last day (3515 days later) » 
01:00 - 16:0016:00 - 00:00

4:03 PM
> Added an 'ai' command on server to create a new AI
 
@bazola I'd recommend doing git pull when you can
 
hopefully it shouldn't be any merge conflicts
 
well, at least this time the spam fits on one line...
 
@skiwi About the spam, how about writing Zomis pushed 57 commits to javafx, with a link to the Network graph or something for the '57 commits'?
 
How is that git pull going, @bazola?
 
4:16 PM
said fast forward
 
cool
@bazola If you do git pull origin client-server also, then you will get that latest 'ai' command update
and then you can do git push just to sync things
 
> corrected travis webhook
 
seems like I broke the travis webhook some time @skiwi. Sorry about that. Corrected it now I think. I have looked at Travis manually and it does build correctly
 
Nice to have you back, @Duga
 
player2 does not have a MANA_MAX: Player Info: Player2 - {SCRAP=0, MANA=0, HEALTH=10}
 
@Duga Crap! I tried to avoid that this time...
 
@bazola I'll investigate that
 
4:37 PM
 
@bazola Investigation completed. The players don't get any initialized MANA_MAX value at the moment. It is set the first time it is modified.
 
Try to make it more flexible, so that you show the values that exist, whichever they are. We want to support more games (mods), do we not?
 
@SimonAndréForsberg With a configurable n-size for amount of commits in one push? - And the non-unique commits might need special treatment there?
 
4:43 PM
 
@SimonAndréForsberg What/who/where di dyou break it?
 
@Duga huh?
 
this is the working code that I have so far, I realize it is not set up for "mods" yet:
	private void processPlayerMessage(PlayerMessage message) {
		if (message.getName().equals("Player1")) {
			for (String string : message.getProperties().keySet()) {
				if (string.equals("SCRAP")) {
					opponentScrap.setText(message.getProperties().get("SCRAP").toString());
				} else if (string.equals("MANA")) {
					opponentCurrentMana.setText(message.getProperties().get("MANA").toString());
				} else if (string.equals("MANA_MAX")) {
					opponentTotalMana.setText(message.getProperties().get("MANA_MAX").toString());
 
I'll check in later tonight to see where to branch off
 
@skiwi I think that unique commits should always be shown. But when there are n non-unique commits, bunch them together like I suggested
 
> working on procesing messages
 
@skiwi in an old commit I did after I had forked the repo. When merging it back to the main repo, I apparently did not restore it.
 
4:47 PM
[Cardshifter/Cardshifter] build #99 for commit 064c8bfc on branch ecs-fx passed
[Cardshifter/Cardshifter] build #100 for commit 064c8bfc on branch develop passed
[Cardshifter/Cardshifter] build #101 for commit 7eaae304 on branch javafx passed
 
@skiwi the ecs branch was behind and obsolete, nearly all other branches (except 'master' and 'gameplay-fix') was ahead of it
 
Okay
 
@skiwi 'develop' is a good candidate to branch off now
 
@SimonAndréForsberg But one invalid travis file can only break it for that specific branch
 
@SimonAndréForsberg also UpdateMessage still does not have a PlayerId. I was planning to use that to update the text values in the same fashion as I do it with PlayerMessage
 
4:50 PM
@bazola It is not set up for 'mods', no. And it is also some duplicated code. I'd suggest finding a way to create the labels dynamically (programmatically).
@skiwi yes, but then I merged and broke the webhook for all other branches...
 
@SimonAndréForsberg That's an issue yes ;)
 
@bazola the 'id' that is passed along in the UpdateMessage is a reference to an entity. That entity is something the client should already know where/what it is. I don't think that the UpdateMessage should have a 'PlayerId'
 
well, I am piping the contents of all messages to the console, and never does it say anything about id=44 being equivalent to a particular player
but I guess I will get the right value by calling getId() on the PlayerMessage?
 
@bazola exactly. When you receive PlayerMessage / CardMessage etc. the Id is passed along, that tells you that the id is a Player/Card. Keep track of that id.
 
and getIndex() will give me either 0 or 1? that still does not totally solve the issue that the AI will always be 0 and the player will always be 1 though, I don't think
 
5:02 PM
@bazola getIndex() will give you 0 or 1, yes. The AI shouldn't always be 0 and the player always 1. It is randomized (I think)
Let me know if you have problems figuring out who's who of the players
 
I think I will have problems? because right now I only have Player1 and Player2 and those seem arbitrary?
 
@bazola In the NewGameMessage that you receive, the server tills you which playerIndex you have been assigned.
 
5:20 PM
okay cool
 
5:58 PM
I used VBox's and loaded the values from the properties map programmatically
 
@bazola Nice
 
I still have redundant code though.. not sure yet quite how to solve it.
	private void processPlayerMessage(PlayerMessage message) {
		if (message.getIndex() == this.playerIndex) {
			this.processPlayerMessageForPlayer(message);
		} else {
			this.processPlayerMessageForOpponent(message);
		}
	}
	private void processPlayerMessageForPlayer(PlayerMessage message) {
		for(Map.Entry<String, Integer> entry : message.getProperties().entrySet()) {
			String key = entry.getKey();
			opponentStatBox.getChildren().add(new Label(key));
			int value = entry.getValue();
			opponentStatBox.getChildren().add(new Label(String.format("%d",value)));
 
@bazola Pass the playerStatBox as method argument
 
What @skiwi said ^^
private void processPlayerMessageForPlayer(PlayerMessage message, VBox statBox) {
 
@SimonAndréForsberg Pane might even be better
 
6:04 PM
true ^^
 
makes sense
tyvm for the AI command @SimonAndréForsberg, works great
 
no problems
 
that looks a little better :)
is the map guaranteed to always be in the same order?
 
@bazola Both yes and no, because the key is String. It does a magic sorting based on the hashCode of the key. However, a HashMap is not guaranteed to be in order. If you want to make sure it is ordered, use this:
Map<String, String> sorted = new TreeMap<>(map);
 
6:21 PM
cool I will try that
 
6:33 PM
does PlayerMessage only come one time at the start of the game?
 
for each player
cool
 
6:58 PM
I still seem to be stuck with a construct like this if I want to associate specific Panes on the screen with specific Ids:
	private void processZoneMessage(ZoneMessage message) {
		if (message.getName().equals("Battlefield")) {
			if(message.getOwner() == this.playerId) {
				this.playerBattlefieldId = message.getId();
			} else {
				this.opponentBattlefieldId = message.getId();
			}
		}
	}
 
Consider making a ZoneView class for the zone views
For now though, All battlefield zones will have the name "Battlefield"
 
I should stop slacking
 
i'm not really sure how I would design a class like that.. I thought about putting all the zone information in some kind of Map, but it seems like an ID still has to be hard coded to Pane somewhere for it to go to the proper place
 
@bazola the id can be stored within the ZoneView class. But if you're not sure about it, don't worry. I might take a look at it later.
@skiwi Yes, you should!
 
also it will be useful if nothing ever has the ID 0
 
7:05 PM
Already taken care of. The first id is always 1.
 
i figured that would be the case :)
 
> Deprecated more classes
> Start ECS-game by default in console-main. Added '--lua' option
[Cardshifter/Cardshifter] build #102 for commit 73172d5e on branch ecs-fx passed
 
I keep reading that as ecs-fix
@SimonAndréForsberg Where do I need to branch off now?
 
fx as in JavaFX
develop is still a good choice @skiwi
What do you intend to work on?
 
Splitting core/commons and mod
 
7:12 PM
alright
So ecs-split as a branchname or something?
 
> $ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
I doubt that
 
@SimonAndréForsberg I was thinking ecs-module-support
 
7:15 PM
Yes, I created a new branch and pushed it via the CLI without googling!
(And meanwhile almost crashed my repo)
 
@skiwi the more you use the CLI, the more you learn (which is why I use it almost all the time now)
 
The ecs-module-support branch right now is in a state that doesn't build for some reason
 
use mvn clean or something
 
Hmm only Netbeans claims that appereantly
I already did that once
 
7:18 PM
in Eclipse I have the option to 'Update Maven Project' to make the IDE settings match the ones for Maven
try mvn install perhaps (as the version number has changed)
 
You changed all versions to 0.2-SNAPSHOT I see?
 
yes
it seemed like the best choice for now
 
`this.send(new PlayerMessage(playerEntity.getId(), plData.getIndex(), plData.getName(), Resources.map(playerEntity)));
It has an old version of PlayerMessage not requiring the two ints
 
perhaps you have the same bug that @bazola has every now and then...
have you checked PlayerMessage class?
 
Now it builds
I used an individual clean and build on the cardshifter-api
 
7:21 PM
OK
I am considering either starting an implementation of Hearthstone (or something similar) with ECS, or.... hmm... I'm not sure... suggestions?
 
7:34 PM
@bazola NB 8.0.1 is out >> wiki.netbeans.org/NewAndNoteworthyNB801
 
@SimonAndréForsberg your other hearthstone implementation is not ECS? or you would just be porting it over to this engine?
 
@bazola my other HS implementation is not made with ECS, no
 
> 64 updates found!
 
without more play testing I cannot recommend any significant changes to our Mod, and I don't have any other Mod suggestions at this time. I have an idea about a game that has two lanes on the battlefield on each side but I don't know if that would be fun yet
 
@bazola I also have several two-lane ideas but I think we should wait a bit with those
 
7:49 PM
I need to get a little bit further with this client to know exactly what additional information I would need to render the screen properly
 
If I go like this private final List<Integer> idList = new ArrayList<>(); and then:
		this.idList.add(this.opponentBattlefieldId);
		this.idList.add(this.opponentHandId);
		this.idList.add(this.playerBattlefieldId);
		this.idList.add(this.playerHandId);
are those going to be pointers to the original values?
 
Integer is technically a class that simply wraps an int
the values will not change
 
so this will not work?
	private boolean allZonesAssigned() {
		for (int idNumber : this.idList) {
			if (idNumber == 0) {
				return false;
			}
		}
		return true;
	}
 
yes it will work
or well...
for (Integer idNumber : this.idList)
 
7:53 PM
@bazola That will work as well
 
Java automatically boxes/unboxes the values
 
If there is a null in the list, then it will throw a NPE
 
so once I change a value inside that list to be something other than zero, it will change the value that the list is referencing?
 
@bazola you cannot change an Integer, you can change the values of the list by using add and set though
 
hmm
 
7:56 PM
but are you really going to keep the list empty for long? What are you trying to accomplish?
 
here is the larger code snippet:
	private void processZoneMessage(ZoneMessage message) {
		if (!this.allZonesAssigned()) {
			assignZoneIdForZoneMessage(message);
		}

		for (Integer zoneId : idList) {
			if (zoneId == message.getId()) {
				processZoneMessageForId(zoneId, message);
			}
		}
	}
	private void processZoneMessageForId(Integer zoneId, ZoneMessage message) {

	}
	private void assignZoneIdForZoneMessage(ZoneMessage message) {
		if (message.getName().equals("Battlefield")) {
			if(message.getOwner() == this.playerId) {
then inside processZoneMessageForId, I would draw the cards to the correct zone
Maybe I should make it a Map that takes the integer as a key, and has the Pane as a value
 
I would rec... yes, exactly!
Map<Integer, Pane> zones;
 
woot
 
Lua syntax highlighting?
 
@SimonAndréForsberg Yes!
 
8:04 PM
nice
 
Now I can live with only Netbeans once again
 
8:17 PM
Didn't got to do anything on the project unfortunately, stomach was acting up again
 
8:37 PM
how does this look:
	//////////ZONE MESSAGES//////////////
	private void processZoneMessage(ZoneMessage message) {
		//this may be redundant now that I am doing containsKey at the start of the assignment anyway
		if (!this.allZonesAssigned()) {
			assignZoneIdForZoneMessage(message);
		}

		Pane targetPane = this.idMap.get(message.getId());
		this.processZoneMessageForPane(targetPane, message);
	}
	private boolean allZonesAssigned() {
		return (this.idMap.containsValue(playerBattlefieldPane)
				&& this.idMap.containsValue(playerHandPane)
 
I don't like the //////////ZONE MESSAGES////////////// comment. It might be an indication that it can be splitted to it's own class, or that the comment should just be removed
 
in objective-c I do headings inside classes with pragma mark - Name Of The Heading
one advantage is that it shows up as bold in the method browser of the IDE in xcode
I have not seem something similar in Java so I have been doing that type of comment
 
In Java, you rarely see such headings
or such comments
 
right now each type of Message will probably need more than one method, so maybe that does mean that they should be a class, but I would rather make sure this functions first and then refactor it out
but if those headings are frowned upon I will stop :)
 
@bazola It looks better. I'm sure though that some simplifications can still be made but you don't need to worry about that. However, I think you will only get a ZoneMessage once for each zone.
 
8:41 PM
ever? i see..
but all of the CardInfoMessages are sent every turn?
 
@bazola Not every turn, they're sent once for setup and so far... only once :) I haven't added any messages for when cards move through zones, but I will do so later on
(feels like I have to do so soon as you have progress)
 
well it is going to be a big hurdle getting proper actions to be sent to the server, but it should be relatively simple to get a list of actions printed on the screen, and send the one the user selects
once I have that, turns can be progressed at least, and then I would need updated data each turn
 
the server will send you updated data as soon as it is available
 
right
I have it in a listen loop that processes messages as soon as they come in
 
8:59 PM
> prototype message handling nearly complete, still need to handle cards and actions
[Cardshifter/Cardshifter] build #104 for commit c5318ff2 on branch javafx passed
 
 
1 hour later…
10:08 PM
how do I deal with getting null pointer exceptions if i do a contains(key) on a map and it doesn't contain the key? I just want the bool to return false if the key is not in there
specifically it is these lines:
`if (!this.idMap.containsKey(message.getId())) {`
`if (idMap.containsKey(message.getId())) {`
 
containsKey should not throw NPE. It only throws NPE if message.getId is null, or if message is null or if idMap is null
if you can't find the solution, what exactly does the stacktrace say?
 
ZoneMessage [id=4, name=Battlefield, owner=1, size=0, known=true]
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException
	at com.cardshifter.client.GameClientController.assignZoneIdForZoneMessage(GameClientController.java:280)
	at com.cardshifter.client.GameClientController.processZoneMessage(GameClientController.java:266)
	at com.cardshifter.client.GameClientController.processMessageFromServer(GameClientController.java:199)
	at com.cardshifter.client.GameClientController.lambda$listen$2(GameClientController.java:148)
 
my guess is that either message or idMap is null
 
i think I was initializing the Map wrong
 
10:20 PM
that did get rid of the NPEs
 
10:32 PM
id call that a proof of concept
the problem from here is that to map values to a specific place on the card using FXML and Scene Builder, I need to parse their names and assign their values to the appropriate Label
that will work but I don't see how it translates to a mod
unless the mod maker is going to make their own FXML documents
 
@bazola excellent!
@bazola yeah I am also wondering about how we should solve that part... forcing modders to make their own FXML doesn't feel like a good approach.
It would be nice to support many kind of mods, but I'm not sure how to do that and still make it look quite good
 
10:48 PM
me neither
 
> CardInfo messages are now being used to render the players hand
 
so right now I am adding the card to the scene like this:
	private void addCardToPlayerHandPane(CardInfoMessage message) {
		CardHandDocumentController card = new CardHandDocumentController(message, this);
		playerHandPane.getChildren().add(card.getRootPane());
	}
so if cards are going to move between zones, there needs to be a message for this card that will allow me to trigger playerHandPane.getChildren().remove(card)
 
looks like there is room for refactoring
 
[Cardshifter/Cardshifter] build #105 for commit 0d64a8e6 on branch javafx passed
 
looks like, maybe, but the cards in the player hand and opponent hand are going to be rendered totally differently
the battlefields are possibly a different story
 
10:51 PM
yeah I think there will be a ZoneMoveMessage informing both the zone it was moved from and the soon it was moved to. Haven't entirely decided on that yet, but that would pretty much match the event that gets executed when a card moves between zones
@bazola might still be refactorable though. but we can deal with that later
well done
 
well you know I love refactoring when I can figure out how to do it :) and thank you
 
11:18 PM
you're on the right site then :)
 
> cleanup of PhrancisGame
[Cardshifter/Cardshifter] build #106 for commit db65dc73 on branch develop passed
 
11:36 PM
> Added CancellableEvent interface and method to run cancellable events
> DrawCardEvent: Added fromZone and toZone. Is now cancellable
[Cardshifter/Cardshifter] build #107 for commit ce2a37eb on branch develop passed
> Added Hand Limit of 10 cards. Easily configurable. Fixes #11
[Cardshifter/Cardshifter] build #108 for commit a6c7700c on branch issue11 passed
> Added Test for issue 11
[Cardshifter/Cardshifter] build #109 for commit bed95072 on branch issue11 passed
 
01:00 - 16:0016:00 - 00:00

« first day (46 days earlier)      last day (3515 days later) »