cheatcode's Forum Posts

  • 8 posts
  • Buckle up buttercup, this one is some real work.

    I have tried in previous projects to detect based on amplitude and frequency of audio, and found the audio object lacking in this ability.

    I will show you how to prerecord it with a string, using your own "beat studio environment":

    Step zero: Create a variable to track how many ticks since you've started your song.

    Step one : record your inputs to a variable, that is updating to an on-screen textbox. Do this in a way we can later separate the values based on the times.

    So if you hit x set textbox to textbox.text + "X," + timerSinceSongStarted.Value + ";"

    And if you hit Y set textbox to textbox.text + "Y," + timerSinceSongStarted.Value + ";"

    So now you've created a string that closely represents when you expect spawns versus the time the song has been running and it looks something like this:

    X,122;Y,125;X,134;Y,134;

    Step 2: Copy this string out of your textbox, back into a local variable and use a repeat tokencount(string,';') times and tokenat(string,loopindex,';') to access each value as time progresses with your song playing again, and make it show a sprite or something on each beat. Use this visual data, to manually modify the strings timer values, to calibrate the values to match the game better than your original reactions allowed when recording your inputs. Tweak a value here and there, when you notice one of your inputs doesn't match the song as well as you'd like. It will be helpful to add an on-screen viewer of the timers value, so you can track down inputs you want to change.

    So now we still have a string of "tokens" that closely represent when we expect spawns to hit, you will need one of these for each song.

    Step 3: In your game, you will want to load up a song string into an array, before its played. so you can access that array at x where x will be the songs timer.

    I wont post the exact way to load it into the array, but I will give you direction: Use array insert to add values to the array, make the position in the array match the timer we stored with the tokens. You can loop through your token string as we did before with repeat tokencount times to insert all the values.

    Then when a player is actually playing, continuously test the current song timer against the array, and spawn the correct object represented by the array value stored there.

    Understanding arrays is the backbone of large data manipulation and an important hurdle for most coders. It's just a spreadsheet of values accessed by position but understanding it truly is fundamental. Key'd arrays are easier to understand, but really, x,y,z are all you actually need.

  • Best for the rendering camera angle to be top-down.

  • This answer is gonna be a bad idea. It's how you do it in a 2d engine, but its a bad idea and you should just consider one of the countless 2d/3d engines out there for it. That being said, you can work around it and make this happen, and here is how:

    Take each 3d model, into a rendering program; I use Bryce cuz I'm old lol but there are countless options. Make an animation of the object rotating 360 degrees in one second, and set the frame rate to 360. Set the camera at the angle you want the camera to "feel" like its holding. Then render it to an AVI.

    Next use one of many avi converters (I use AVI2BMP) to convert the animation into its individual frames.

    Import the frames to your sprite, set the animation speed to 0, and create an event that sets the animation frame to floor(sprites angle).

    You'll need to do this for like... every single model, and need to keep the lighting orientation and camera orientation the same between every rendering, or things will "feel" off with the lighting.

    I hope this helps :-) Im clearing the unanswered topics until mine gets answered lol, I'm desperate.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • At whatever point you are assigning the player sprite to each player, you can also assign a player id to them.

    Then test that player id as one of the conditions for showing the hud sprite.

    If Player == 1, set hud animation to player1hud

    If Player == 2, set hud animation to player2hud

    Etc..

  • i hav gotten similar behavior when I didn't set an initial layout. Preview mode runs whatever layout u were in last, but when deployed it runs based on this setting.

  • You do not have permission to view this post

  • Thanks, great answer!

  • I am nearly finished with my simple little game, and I am running into a bug... How can I safely include my game here in a forum post, without having to worry someone will steal my work? Is there possibly some way to prevent this risk?

  • Same woe, different reason. Gimme a bit, I'm looking into it now.

  • 8 posts