SoldjahBoy's Recent Forum Activity

  • I checked, I can't see any picture there, just the same question you posted here.

    Is it too hard to put the picture here?

    ~Sol

  • Okay, it sounds like possibly you need to have two cameras... one that follows the player when needed, and the second camera that strictly controls the screen panning.

    You can change which camera is being followed when the screen pan needs to come into action.

    If you want to keep your screen relative position (so it doesn't 'jump' between the cameras) you would need to do a little math, offsetting the coordinates of the current position of the player camera vs the pan camera. You can track the position using instance variables, and do like; Follow object PanCamera.x-PlayerCamera.X (and same for Y).

    Something like that should give you the result you're looking for, I think.

    ~Sol

  • Are all of your "screens" the same size between the camera pan transition? Are all of these "screens" contained on a single giant layout or are you using different layouts? Are you panning the camera to a new location in said layout, or are you moving the "level" around the viewport to give the feeling of scrolling through a giant level?

    I guess knowing a little more about how your game is set up would be beneficial to making a proper suggestion.

    Without knowing any of those things though, perhaps having a "state machine" set up for the player positioning - so you have for example;

    --------------------

    GlobalVariable.PlayerPosition = X (can be X or Y depending on your desired screen exit point)

    ScreenState=1

    (if)ScreenState=1

    (and)PlayerPosition=(desiredvalue)

    --- Scroll camera to X,Y

    --- Set ScreenState to 2

    (if)ScreenState=2

    (and)PlayerPosition=(desiredvalue)

    --- Scroll camera to X,Y

    --- Set ScreenState to 3

    So for each of your screens, you're creating a custom "trigger" point that will cause the camera to shift X,Y coordinates to display your next area. Using this method you wouldn't be restricted to a set size for each "screen" - but you may be restricted to having one exit point only (or you could add a second variable to any specific screen state to compare X and Y, not just one or the other).

    As far as the scrolling thing goes, you can move the camera with lerp(camera.x,desired.x,1-0.2^dt) (and same for Y) for a smooth but fairly speedy transition. Rather than attaching the camera to the player itself - you would be setting this to hard coordinates on your map.

    Hope this helps

    ~Sol

  • We probably need more information about how you expect your selection screen to work...

    Have you got an example image you can post with a description about how it should work?

    Most likely what you will need is simply a global variable that you can change based on the button clicks - the variable value can then be used to display the character you want to use - but without knowing more, that's about all I got.

    ~Sol

  • No problem mate!

    I'm REALLY bad at trying to do stuff the "proper" and "mathmetically genius" way - but I can redneck engineer almost anything to work

    Hit me up if you get stuck with anything else like this

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Keep in mind you would need to (probably) use a sprite font, and not just a normal text object... I guess anything is hackable if someone wants to try hard enough, but I suspect the sprite font object would be more difficult to modify if someone tried to pick through the compiled javascript.

    ~Sol

  • I don't think there's any way to fully protect assets in the game... but you could easily watermark your games with embedded identifiers - like using a sprite font to say "game made by XYZ", then use the same sprite font to display text in the rest of your game (so if someone were to edit it, it won't make any sense when used elsewhere).

    I know there are hashing algorithms available too, but that's mainly to protect data tables and save-games. I'm not certain anything exists to protect image sheets (since C2 creates sheets from all sprite artwork on export).

    ~Sol

  • You could "cheat" and simply make your projectile do the work for you...

    1. Bullet hits enemy/player

    --- set bullet invisible

    --- set instance variable HasHit to "true"

    2. Bullet variable "HasHit" is true AND is not overlapping enemy/player

    --- create blood splatter (at angle of bullet)

    --- destroy bullet

    So basically the bullet doesn't destroy itself until it's gone in AND out again from an enemy, creating a blood splatter on entry AND exit if you want.

    I'm sure there's some genius mathematical solution to this - but I'm a creative thinker not a mathematician - so that's probably how I'd do it. The bullet is already travelling at a given angle and velocity, so why not use that data and positioning? Faster bullets could create bigger splatters, or whatever... there's a load of ways to use existing data as random variables

    ~Sol

  • I don't think I understand exactly what you're trying to do then...

    If you want to spawn a bullet, or anything else, you can use system expression "create object" or sprite action "spawn another object".

    I'm not sure if your problem is creating the object, or something to do with your variables?

    ~Sol

  • How are you distributing a HTML5 game?

    Most HTML5 games are uploaded to a web server - so nothing can be modified by anyone unless they have direct access to your hosting (or they hack into it).

    I'm not sure I fully understand what you're asking :/

    ~Sol

  • Have you tried the BEGINNERS TUTORIAL yet?

    Most of the questions you have asked so far are answered in this tutorial.

    ~Sol

  • You could also use a single variable, 1=blue 2=purple 3=red - or set it as a string variable and have actually written "blue" or "purple" or "red".

    I have a similar setup with my character blueprint for my project, where the character is made up of about 50 parts and each part can be changed to look differently based on a string variable, for example "Male" or "Female" will change the appearance of parts to be male or female. This can easily be extended to make clothing options, hair styles, or in your case - eye colour.

    ~Sol

SoldjahBoy's avatar

SoldjahBoy

Member since 2 Apr, 2008

Twitter
SoldjahBoy has 3 followers

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies