Phobos002's Recent Forum Activity

  • I tried it in both r173 and r175 and it appears to work similarly in both cases. Looks like it traces the line through two blocks? Can you explain in more detail exactly what the difference you are seeing is? Also it is difficult to debug a project with 46 events - can you reduce this to a minimal repro that shows the fewest events possible that still demonstrate the change in behavior? Or can you describe which particular event or part of the events are working differently?

    I'll try my best to reduce it some more. I was initially worried about breaking it when moving stuff around and deleting objects, so I'll simplify it and re-upload the new capx file.

    I also seemed to have had a stroke and didn't explain what I was trying to achieve with this system, so I'll do that now: Better Instant Bullets/Rays

    I saw the 'Instant Laser' example (Small object stepping forward a few pixels, checking for collision, and stepping again if it didn't hit anything) and tried to apply it to other uses, such as instant bullets and checking if a player can activate a switch or open a door. I wasn't satisfied with the performance and inaccuracy this method used, so I took a look at other games to see how they handle it, specifically the Doom games. (Been playing it since I was very young! ) Using some debugging tools in Doom64Ex, I noticed that bullets and 'uses' were calculated with a line intersecting with objects. After some thinking, I came up with this algorithm.

    I'm probably going to make a tutorial about it at some point, and explain how instant bullets can play a huge part in player feedback, but I updated to the new beta release and was horrified when it suddenly stopped working correctly. It may have been something on my end, but I kept reverting back to 173 and seeing it work like a charm. It's a tad confusing...

    ...Uh...But yeah, story aside, I'll try to narrow the whole thing down some more, and maybe leave comments so there's a better idea what's going on. Cheers Ashley!

  • R0J0hound

    Hey Rojo,

    Is there a way to fill the canvas by editing the rgb values using a global variable?

    Let's say I have the global variables

    red = 100;

    blue = 20;

    green = 40;

    And I used the expression "fill canvas with color rgb(red,blue,green)". The canvas then fills itself based on the values in the global variables.

    The problem with the the "fill canvas" expression is that it only accepts strings, is there a way to have it so that it accepts a global variable as a parameter?

    You can turn the expression into a string by putting it in a str() function. So 'str(rgb(red,green,blue))', unless I'm missing something

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I forgot to mention that I did not touch the events between different versions. This is purely caused from me going from 173 to 174 or 175.

  • Problem Description

    This hitscan system breaks when using R174 or higher, but works perfectly on R173. No idea what the real cause is, but it might be the collision detection.

    Description of Capx

    Contains simple top-down scene with player, enemies with no AI, and some walls.

    Hitscan algorithm:

    1. Draw a line

    2. Check if any objects are overlapping the line. If true, record the object type, the distance from the object and the origin of the line, and the objects UID.

    a. If it's overlapping a wall, break the wall down into a vector for each side, then find out where on that vector does the line cross. (Line intersection algorithm not by me.)

    b. If overlapping an enemy, stop.

    3. Once all objects are recorded, sort the array on the X axis (This is why 'distance' is on top of the array)

    4. For each element on X axis, do stuff based on what object was hit.

    5. Clean everything up

    Steps to Reproduce Bug

    • Install 174+
    • Run and notice the wacky detection for the lines
    • Install 173
    • Run and notice it works perfectly

    Observed Result

    The line ends at weird positions and outright ignores some walls, especially at strange angles.

    Expected Result

    Line stops at a wall based on the lowest distance

    Affected Browsers

    • Chrome: YES
    • FireFox: YES
    • Internet Explorer: ???

    Operating System and Service Pack

    Windows 7 64-bit Service Pack 2

    Construct 2 Version ID

    Construct 2 R173-R175

  • http://phobos001.itch.io/rfe

    <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • This looks very useful, but after reading it, I realized that this is for web-based apps. I feel embarrassed about not mentioning this to start with, but I'm distributing the game via Node-Webkit.

    Is it still possible to use this functionality when native, or no? I noticed there is no trace of an offline.appcache file, so I'm assuming no. Either way, I appreciate the help and I'm really enjoying Construct 2. :)

  • Interesting. I'll mess around with base64 encoding/decoding and see if it does anything different. I think the Extra Expressions plugin has this built-in, which is nice. :)

    Thank you again!

  • Hello again! I have attempted to create an auto-updater for my game 'ROCKETS <img src="smileys/smiley35.gif" border="0"> EVERYWHERE', and so far everything is responding correctly, until I finish downloading a file (like a .zip or a .png) and it's corrupt; full of unrecognizable characters.

    Based on minimal research, it turns out that javascript variables store info as ASCII and it can't recognize most binary characters used.

    Is there a way to get AJAX to download as Binary and not ASCII or Unicode? If not, is there a way around this problem?

  • Hello again! I created a simple ray system in Construct 2, but the problem is that, even at short ranges (2048 pixels), it uses a good 16%-ish of my CPU. I know this value is approximate, but I still feel a bit 'ehhhhh' about the whole thing. Is there anyway I can improve the performance at all, or am I forever doomed?

    CapX File (Includes a bunch of other stuff like a console etc): dl.dropboxusercontent.com/u/21499454/support/hitscans.capx

  • I just recently got my game, 'ROCKETS F***ING EVERYWHERE' (Ceonsored only for the forums auto-censor), on steam greenlight. It's exciting! All support is appreciated ^^

    steamcommunity.com/sharedfiles/filedetails

  • A bit late to change the name, don't ya think? Also, why would I want to relate my game to a meme? It seems kinda silly, sillier then the name.

    I shoved the link through bit.ly, so it should work now. Hopefully it does, anyways xD

  • You posted the wrong link to the itch.io ! Looks really good from the video though!

    Aw crap, the 'No Follow' thing is in effect and I can't have hyperlinks. Try this instead: http://bit.ly/1i8Nnx8

Phobos002's avatar

Phobos002

Member since 7 Jun, 2010

None one is following Phobos002 yet!

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies