« first day (360 days earlier)      last day (3500 days later) » 

00:00
RELOAD!
[Cardshifter/Cardshifter] 2 opened issues. 2 issue comments.
[Hosch250/Rubberduck] 14 commits. 1266 additions. 225 deletions.
[retailcoder/Rubberduck] 1 commit. 1006 additions. 990 deletions.
[rubberduck-vba/Rubberduck] 1 opened issue. 3 issue comments.
[Zomis/Duga] 1 commit. 2 deletions.
[Zomis/Server] 2 opened issues.
@Phrancis If it's anything, I've got a small and simple JavaScript library somewhere in my GitHub.
It works with HTML elements, rather than the canvas though.
Hmm curious now, tell me more?
I think it was one of my first projects... lemme dig for a second.
(Excuse the name)
> In light of recent discussion in chat about making a HTML/CSS/JS browser-based client from scratch, rather than using libGDX, what should we do with this?

Perhaps if we can use libGDX for what it's really good at, and roll our own HTML client; best of both worlds?
00:32
I got the select up and running.
Sweet!
Alright. It's updated.
I have to say, I am really impressed with Raphael.js
Ooh. That looks nice.
00:43
Looks like it's mainly for vector graphics, but still. Perhaps it could be combined for other things. Could picture moving cards etc. from one place to the other, cursors and things like that
@SirPython Looks good to me, great work!
[Cardshifter/HTML-Client] Phrancis pushed 25 commits to master (only showing some of them below)
[Cardshifter/HTML-Client] SirPython pushed commit f260556c to master: added a secure server option
[Cardshifter/HTML-Client] SirPython pushed commit 4d0d8341 to master: added a secure server option
[Cardshifter/HTML-Client] SirPython pushed commit 62bf949b to master: changed name to CardshifterServerAPI
[Cardshifter/HTML-Client] SirPython pushed commit a9166e5a to master: types renamed to messageTypes
[Cardshifter/HTML-Client] SirPython pushed commit 24ba581d to master: added all "both" message types
[Cardshifter/HTML-Client] SirPython pushed commit 34df9ffa to master: changed ws to socket
changed placholder, planning select

The place holder for server used to be `dwardtowers.com`, now it is local host. Simon suggested that I add a select option for some of the most common servers. I am planning the best way to do this now.
[Cardshifter/HTML-Client] SirPython pushed commit b6b7c4db to master: new select feature
[Cardshifter/HTML-Client] SirPython pushed commit b5a5773c to master: added select feature
Merge pull request #1 from SirPython/master

basic login screen, server API with all client-sendable message formats
Oh noes. I forgot to include the css file.
If you want to put it in a pastebin or something I can add it in real quick
Whoops.
Sorry, I just saw your message.
00:53
That works just fine
[Cardshifter/HTML-Client] SirPython pushed commit e623f51f to master: forgot the css file
[Cardshifter/HTML-Client] SirPython pushed commit 5516e7fe to master: added title, css, and script
Merge pull request #2 from SirPython/master

added login css, added link script and title to html
yesterday, by Simon André Forsberg
I gotta go to bed. I hope that by the end of tomorrow, there will be at least a proof-of-concept simple messaging between HTML-Client and server.
@SimonAndréForsberg Are you satisfied with what has been done so far? ^^
 
8 hours later…
09:20
Looks like good progress!
10:01
hey
 
2 hours later…
11:33
@SirPython depends. Have you been able to send a real message to the server and receive something back?
 
1 hour later…
12:40
Monking
How is it going?
did you notice anything different during Reload?
YES! THANK YOU :D
13:19
TTGTW
 
1 hour later…
15:08
This won't be exactly pretty, but it should only be temporary... :)
15:18
@Phrancis what won't be pretty?
15:29
Hold on
Update login.html

