Lost my Keys's Forum Posts

  • In my request thread for a specific shader (if you can write .fx shaders please take a look, lol ). Another user suggested meshes, I'd heard about them but hadn't actually used them or seen any documentation on them. Even found a tool hidden away that lets you edit them, which I didn't know existed.

    Now while there's no way to create them automatically that's within my knowledge, thus rendering them impractical for my needs *cries*. I did realize something...

    ..It seems the majority of people wanting 3D in construct are ones wanting those 3D looking backgrounds for the bullet hell shoot-em-ups. Well how come your not using these meshes? They would work perfectly for those kinds of backgrounds required in those kinds of games. And by creating the artwork to be used on them in a pre-stretched way, you'd easily avoid distorted textures. The vertexes move X and Y and there's an impression of moving in the Z axis, so there would be nothing stopping you from making damn near anything in "3D" with them, and having your backgrounds look as 3D as you want them.

    So yeah, I just wondered what I'm missing, cause they do seem perfect for that particular task, and anything more complex than those, could be pre-rendered and nobody is going to tell the difference really.

    So yeah, made this thread cause maybe with getting a discussion going about it, we can learn more about them, they look very useful and I'm certainly curious why they've not been embraced by those wanting 3D added to construct.

    Oh yeah and anyone who can write shaders, request thread n all that *smiles sweetly*

  • You have to create the heightmap via some means anyway, so you could just write a simple construct app for yourself that makes meshes based on heightmaps and then saves them so that they can be loaded at runtime.

    Ok scratch everything I had just written in this reply and had to delete after finding a mesh editor in the tools directory. Ok so meshes basically do (I think) what I'm looking for. Only loading a mesh in makes no difference to the sprite, so any changes made in the mesh editor are ignored. Unless you have to then edit each and every column and row in a sprite by hand.. ouch, considering the number of colums and rows that would be required per sprite.

    Yeah, a shader will just be so much easier and more logical, even if the final effect wont be as pronounced as it would by using meshes, I'm afraid they're not an option until there's some documentation about them and a way to do hundreds of sprites automatically using height maps.

    Thanks though, I'm sure I'll find a use for meshes with something else, they do look useful, just impractical by the looks of it for this kind of thing.

  • You know that my usage of bullet behavior is for the grapple thingy shooting from my character, right? ^^ The grapple actions will be done seperately, done mostly from a personal .cap someone posted a year ago. I'll just be copying that. Think Samus's Grapple Beam from Super Metroid.

    Yep I knew that. I've never played Metroid Prime before (was a computer dude not a console dude), so went to have a look on youtube, saw a few examples of that particular grapple.

    I'd totally make it physics now, lol. Could do something like switch all the movement controls off once the grapple has caught something and just use physics and various forces to control swinging about and so on. The beam could I would think be easily made to hinge together too. Or heck, I wonder if bones work with physics, Ashley did mention the possibility of ragdolls eventually, and it's the same principal.

    Yep, physics for the grapple would be awesome!

    For the actual firing "mechanism" you could do a search around the forum for a recent thread (from within the last three weeks I think), where someone posted an example of finding the closest solid object from a particular direction, which I would think could be used for the point of attaching your grapple (if within a certain distance) then you just follow that up with the actual animation of the grapple being fired and moving toward the target, attach the physics 'beam' and all that jazz, that would be what the player see's and bobs your grapple wielding uncle.

    Wait a minute.. was that you who posted that example I'm talking about? Cause it looks like something very useful for what you're doing.

  • AFAIK the right is 0 degrees, and the angle everything faces by default.

    Look at a sprite and you should see a small arm coming off the center of it, moving that will change the angle within the layout and should change the default angle for that particular sprite then.

    The bullet behavior I think is made to go in the direction the spawning object is facing. But I doubt it would be that difficult to make it choose a random direction either.

    Since this is the grapple, right? Are you sure using the bullet behavior is a good choice? While more in depth, you might find you get more control by setting up it's behavior through events alone, and just use the bullet behavior for bullet like objects. (I know, I know, depending on deployment, a grapple could be considered a projectile). But for your purposes maybe something else would work better.

    Personally I'm tempted to suggest using physics for it.

  • Couldn't you just create a mesh out of the heightmap and be done with it?

    Don't know how, and how complex would that be to do with a large number of very different looking images? Some could be walls, some bark on tree's, some rocks in the ground, some window frames, some weird looking plants. I couldn't find much info on mesh/distort but by the looks of it you have to plot out the intersecting points of a grid across an image, that would be nigh on impossible for something like this

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well if you use the dummy sprite, you could have it appear as something, maybe a puff of smoke or crackle of electricity etc. at the end where the grapple pops out. That way the sprite has more than one use to it.

    For cleanliness sake though, I'd probably go with the variable suggestion of Mipey's, unless using the sprite method offers something extra for what you have in mind.

  • Crazy thought:

    Would it be possible to make a fake edit box, which isn't actually an edit box. By that I mean have the real edit box but hidden somewhere, then once you give focus to the fake edit box, it's actually giving focus to the real and hidden edit box. Then have the fake one output whatever is written in the real edit box. That way the fake one would sit nicely under your custom cursor while the offending real one will be hidden and not getting in the way, but you'll still be basically using it, which if anything else in your game NEEDS the real thing available to work correctly, will continue to work correctly.

    There's probably a far easier way of solving it than that, but I haven't had my morning coffee yet

  • Example

    There you go, from what I can tell it does what you're wanting to do.

  • ...I... yeah... Get Text Width and Get Text Height are REAL things that you can get info for by double-clicking on a text object when you wanna do something like, say, change an object's width and height to match that. In the event editor, it appears as [object].TextWidth(Text) or [object].TextHeight(Text) and what I'm saying is that that doesn't work. It's recognizable by the editor, and even when you do the double-clicking thing and select the option "Get Text Width", that shows up even in the newer versions, but it doesn't work.

    I still have no idea what you're talking about the canvas object for... o_O

    The canvas object was used as an example only, of something that wasn't working but now is, and anything using parts of it, oh whats the point i'm just repeating myself, lol!

  • Have something spawn the object at the position you want, using the method you want, then destroy itself (use an invisible sprite somewhere), then if for example you want to be able to spawn another bullet once the first one is eventually destroyed, just have the invisible spawn sprite respawned on the bullets death. That should work?

  • Ok, unless it's PHP or mySQL related, I can't program worth shit. I've tried to learn how to create shaders, read tutorial after tutorial but it just ain't happening, they all seem to miss out the actual part where you want the shader to do something and instead focus on setting it up. Yeah no good.

    So I'm making this request for someone to write an .fx shader for construct, using the following guidelines and information. It does nothing that shouldn't already be possible within the program, and even uses some known limitations to its advantage.

    For someone experienced in writing .fx shaders, it should be childsplay. For someone like me, it's up there with reading C++ for dummies over the weekend and then writing an MMORPG from scratch - not gonna end well.

    Credit and stuff like that, you wrote it, you get all the credit. I've just made this request is all, and really want to see one done, as I do have a great need for it lol. So anyone who cares about getting credit where it's due, don't worry on that score. Sell it as your idea afterwards and make millions all to yourself, lol.

    Since a simplified version of this shader requires no depth, or 3D. I think it could work.

    What it does/should do

    Think of it (in this sense) as a self contained miniature parallax effect, because essentially that's what it is. But it must only work on the layer it's on, ignoring transparent area's of the layer (as is my understanding from what Ashley has said, a shader will not effect anything beyond their bounding box, which is perfect for this).

    You have your image, for example a brick wall. This is the colorful pretty image the player sees. Above that you have a bog standard height map, black is the lowest point, white is the highest point, again nothing spectacular or never done before in construct. Set that one up to always follow the position of the brick wall.

    The shader would then be applied to the height-map image, like with other available shaders. For it to work correctly, you would then have to tell it via an event, where the center point's X and Y is located in relation to the display window as well as the "imagined" depth of the height map.

    This is where the fun begins - as the sprite moves away from the center point, the shader uses the grayscale height-map to push, drag and pull on the pixels below it. Each shade of gray moving slightly slower than the value above it. With the white 255,255,255 pixels moving the fastest, while the black ones don't move at all. This then in turn causes some pixels to be squashed (vanish to the eye) while others are stretched. If used carefully, this gives the impression of thinking you can see more of one side than the other.

    Yeah, it's a down right dirty cheap trick, but it can work really well if it's not abused. Not only would you have your regular layers moving at different speeds with a nice parallax effect, but your chosen objects would also appear to have a kind of depth to them also.

    Event Options

    Besides the usual on/off options, the shader should have the following available:

    Center point X

    Center point Y

    These two options above tell the shader where the optimum point is for viewing the image with no distortion. Generally this would be the exact center of the display screen, but in many cases you might want it to follow the Y level of the player, or even control it by the mouse.

    Depth Z

    No, this isn't asking for depth in a 2D world. What this would do is basically tell the shader how fast to distort the white pixels in relation to the other shades of gray. A larger Depth Z would result in a faster distortion as the object moved away or toward the center point, while a lower depth would result in a more subtle distortion. Unfortunately I can't do the math for this bit, would be something like "move X pixels Y distance for every Z pixels away from the center point" ? I think, yeah something like that.

    Limitations

    The user would have to fine tune the shader to their game, as screen size and sprite size would have a big part to play in getting it right. What depth Z setting would work for one game, could look terrible for another. Remember, the pixels are just being stretched and shrunk, so eventually at a certain distance, the entire sprites texture will be stretched beyond recognition by the shader.. Obviously you want this to happen off screen, so the player can't see it.

    It wont make everything 3D, it's still a 2D trick and is only capable of creating a subtle effect which would be ruined by overdoing it (such as increasing the depth too high in the attempt to try make something look 3D). It'll break and result in badly stretched underlying sprite textures if the depth is too high. A rule of thumb would be the perceived distance between the pure black area's and the pure white area's should not be too great. Walls, deep surface textures etc. are fine, views from above a city with tall buildings are not.

    It could bugger up collision detection in some cases (unless using containers and another object as the collision box), and IMO should just be used on background tiles and sprites for best effect.

    It probably wont work on lower DirectX pixel shader versions. But as it's nothing more than a visual effect and not related to gameplay, I don't see that as a concern.

    Like with using normal maps or shaders in general, it does practically double everything it's being used for. Though because the effect doesn't have to be pixel perfect, you can get away with using height-maps that are half or three quarters smaller than your sprites texture and still get a good result.

    -

    I'll note that it is similar to the sprite's distort options, however I've had little luck in finding useful tips on using distort maps, especially for creating something like this, and a shader would just do it all much more easily, at least that is my understanding of distort maps.. unless someone wants to make a cap doing exactly what my request for a shader would do *hint hint* lol. Though bare in mind, this shader effect would be usable on many, many, many different sprites of different shapes and sizes and appearance. Could a distort map also be used in such a way too, without it taking forever to create. While distort maps have their uses, I think this would be something best left to the proposed shader effect.

  • I'm... not sure what the canvas object has to do with anything... o_O

    [quote:3mqe0tok]I noticed on the newest update, where it mentions part of the canvas being fixed, that anything using those parts of the object from before, need to be redone. Have you tried doing that in this case too?

    In other words, anyone who used the now fixed parts of the canvas object before, have to redo them, even though they're in the cap and setup correctly. Therefore it's possible the same applies to you and your text issue if you're just loading your old cap, running it and seeing it doesn't work. Remake them and then try, it might work just fine then.

  • dude. There is nothing to tell the player what to do or what can kill them.

    It is called Deceptive Forest, maybe that's where he got the title from?

  • I noticed on the newest update, where it mentions part of the canvas being fixed, that anything using those parts of the object from before, need to be redone. Have you tried doing that in this case too? Maybe the things you mention do work, but you just need to remake those parts (the same) first, then save, reload and see if they work for you then?

  • Or you could use erase to see what's really going on behind the Scirra forum!

    Download

    Or simulate using the forum while drunk

    Download