Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Makkornall
    @makkornall_twitter
    I didn't error out, though I didn't run it long enough perhaps it would over time
    The graphics just don't display correctly
    Let me spin of a screencap
    codecraft_mac_1.png
    Clemens Winter
    @cswinter
    Well, that's no good
    Makkornall
    @makkornall_twitter
    codecraft_mac_2.png
    No, makes it hard to see what is happening which is half the fun
    Though my end goal would be to be able to get everyone's AI's and be able to then generate the Scala.js code so we could put this on a local server so the devs at the company could compete with their newest AI's.
    Clemens Winter
    @cswinter
    Well, I can't think of any obvious reason right now why this would happen. Bit difficult to solve since I don't have access to a Mac at the moment, but I'll try regardless. I might need you to run a new build at some point that has additional diagnostics built in.
    Makkornall
    @makkornall_twitter
    Sure I can do that
    I was also unable to find documentation on running the JS version locally. Is that newer and not documented yet?
    Clemens Winter
    @cswinter
    FYI, multiplayer doesn't require compilation to Scala.js, it works cross platform. Performance is terrible though (i.e. 10-20FPS on a LAN), I am working on that currently. Right now, the easiest way to compete against each other is probably to just share the Scala sources. Contributing AIs back to the main branch is also appreciated.
    Makkornall
    @makkornall_twitter
    Ah yes of course. But what I meant was since the Mac's aren't working I was going to put it on a local server inside the company so everyone could go to the local site and have a dropdown of everyone's AI's
    Then they could see how they compete against each other and make changes.
    Clemens Winter
    @cswinter
    The codecraftgame.org website is separate from the main CodeCraft library and has a bunch of stuff added on top (like the JS editor, AWS setup, storage, etc.), so there is no easy way to run it locally at the moment. The code sharing feature on website also only works for code developed in JS against the JS API. Making the feature work for code compiled using Scala.js might be a bit tricky. I think the best solution is to have everyone in your team use a shared git repository where they develop their AIs (once I've fixed the graphics issue, which should be possible).
    I got a few more questions about the graphics.
    Can you see any objects other than what you sent me the screenshots (homing missiles maybe?), and are there any glitches?
    Do you know what OpenGL versions your machines have?
    Does anything strange happen to the graphics when you change the zoom level?
    Clemens Winter
    @cswinter
    Actually, the program prints the OpenGL version and a bunch of other stuff to the console when you start it, would be great if you could copy all of that in here.
    Makkornall
    @makkornall_twitter
    They kind of pop in and out a bit. Once and awhile it almost looks like you can see the graphics that are expected.
    Zoom doesn't seem to have a large effect.
    CoreAnimation: warning, deleted thread with uncommitted CATransaction; set CA_DEBUG_TRANSACTIONS=1 in environment to log backtraces.
    Chosen GLCapabilities: GLCaps[rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms 16/0/0, dbl, mono , hw, GLProfile[GL2/GL2.hw], offscr[fbo]]
    INIT GL IS: jogamp.opengl.gl4.GL4bcImpl
    GL_VENDOR: Intel Inc.
    GL_RENDERER: Intel Iris Pro OpenGL Engine
    GL_VERSION: 2.1 INTEL-10.14.66
    Clemens Winter
    @cswinter
    I've released my first feeble attempt to fix the issue, let me know if it does anything. You will have to add a resolver for the sonatype snapshot repository to get the dependency:
    resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
    libraryDependencies += "org.codecraftgame" %% "codecraft" % "0.3.0.3-SNAPSHOT"
    Makkornall
    @makkornall_twitter
    ok I will do that now
    Makkornall
    @makkornall_twitter
    No noticeable change.
    Clemens Winter
    @cswinter
    Oh well, no quick fix then. I'll try a few more things tomorrow.
    Makkornall
    @makkornall_twitter
    Fair. Let me know if I can help.
    Clemens Winter
    @cswinter
    OK, I've released a new snapshot (version string is identical, you might have to append changing() to the dependency for sbt to redownload). There is some chance this will work already or print out some new info. If not, I'll need to get a bit more information (ideally a video of the graphics). Are there any patterns (or lack thereof) in terms of what objects are drawn on each frame? (E.g. some objects might always/never be visible, and there may be some kind ordering where some object is always visible when another one is visible.) When it does draw objects, are they rendered correctly or are they distorted in some way? I've also added two new methods to TheGameMaster, lowFPS() and forceGL2() which will start a game with specific graphics settings that could reveal something interesting.
    Makkornall
    @makkornall_twitter
    No change. I uploading a movie of the graphics in action. Perhaps that will help.
    uploaded*
    Clemens Winter
    @cswinter
    Hmm, thanks for the vid. One more thing you can try is to pass the -XstartOnFirstThread argument to the JVM.
    Makkornall
    @makkornall_twitter
    Same with the JVM argument
    Though I have seen this now:

    WARNING: Concurrent render calls!
    exiting...

    Exception: sbt.TrapExitSecurityException thrown from the UncaughtExceptionHandler in thread "AWT-EventQueue-0"

    Clemens Winter
    @cswinter
    Does the warning print only once at the beginning, or continuously? I'll to try to replicate the issue on a VM now so I can actually do some methodical debugging.
    Makkornall
    @makkornall_twitter
    Only once
    Clemens Winter
    @cswinter
    As a temporary workaround, I set up a template that shows how to compile using Scala.js and run CodeCraft in the browser: github.com/cswinter/codecraft-js-template
    I should be able to get my hands on a Mac in a few days, hopefully that will allow me to find a proper fix.
    Makkornall
    @makkornall_twitter
    Very cool, I will check that out today.
    Makkornall
    @makkornall_twitter
    Worked great.
    Clemens Winter
    @cswinter
    Glad to hear!
    Barry G Becker
    @barrybecker4
    The mothership keeps count of the number of harvesters with a numHarvesters integer property. In the harvester onDeath, I want to decrement that count. If I do Game.mothership.numHarvesters -= 1; it says numHarvesters is not defined. How do I access that numHarvesters property if not this way? Is there a better pattern for deprecating the count? Can I use chrome developer tools to debug? I cannot seem to find the source in developer tools.
    Clemens Winter
    @cswinter
    @barrybecker4 Hmm not quite sure what's going on there, that sounds like it should work. The JavaScript version is honestly kind of wonky. It would have been nice to emulate something like screeps.com which has a much nicer setup, but I never got around to it. I don't think there's actually a good way to debug in JavaScript right now, basically the code is from the editor is evaled to create raw JavaScript functions which are then called by the game so the browser doesn't have a good way to access the source :/ You should still be able to run code from the Chrome console to test things out.
    Mitchell Skaggs
    @magneticflux-
    Is the Watch -> Replays page supposed to be blank? I just found CodeCraft and am having a great time experimenting, but I wanted to watch some replays of interesting games.
    Clemens Winter
    @cswinter
    @magneticflux- Glad to hear you're enjoying CodeCraft! It seems like replay submission is currently broken, I'll take a closer look on the weekend. You might want to check out http://codecraftgame.org/demo which allows you to set up and watch games with different AIs and maps.
    Mitchell Skaggs
    @magneticflux-
    Okay, thanks for the quick reply! I'm having the most success playing against the singleplayer AI or against myself (written in Scala), but I can also connect two multiplayer clients through the public matchmaking system. Unfortunately, there doesn't seem to be anyone to play against. I'll try to get some friends interested to liven up the scene a little bit! Additionally, this seems similar to the game Screeps, but I like the self-hosted nature of CodeCraft rather than having to pay a subscription to Screeps.
    Mitchell Skaggs
    @magneticflux-
    @cswinter Should the @volatile var rendering = true property of RenderFrame.scala (line 34) be initialized to true? It appear that that causes the "WARNING: Concurrent render calls!" to be printed at least once every time the client starts up.
    Clemens Winter
    @cswinter
    Yeah I'm not sure there have ever been any multiplayer games run that weren't tests I ran, so getting some people together is probably your best shot. One thing I had been thinking about to overcome the critical mass problem was to keep your code running and queuing up for matches in the background but saving all the results and replays to watch afterwards. I won't be adding any new features to CodeCraft for now, but if you find anything that's actually broken feel free to create an issue or pull request on github and I'll look into fixing it.
    You're probably right on the rendering variable. I think it was just for debugging so shouldn't actually affect anything, but logspam is never good.