1. Post #521
    faster than stupid, but still slower than everybody else

    June 2010
    3,138 Posts
    I've made a little asteroid-dodging game for practice using Javascript and HTML5.

    niallslater.com/games/index.html

    It works totally fine when I run it locally, but none of the images render when I run it on the site. Any ideas? Code below.

    Edit:

    Doy, apparently image references in JS (var img = 'images/image.png') are case-sensitive online but not when you run it locally. I had 'images' when the folder name was 'Images'.
    Cool!! That game is actually pretty fun
    Reply With Quote Edit / Delete Reply Mac Chrome United States Show Events Friendly Friendly x 1 (list)

  2. Post #522
    Gold Member
    Karmah's Avatar
    December 2007
    6,731 Posts
    I've made a little asteroid-dodging game for practice using Javascript and HTML5.

    niallslater.com/games/index.html

    It works totally fine when I run it locally, but none of the images render when I run it on the site. Any ideas? Code below.

    Edit:

    Doy, apparently image references in JS (var img = 'images/image.png') are case-sensitive online but not when you run it locally. I had 'images' when the folder name was 'Images'.
    That was pretty fun. I can't rescue more than 9 bois because I'm bad at these games
    Reply With Quote Edit / Delete Reply Windows 10 Chrome Canada Show Events Friendly Friendly x 1 (list)

  3. Post #523

    September 2012
    66 Posts
    can you shoot anything tho? no button does shoot for me
    Reply With Quote Edit / Delete Reply Windows 7 Firefox Germany Show Events Disagree Disagree x 1 (list)

  4. Post #524
    Nigey Nige's Avatar
    June 2010
    1,566 Posts
    can you shoot anything tho? no button does shoot for me
    No shoots, only rescues. games for good boys 2k17
    Reply With Quote Edit / Delete Reply Windows 10 Chrome United Kingdom Show Events Funny Funny x 1 (list)

  5. Post #525
    Gold Member
    paindoc's Avatar
    March 2009
    9,113 Posts
    So, I need to figure out some way to pull data about solar system bodies (primarily planets, moons, large asteroids, comets, etc) into my simulation at work. This is mostly about finding an initial position at a time T, and probably keeping a number of data entries over a time period ot use for "calibrating" these larger objects back onto proper courses as needed

    Essentially, a user will input a date range they want to simulate over - I'll then need to get epherimedes (trajectories and change) for all of these things for that range. This is easily done by hand using NASA's HORIZONs system, since you can enter a date range, timestep amount, and request data in various formats. I can calculate this data, to a reasonable degree of precision, but this is for a software that will be used to prove the feasibility of spacecraft missions and trajectories so error should optimally be measured in tens of meters at most (which I can get through external sources)

    Its all done through telnet though, so I dunno how to hook into that: doing it through C++ would be nice, but if Python has easy ways of doing this I can always just have my C++ code execute a python script that eventually outputs the data I need to a file.

    tldr because im rambling while trying to figure this out: what's the best way to interact with telnet, find a library for C++ w/ the rest of the application code, or find a library for python and work with that?

    Edited:

    ive honestly never done any networking related stuff so this really has my stymied as i try to figure what do

  6. Post #526
    Gold Member
    Tamschi's Avatar
    December 2009
    8,464 Posts
    It really doesn't help that RFC 854 (TELNET PROTOCOL SPECIFICATION) seems to be one of the more obtuse ones, but the protocol is likely fairly simple.

    I'd be very surprised if there wasn't a good C(++) library for this that you can use instead of implementing the protocol directly, though.
    Reply With Quote Edit / Delete Reply Windows 10 Firefox Germany Show Events Agree Agree x 1 (list)

  7. Post #527

    September 2017
    20 Posts
    Hello, I am making a pyro flare gun for tf2 and it has a little screen on it. My partner's idea it to make it so that when there is a shell loaded in the gun, the screen will display "loaded", and when the shell is fired, the screen will display "empty". I tried looking at the .vmt files for the rescue ranger since its the closest i can think of getting it, but the person who made it has a separate .vmt file for the screen itself, which confuses me even more.

    I also tried finding the value for when a shell is loaded in the pyro's flare gun, and just equate that value so that it switches to the next frame once the shell is fired, but I can't quite tell what the value is and how to make that work.

    Any help is greatly appreciated! The screen in context can be seen below. Right now it is empty because I didn't really bother with it until now.

    Reply With Quote Edit / Delete Reply Windows 8.1 Chrome Canada Show Events Disagree Disagree x 2Funny Funny x 1Dumb Dumb x 1 (list)

  8. Post #528
    DarkCarnage's Avatar
    May 2009
    232 Posts
    Hello, I am making a pyro flare gun for tf2 and it has a little screen on it...
    This thread is for programming, in the programming subforum, not modeling/texturing for TF2.

    Please post questions like this in the modeling subforum.
    Reply With Quote Edit / Delete Reply Windows 10 Chrome United States Show Events Agree Agree x 1 (list)

  9. Post #529

    September 2017
    20 Posts
    This thread is for programming, in the programming subforum, not modeling/texturing for TF2.

    Please post questions like this in the modeling subforum.
    Actually I'm asking specifically about the code in the vmt, so I think this is the appropriate place to ask since it does involve programming more than modelling
    Reply With Quote Edit / Delete Reply Android Chrome Canada Show Events Disagree Disagree x 3 (list)

  10. Post #530
    Gold Member
    Karmah's Avatar
    December 2007
    6,731 Posts
    Actually I'm asking specifically about the code in the vmt, so I think this is the appropriate place to ask since it does involve programming more than modelling
    You're overgeneralizing your problem. Your problem is specific to valve's modeling and texturing formats, and there is already a subforum here specifically for it.
    Further you already posted a thread there before even posting in here.