R0J0hound's Recent Forum Activity

  • Hey that’s a pretty cool result you got. I’m glad it was usable enough to allow changes. Utilizing the fact mesh points can’t go negative was clever.

    Anyways, I agree the math is hard to read in parts, especially when I used arrays. I’m always trying to find ways to make the math look cleaner if possible.

    That deforming idea sounds like a doable thing. I probably just need the raycast to also return the triangle index.

    Cheers

  • You’re welcome. In it I opted to duplicate the vertices when making the triangle list. If you just stored the indices you would have less points to transform. Also you can make the obj loader support quads too, which would be more efficient with distort meshes, but I opted to just use triangles because I needed that for the raycasting. And actually it should be possible to use less distorted to display a mesh if the mesh is made of triangle strips, but that would take more effort to design.

    -cheers

  • Here is a test of a way to do precise 3d raycasting against a triangle mesh.

    Construct doesn't provide a way to access the mesh of 3d objects, so this instead loads the triangles from an obj file into an array, and then uses mesh distort to display it.

    dropbox.com/s/uy6yfhpag7d1t2p/obj_loader_and_raycast.c3p

    Anyways, I'm pretty much at a stopping point with this. Developed further I can think of some uses, but performance isn't great with events, and currently I'd need to make the game work with the remaining 8 events.

  • Hello,

    Looking at the events that monsterSpeed variable is used four places.

    1. Where the variable is made as a global variable.

    2. Where it’s increased every time an enemy is killed.

    3. Under the every 3 seconds, it’s used to set the speed of newly created enemy.

    4. And when you hit space to reset the game. It’s set back to an initial small value. Most things get reset automatically when restarting or changing layouts, but when something is global it doesn’t reset automatically. This is useful for keeping scores between layouts or stuff like that. So anyways, in this case they wanted to reset it and not keep its value so it was done manually.

    I agree with you about the comment. It’s increasing the speed of the new enemies, not the rate they spawn.

    There seems to be lots of YouTube channels with video tutorials that may be useful to you. Especially if they explain what they are trying to do and explain each part.

    Anyways, here are my thoughts on how I’d come up with some of the enemy events.

    So first we have some enemies. We want them to move forward so we give them the bullet behavior and see them happily trudging forward.

    If it’s too fast or slow we adjust the speed in the layout editor.

    Ok cool. But these enemies seem pretty dumb. The player can avoid them easily. How about we have them chase the player? One way to do that is to change their angle to face the player.

    Every tick:

    — enemy: set angle towards (player.x, player.y)

    We test that and the enemies turn instantly to the player and pile up on him. The player can only get away if they are faster.

    So what if we made the the turning more gradual? Like maybe turn 1degree per frame toward the player? That would look like:

    Every tick

    — enemy: rotate 1 degree towards (player.x, player.y)

    The result is kind of nice now. Even is the enemies are a bit faster than the player you can out turn them. It gives the enemies a lumbering zombie like quality.

    However all the enemies seem to know where the player is at all times. What if their senses were more realistic. Like they could only detect the player if they were close enough.

    So how would we do that? There isn’t a compare distance condition. But we could use the compare values condition with an expression. There’s an expression called “distance” that will give you the distance between two points. So how close should the enemy and player be between each other for the enemy to year. Let’s say 200 or less so every position in a 200 pixel radius circle

    So we can change our event to

    Every tick

    Compare two values distance(player.x,player.y,enemy.x,enemy.y<200

    — enemy: rotate 1 degree toward (player.x, player.y)

    You can actually remove the every tick condition, since events are run every tick already.

    So anyways we test this and something seems amiss. It will work perfectly with a single enemy but with multiple it will seem to work with only the first enemy and not the rest. The reason has to do with picking. The system compare condition does no picking. It just uses the position of the first enemy instance in that distance calculation.

    Anyways we need to find the distance between each enemy and the player. One solution is use for each enemy to do that. What for each does is look at each instance one at a time.

    So the result is:

    For each enemy

    Compare two values distance(player.x,player.y,enemy.x,enemy.y<200

    — enemy: rotate 1 degree toward (player.x, player.y)

    Which works how we want it.

    Alternatively we could use a different condition like pick by comparison. It only will pick the enemies inside that radius. It will work the same for our purposes.

    System: Pick enemy by comparison: distance(player.x,player.y,enemy.x,enemy.y<200

    — enemy: rotate 1 degree toward (player.x, player.y)

    Anyways, hope some of that helps. I don’t have time to screenshot events so hopefully that text makes sense. I don’t usually write things so detailed but that is my thought process when I make events. The difference is over time you find more features you can utilize.

    -cheers

  • Probably just a typo or a misunderstanding when the behavior was made. Physics uses box2d, so looking at its manual it says damping can be any value from 0 to infinity.

    calhoun137.github.io/box2dgame/manual.pdf

  • I was going to google for some game names, as I know of some, but, eh. Reaching out to those companies can answer most of your questions about price, games they’ve ported, and if they can work with you.

    Most, if not all, that have replied so far in this topic haven’t actually used their porting services I’d guess? I really have no idea.

    Anyways, I have no skin in the game either way. I’m going to stop replying here.

    -cheers

  • I think there are two entities that have the ability to port capx to other platforms. But both require the source capx to do so as far as I know.

    Anyways I probably did you a disservice to say it could be possible to port an already exported game. If any new porting company emerges they too will require the games source to do it. Why? Because it’s much much harder to port games already exported to the point of not being worthwhile to attempt.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Nice. Glad it was useful and you were able to make tweaks to the logic and add stuff.

    -cheers

  • With enough money and time, anything is possible. There are limited entities with the ability and expertise to port capx and c3p files to other platforms. I suspect it wouldn’t be worth their while to take the extra effort to port over an already exported game. But hey, you could ask them. It may cost a lot more though.

    Old console games are made portable by emulators of those consoles.

    For construct games a web browser can be considered basically equivalent to an emulator. However performance, having a feature complete browser available, and even rules on certain platforms make that not feasible. Not to mention a lot of other complexity involved I’m not thinking of.

    I should also say that an emulator for a console is way less complex to make than a browser.

    Anyways, I shouldn’t be the one to ask. Contact the emails of those publishers and ask. They actually are the ones doing it so they know way better than me.

    There’s probably a reason there’s not many porting services or super simple alternate ways to port. It’s probably pretty complex to do.

    Having reservations about sharing the capx is fine. If they can’t help you otherwise is fine too. But never hurts to ask if they can work with you with your request.

    Worst case you just stick to the platforms already available.

  • I mean the porting services like that need the capx so they can tweak things to make it work on the given platform. Or maybe the conversion is automated? I seem to recall from what I’ve read is it’s mostly automated but they do some things manually to make it work better on a given port.

    You can set the terms and say you won’t give them the capx but only an already done export for them to use to make the port. If they agree they’ll probably quote you higher I’d imagine.

    I mean with my limited understanding of how the porting works they already have a lot to do to go from a capx. To go from an export would require them to mostly go from scratch or at least mostly reverse engineer a capx out of the export first.

  • Hi,

    Yes can do that and swap the meshes used on the fly no problem. I imagine it would work well for stop motion.

  • I mean you can do it like this. Get the array of instances and loop over them.

    var list = runtime.objects.position.getAllInstances();
    var count=0;
    for(var i=0; i<list.length; i++)
     If(list[i].instVars.pizza =="pepperoni")
     count++;

    Any particular reason you’re using JavaScript? It’s much simpler with events.

    Global number count=0
    
    Position: pizza=“pepperoni”
    — set count to position.pickedCount