Rudimentary connection to websocket.org to test the connection test
@SimonAndréForsberg ^^
It works though, so far :)
okay
I'd like to see progress on communicating between the JS websocket and the Cardshifter server
Agreed. That's a bit over my head at the moment though, but I do want to be doing something rather than nothing, that can at least help a little bit
I don't think it is as much over your head as you think it is.
I have shown an example JSON message that can be sent to the Cardshifter server. try to send that and make sure that you receive something back.
15:38
@SimonAndréForsberg Could you re-link the message here please? I must have missed it
yesterday, by Simon André Forsberg
{ "command": "login", "username": "Zomis" } (for https://github.com/Cardshifter/Cardshifter/blob/master/cardshifter-api/src/main/‌​java/com/cardshifter/api/incoming/LoginMessage.java )
Sweet, should I expect a response from the server that I can print in the document?
Perfect, I'll work on that next
Would something like this work? doSend({ "command": "login", "username": loginForm.elements['username'] });
No, I believe you need to send it as a string
doSend('{ "command": "login", "username": ' + loginForm.elements['username'] + '}');
15:47
OK. Are single and double-quotes interchangeable in JSON?
yes. This is more about JS though, but still yes
Perfect, great information
16:02
Doesn't JSON always wants double quotes?
@skiwi seems correct. @Phrancis Always use double quotes inside the JSON, but you can use single quotes for the JS quotes. so what I wrote above is still legal.
Ah, it might only matter when reading from file?
no. Double Quotes is the JSON Standard.
whether you read from a file or not is irrelevant
sUPER
16:12
^^ tHAT
16:23
BTW.Work
16:43
@SimonAndréForsberg That makes sense yes
@SimonAndréForsberg been playing around with your perlin noise code a bit
public class MapGenerator {

    public static int[][] noiseMap(int width, int height) {
        float[][] floatMap = PerlinNoiseGenerator.generateWhiteNoise(width, height);
        return MapGenerator.perlinNoiseToIntMap(floatMap);
    }

    public static int[][] perlinMap(int width, int height) {
        float[][] floatMap = PerlinNoiseGenerator.generatePerlinNoise(width, height, 10);
        return MapGenerator.perlinNoiseToIntMap(floatMap);
    }

    public static int[][] heightMap(int width, int height) {
seeing what height maps could look like in the game
hmm... that looks a bit strange.
yeah its unfortunately not generating something similar to a topographic map just yet
16:51
@bazola Looks quite cool
But is it intended to look like a swamp?
that map is, yeah
marshlands is enabled as well as river and ocean
heres a drier looking one
Looks okay to me
Hmmm, seems like Windows 10 releases slowly tomorrow
I'm not prepared yet though :(
@bazola still looks a bit weird to me. Can you show the number of the height instead of the graphics? the graphics look odd to me, or maybe I just can't see correctly.
hold on i think i can generate that
9821009423524632310867303569916373721304
4272669169564140807768662868818279369636
1562066783043598295980324924308518454755
6190695609786007475995272614456007700380
1446571247075768807202112723672133840056
2147600808487430347316902689946511250020
7330737022434616001388575278326266070334
5184058824341855719635912378106889521754
6081860534566675895572145478928751555307
3100256992000267917036528964707862197095
7802746254103023919198315583804705263971
6250685116298207633920463280017266764107
0813466631989988966030625920063800543895
looks pretty random, that is heightMap()
17:06
valid values are 0 - 9 ?
yeah
here is the one that runs it through smooth in the PerlinNoiseGenerator class they provide:
3334444333444444444444444444444444444444
4444444444444444444444444444444444444444
4444443444444444444444444444444444444444
4344444444444444444444444444444444444444
3344444434444444444444444444444444444444
4444444444444444444444444444444444444444
4444444444444444444444444444444444444444
4444444444444444444444444444444444444444
4444444444444444344444443444444444444444
4444444444444444344444444444444444444444
4444444444444444444444444444444444444444
4444444444444444444444444444444444444444
4444444444444444444444444444444444444444
yeah, that looks more like Perlin-based
something is wrong with your heightmap generation
PerlinNoiseGenerator.getHeightMap(width, height, 0, 1, 1);
what's the PerlinNoiseGenerator.getHeightMap method?
    public static float[][] getHeightMap(int width, int height, int min, int max, int octaveCount) {
        float[][] baseNoise = generateWhiteNoise(width, height);
        float[][] noise = generatePerlinNoise(baseNoise, octaveCount);
        float[][] map = new float[width][height];
        int range = max - min;
        for (int y = 0; y < height; y++) {
            for (int x = 0; x < width; x++) {
                map[x][y] = noise[x][y] * range + min;
            }
        }
        return map;
pretty much just changed up their version because it returned a byte[]
I don't remember them having a version like that
I think only using 1 octave is too low for that. try with 8 or something
unless you made that method, I copied the PerlinNoiseGenerator from the repository you made
@SimonAndréForsberg ah, yeah that looks better
17:11
hmm, okay, apparently there is such a method. I had never used that
0001111111122222222222332233333333332222
0001111111222222222222222233233333332333
0011111112222222222222222222233333332333
0111111122222222222222222232233333333333
0111111222222222222233222223233333333333
1111111222222222222222232233333333333333
1111122222222222222222222333333333333333
1111112222222222222222223333333333333333
1111112222221222222222223333333333334333
1111122222222222222222233333333333433333
1221122222222222222222233333333333333333
1211122222222222222222223333333344433333
1112112222222222222222223333443444333333
that's more like it
now how does that map look?
if you always want the full range from 0 - 9 to be used, you would need to "normalize" the float map before you use it. Let me know if you're interested in that.
@SimonAndréForsberg yeah i am interested in that, i seem to be only able to get it to use 4-5 at a time
yeah, that looks better
okay, so I'll write something up
17:32
WTF JavaScript
    <script "type="text/javascript">
    // @TODO: Extract this functionality to external file.
    "use strict";

    login_information = document.login_information;

    login_information.elements.test_websocket.addEventListener("click", init);

    // var username = login_information.username; // Username: [object HTMLInputElement]
    // var username = login_information.username.value; // Username: ""
    // var username = document.getElementsByName("username").value; // Username: undefined
I just want the damn input value
    <label for="username">Username:</label>
    <input name="username" id="username" type="text" placeholder="Enter name..." />
@Phrancis var username = document.getElementsByName("username")[0];
I think...
Where's the HTML?
and then use .value
@skiwi 2 messages above your question.
@SimonAndréForsberg I'm blind...
document.getElementById("username").value should work
Similarly login_information.username.value would also work
@SimonAndréForsberg That would also address the same thing
yes, I'm aware
17:38
@Phrancis What are you expecting? It (most likely) cannot read the placeholder text
public static void normalize(float[][] array) {
    float min = Integer.MAX_VALUE;
    float max = Integer.MIN_VALUE;
    for (int a = 0; a < array.length; a++) {
        for (int b = 0; b < array[a].length; b++) {
             float value = array[a][b];
             min = Math.min(min, value);
             max = Math.max(max, value);
        }
    }
    for (int a = 0; a < array.length; a++) {
        for (int b = 0; b < array[a].length; b++) {
             float old = array[a][b];
             float value = (old - min) / (max - min);
@bazola ^^
@Phrancis did you write any name in the input?
as @skiwi said, you can't access the placeholder text like that
@SimonAndréForsberg Yeah I did in every case
How are are you executing your code?
When do you request the value of the field?
bingo
<script "type="text/javascript"> when the page loads, it seems.
18:00
looks like its working @SimonAndréForsberg
6665456776654544345576677777888998787888
6665556665555444444566667777788898788888
6666566655554554444566667777789898788888
6666666655554444344556667677778888888887
6666766555554444345556666666777888788878
6666665545554444445566666677778887787888
7666655444454445455566666777888878888888
7666665544444445555656667777888887877888
7766655544444545555556778777888888876788
7666655555544554555555667778778877877788
7676556655554544455555667777677777777777
6666666555554554444456666677777677777777
5566666555554454444555667677766767788887
Omg omg omg... I got the job I applied for!! :D
Congratulations, @Phrancis!
@bazola good to hear. I never tested it, just wrote it up on the spot :)
@Phrancis congrats!
Thanks!!
I wonder if the JS is getting confused because the HTML input fields have both a name and an id
<input name="username" id="username" type="text" placeholder="Enter name..." />
no it isn't
but as @skiwi said, when is your code executed?
18:20
    <script type="text/javascript">
    // @TODO: Extract this functionality to external file.

    login_information = document.login_information;

    login_information.elements.test_websocket.addEventListener("click", init);

    var username = login_information.username; // Username: [object HTMLInputElement]
    //var username = login_information.username.value; // Username: ""
    //var username = document.getElementsByName("username").value; // Username: undefined
    //var username = document.getElementById("username")[0].value; // Username: ""
I set up an event listener to fire upon clicking the Test WebSocket button...
yes, but where are you getting the value of the username textfield?
18:46
@Phrancis Congratz!
19:02
@SimonAndréForsberg User input from document prior to clicking the button.. Did I understand your question correctly?
@Phrancis why are you getting the value prior to clicking the button?
Ohhhhhhhhhhhhhhhhhhhhhhhh OK I think I got you now!
2
19:19
@Phrancis Good good :)
Yes! It works now :D
19:53
if you all are curious, here is a secret developer version of voxelcity pixelpocalypse.com/secret
@bazola SEEKRIT!
lol
20:11
"secret"
@Simon quick question about websocket... if I want to open with localhost, does it need to be just "120.0.0.1", or "ws://120.0.0.1" or do I need to also include port 4243?
@Phrancis First tip: Use 127.0.0.1 ;)
@Phrancis ws://127.0.0.1:4243
[Zomis/Server] Zomis pushed commit 801622bd to develop: added possibility to add AI in main server (without test server)
[Zomis/Server] Zomis pushed commit 5e3119a5 to develop: added a bunch of different UTTT AIs to server
20:33
Typo
@skiwi lol, right
20:44
I'm guessing it would then also be ws://dwarftowers.com:4243 correct?
> I'd like to see this happening:

- [ ] Send login message to server, JSON format: `{"command":"login","username":"YourUserName"}`
- [ ] Send a query to get the online users: `{"command":"query","request":"USERS","message":""}`
- [ ] Retrieve messages from server and display what users that are online

The server should reply with the following messages, but as JSON format:

- WelcomeMessage [status=200, userId=6, message=OK]
- ChatMessage [chatId=1, message=Zomis2 has joined the chat,
@Phrancis yes (assuming @bazola has opened up that port)
should be, but the server crashes at strange times so who knows at this moment.. :)
That should do the trick for now
    <label for="server">Server:</label>
    <select name="server" id="server">
        <option value="ws://127.0.0.1:4243">Local host</option>
        <option value="ws://dwarftowers.com:4243">dwarftowers.com</option>
        <option value="ws://echo.websocket.org/">WebSocket.org echo test</option>
        <option value="other">Other...</option>
    </select>
it appears to be up at this moment
20:48
@Phrancis @Lokkij @SirPython FYI I will be AFK from Saturday and until August 17th. I would really like to see issue #3 fixed before that, just in case I need to help out with something.
21:00
@SimonAndréForsberg I feel sure we can knock that out before then :)
21:35
@Simon ^^ thoughts? (haven't tried against our server yet, but looks like the message sent is in the correct format)
@Phrancis thoughts? Only one: Try it against the Cardshifter server.
Alright, let's see what happens :)
Well, the server got the message, but raised an out of bound exception
[2015-07-28 17:42:37,565]  INFO MainServer [      main] (       MainServer.java:
 93) - Started
[2015-07-28 17:43:01,465]  INFO  ServerWeb [WebSocketWorker-9] (        ServerWe
b.java: 46) - Connection opened: org.java_websocket.WebSocketImpl@11393ed
[2015-07-28 17:43:01,465]  INFO     Server [WebSocketWorker-9] (           Serve
r.java:158) - New client: 6:  @ /127.0.0.1:59717
[2015-07-28 17:43:01,465]  INFO  ServerWeb [WebSocketWorker-9] (        ServerWe
b.java: 66) - Connection message from: org.java_websocket.WebSocketImpl@11393ed:
I can confirm the connection check on the page works correctly; whenever I shut the server down, it showed as disconnected right away. I just did not get a response form the server due to that error, apparently
Issue #3 - Added a rudimentary websocket connection test

The connection test appears to be working correctly. I added a ping to websocket.org to test the test, and also tested against Cardshifter server running locally. Local connection raised `java.lang.ArrayIndexOutOfBoundsException` on server side, but maintained the connection until I shut down the server.
21:51
thanks @Phrancis, that gives me something to work with.
I used a server version from about a month ago, I don't know if you made changes on the server since, but I can test with most recent snapshot if you want
not necessary. The problem is server-side at the moment
22:28
> Server: ws://127.0.0.1:4243
Username: Zomis42
Message: { "command": "login", "username": "Zomis42" }

CONNECTED

SENT: { "command": "login", "username": "Zomis42" }

RESPONSE: {"command":"loginresponse","status":200,"userId":6,"message":"OK"}

DISCONNECTED
[Cardshifter/Cardshifter] Zomis pushed 4 commits to rules
[Cardshifter/Cardshifter] Zomis pushed commit 3b79933a to rules: added isBase64 method to Base64Utils to check if a string is Base64 encoded
[Cardshifter/Cardshifter] Zomis pushed commit 35114798 to rules: added support for Websocket clients that use JSON as message serialization method
@Phrancis new snapshot incoming
[Cardshifter/Cardshifter] build for commit 35114798 on rules: The Travis CI build passed
@Phrancis @bazola server with support for websockets that are using JSON ^^
@SimonAndréForsberg will that make any difference for the libGDX client?
22:40
the LibGDX client should work the same as it did before.
(i.e. just as half-broken)
@Phrancis Next step: Leave the connection open, don't close it after having received one message.
> with @Phrancis test branch and code, and with a [new snapshot of the server](http://chat.stackexchange.com/transcript/message/23074479#23074479) I managed to get the first part working.

Next step: Don't close the connection after one received message ;)
@SimonAndréForsberg Awesome
What was the problem?
Oh, encoding eh
the problem was that the server assumed that all websockets were using the ByteSerialization that our LibGDX client uses
Ahhh OK
23:04
Merge pull request #4 from Cardshifter/connection-test

Connection test
[Cardshifter/HTML-Client] Phrancis pushed commit 2c2c9d64 to master: add .gitignore
Okay, finally setup on my machine :)
23:45
200_success vs. rolfl: 2762 diff. Year: +2016. Quarter: +2350. Month: +2350. Week: +75. Day: -20.
200_success vs. janos: 15921 diff. Year: -3679. Quarter: -758. Month: -758. Week: -455. Day: -70.
Loki Astari vs. Simon André Forsberg: 2914 diff. Year: -2862. Quarter: -1266. Month: -1266. Week: -1. Day: +5.
Mat's Mug vs. Simon André Forsberg: 360 diff. Year: +1250. Quarter: -254. Month: -254. Week: +171. Day: -5.
@Phrancis May I ask you a question about the design of the HTML client?
@SimonAndréForsberg I've been looking over the API and have realized that I actually have a lot more message types to implement. Which ones are sent by the server, and which ones are sent by the client?
@SirPython Sure!
So right now we have a problem:
@SirPython those in incoming are sent from client to server, those in outgoing are sent from server to client, and those in both are sent in both directions.
We don't want one jumble of HTML in a single file for the entire client.
23:52
Right
@SimonAndréForsberg That is all? Okay then. All the messages have been implemented
I'd recommending dealing with the message types as you need to though, @SirPython. Only implement the ones you need when you need them.
okay, good.
@Phrancis Right now, we have a login page.
When a user logs in, a message will be sent via websocket to the server.
Well, then what happens?
If the user switches to a different page, their connection is lost.
Right
How could we fix this?
23:54
Start with focusing on LoginMessage, WelcomeMessage, AvailableModsMessage, ServerQueryMessage, UserMessage, ChatMessage. Then you have all you need for a "lobby". Then move on to inviting players, and implementing a deck builder, and after that there's a bunch more as the actual game begins.
@SirPython jQuery? :)
2
A naive thought would be to embed the client in the login page. Probably not ideal. Other than that, I'm not sure what ways exist to go from there
@Phrancis What do you mean by "embed the client in the login page"? As in, combine the pages?
Or do some iframe magic?
Like I said, it is a naive idea, perhaps
But when connected, inject a canvas or whatever we end up using, hide the login, replace with a log out that brings you back to the first login... something like that
@SirPython how about hiding and showing elements?
If there's a better way, I'm definitely all ears :)
23:59
@Phrancis sounds good to me.
@SimonAndréForsberg That was my initial thought, but that would put everything in one HTML file...
yesterday, by Simon André Forsberg
@SirPython This is Code Review. We write good code, not ugly code. There should probably be more than one JS file at least. I guess you could dynamically load HTML with some JS magic as well, to allow HTML to be in separate files.

« first day (360 days earlier)      last day (3500 days later) »