-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please give some information on your develpment process #328
Comments
You're right about this. It's not a solution, but here are a few of my notes to get you started. @mtgred can probably throw some more details notes here, as I still feel rather unsure with my development process.
|
Thanks. I also ask because I have only limited experience with clojure. I wrote a markdown parser some years ago (using Netbeans), but development was easy since I wrote unit tests and did the development mostly in the REPL. Now I just set breakpoints and use the Evaluate Expression feature of Cursive, but it's a bit cumbersome. When you're a VS user, you're totally spoilet; like attach to running processes, break on execptions, change code while running, debug backward etc. Don't know if such features exists in Intellij/Cursive. I also startet to code a Netrunner implementation in C# some time ago, but didn't work on it lately. |
|
OK, I wish I'd asked this when I got started. Launching the server in REPL is amazing. 👍 |
Awesome! Thank you! 👍 Maybe consider creating a wiki page, as this are really helpful tips and should not be getting burried here. |
Excellent information that will help me a ton. I got IntelliJ and Cursive installed on my MacBook Air last night, so hopefully in the coming days I can play around with this and get the hang of it. I installed Emacs too but for some reason got stuck trying to install the cider package. |
I took the liberty to create a WikiPage myself. I will try to populate it with the data in this issue. |
OK, last night I got as far as opening my netrunner/ directory in IntelliJ and actually getting the REPL running after a couple attempts. At first the middle option "Run nREPL with Leiningen" was greyed out and I couldn't choose it--the missing piece was the need to right-click I still need to configure Apache so that my netrunner/ directory is visible when hitting localhost in my browser...I think that should be pretty straightforward with some Googling. After that, if I'm reading between the lines correctly, I can just make edits directly to |
I was able to run the Server in a REPL, but reloadi g files didnt work. Well, I could reload them but it wasnt reflected in the game (e.g. I changed Sure Gamble to give 100c, but that didnt work until restarting the Server) Maybe I'm missing something? @JoelCFC25 why do you need to run Apache? |
Don't I? I assumed I would need a web server running in order to hit the game server with my browser to fire up games and test card implementations. It's very possible that I'm misunderstanding something about what the REPL can do--I'm very inexperienced in this arena. If I try implementing a card or changing an existing one, how do I then test it? |
You have to start the game server, then start the Node server with coffee server.coffee. It will open a port in your machine which you then can connect to (See its console output to see which port it opened) |
OK, thanks. That was the part I had missed. I got things going briefly before I had to stop and get some sleep last night, but I did actually make some code changes and saw them represented in test games, so that's major progress.
I had (wrongly?) used the |
|
@mtgred Any idea why it does not seem to work inside Intellij? I can reload the files in the REPL, and I see my changes, but they are not reflected in the game :-( Maybe I'm doing something wrong? @JoelCFC25 Did you have any luck with reloading files/functions inside the REPL? |
Let's take a simple example:
For installed cards you have to drag them back to hand and install them again to see the change. |
Does not work for me. I tried running the REPL from the command line ( I changed Hedge Fund:
reloaded the file
So the file was reloaded, but when I play Hedge Fund in the game, it will still only give 9 credits, not 99. Anyone any idea how to troubleshoot this issue? |
I reload with |
I did
now reloading works for me with
Thanks! |
Hi all! I'm just starting with this project, but I do have some experience with Clojure. I think I can clarify a few things in this discussion:
|
Thanks for the clarifications! Very happy to see more people becoming interested in contributing :). |
I could need some help on client side development. I never touched clojurescript/react/sablono etc before so bear with me if I'm missing something obvious. I changed Now, I wanted to add an event handler to one of the
to enable the But that does not work. What am I missing? Also, I don't know why the second span element (the element where I try to attach the event handler) is so big and the other two span elements are sized right. Would be awesome if any of you web gurus could help me out on this :-) |
Nothing jumps at me based on your description. Could you fork this project and push your current code there? Maybe playing with your complete code will help us figure out what's wrong. |
You can find my branch here: https://github.com/DominicKexel/netrunner/tree/cards. Look at gameboard.cljs. If you also have some debugging tipps that are better than |
As far as I can see, the Change the
|
Hey @gaverhae thanks for your input! The The fact that the size of the span is wrong seem to be just a display issue with chrome's developer tools. When I add a class to the spans, the size is shown correctly. Hovering the mouse over a card name in the log window now previous the card correctly. I will polish it a bit and then create a pull request. |
BTW, figwheel is awesome. |
I'm having a few issues with attempting to help with this; 1: I'm not sure what URL to use for testing locally. |
|
Ok, now I'm getting this error when trying to run from IntelliJ:
|
Do you have any local changes? |
I don't have any local changes.
|
So it seems like a problem just with IntelliJ. You don't really need it, except for the debugger and maybe code navigation (but the source code is not large in size). |
I'm still not able to get anything useful from running it from the command line like that though, as the page remains effectively blank (no menu buttons in top left etc, just like if you were to run the coffee script on it's own, (I presume this means that the main core of the server isn't running)) |
Do you have MongoDB running? Does the Webserver ( |
MongoDB is running (and shows connections being opened when starting the webserver and opening the page in browser (only once though))
and does not affect the page in any noticable way. |
@Quarg - that's right. Once you start a game then the server will receive connections and start doing stuff. You won't see any output, however, as by default there isn't any debug prints happening. You'll have to start adding your own if there are areas of the code you're interested in. You can also type stuff in the REPL to inspect values. I'd start with @game-states, which returns you a map of gameid -> game state. Then you can do something like @(get @game-states 2) to get the map of a specific game id (in this case 2). |
@justinliew Ok, so using |
The first thing I like to do when in a repl is start my game then execute |
I'm closing this since we have good information on the wiki now for those who want to try and get up and running. |
Hi there, i'm trying to set up my machine for development, but Besides this i think i have all dependencies properly installed EDIT: |
It seems you have problems building the native (non-javascript) modules. First of all, delete the node_modules folder. You're on Windows, so make sure you have Visual Studio with the C++ compiler installed. You have to pass the version of Visual Studio to npm, look at the wiki on how to do this. |
While not an issue with the game, it would be cool to have some insight on how you actually develop the game, like
etc.
Also, some docstrings in the source would also help.
This would make it easier for people who want to join development of this game.
Maybe create a wiki page or something like that, where other people could also share their experience (I could write an essay of the PITA it was to get this game running on windows 8 with VS2013).
The text was updated successfully, but these errors were encountered: