R0J0hound's Forum Posts

  • 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
  • You need to ask those publishers that. It depends on how they do the export to platforms that construct doesn’t support.

    Most if not all of them convert the capx to the export format. It’s up to them if they are willing to take an already exported game and try to convert it.

  • It’s up to you. If I said yes or no is irrelevant.

  • You can extract information out of it with the binary object most likely but there seems to be a lot put in there.

    developer.valvesoftware.com/wiki/Source_BSP_File_Format

    The most useful part would be how the polygons are put in a binary space partition which would allow quickly getting a perfectly ordered list of polygons to draw while culling the ones behind the camera.

    Anyways, probably not super useful with construct’s 3D. Maybe as a separate plugin to draw the polygons with api calls. But its probably simpler to just convert the file to something there already is a loader for.

  • dropbox.com/s/fnmu2kkvzg6sr7i/hex_pathfind4.capx

    So turned out we could do it with less events. The pathfinder doesn't need us to temporarily mark tiles as walls at all.

    * Now the player and an enemy can occupy the same tile.

    * Once on the same tile you can attack or step off the tile.

    * enemies are done one at a time. If they can't possibly get to the player they just don't move.

    I will say it probably doesn't match what you had in mind exactly. like you may want objects to just battle to the death when on the same tile and not have the option of retreat. Or maybe you want objects to bunch up instead of walking around the water so once a space opens up they are close. Anyways, you'll have to tweak and tailor to what you have in mind since i don't know everything.

    Also one thing i didn't touch is making objects sharing a tile not be right on top of each other. I had a smooth way of doing that in mind but you have some other way in mind.

    -cheers

  • Impressive and oozing with character as always! Very cool.

    When the reading of the pixels is wrong, could the image be flipped?

    Messing with webgl before to read pixels I ran into the issue of the image being flipped on some devices. Not sure why it wasn’t consistent. Anyways my solution was to check if the pixel data comes out flipped and then flip if needed. This would only need to be done once as the flipping was consistent. Anyways to do it i’d get the pixels from a 1x2 image with a white pixel over a black one. Then if the top read pixel was black we know the image was flipped, otherwise it wasn’t. That should be doable with the canvas too. Reading the image flipped should just be a matter of:

    RedAt(x, height-y)

    Anyways, Just an idea.

    -cheers

  • You could change the enemies to move one at a time. Maybe something like this?

    Moving=0
    EnemyMoves>0
    — enemy: moved=0
    — — pick enemy instance 0
    — — — enemy: set moved to 1
    — — — move enemy
    — else
    — — subtract 1 from enemyMoves
    — — enemy: set moved to 0

    Having multiple units be able to be on the same tile would require changes over all the events to handle that. The current events assume only one unit can be on a tile at once. Off hand you could make occupied variable be the count of the objects in it, or maybe have two variables instead occupiedByPlayer and occupiedByEnemy. You’d need to then change how the occupied spaces are temporarily made walls, and maybe the pathfind function would need another parameter saying whether it was for an enemy or player. Just thinking aloud. Maybe that would give ideas.

    As a side idea the pathfinder could be redesigned slightly to eliminate the need to temporarily mark spots as walls. If possible that would simplify events.

    We’ll see how well I triage my time this week.

  • You use a tilemap to do the terrain so that it doesn't lag.

    You have to implement perlin noise with events with C2, or there may be a plugin.

    Anyways after that here is one possible way:

    dropbox.com/s/o219jt9lzbzcv5g/noise_gen2.capx

    Or use the forum search. There have been many solutions over the years for that.

  • Had a go at making an updated example. It should cover all the points you were after.

    dropbox.com/s/p7ysobapnmlvlh9/hex_pathfind3.capx

    * pathfinder was updated so it can step onto occupied tiles, but won't go past it. Had to temporarily disable the occupied var of the starting tile to do it.

    * possible moves of the player will be displayed, and hidden after selecting a move.

    * player and enemies can attack each other. An attack counts as a move.

    * player can be moved all at once or in multiple steps.

    * added smooth movement, and things will wait till they stopped moving to move on.

    Other than that i cleaned things up and tried comment everywhere should you need to modify things. Logic is similar but differs a bit.

  • Hi,

    Looks like you did some cool things with it. As your previous edit says, it does look a bit esoteric, but there are probably some ways to simplify thing so that what it's doing is more clear.

    For moving the player repeatedly till it's moves are used up or end turn is clicked I think adding another state would do that. So it would be:

    "show moves", which would highlight the moves in range.

    "wait player", would be largely the same but only allow clicking on in range tiles

    "move player", largely the same, but would subtract from the range as the player moved. if the range wasn't 0 at the end it would go back to "show moves"

    "move enemies", would remain the same.

    I can't edit the cp3 because i don't own c3 and it's beyond the free limits. However the highlighting moves should boil down to something like this:

    if state="show moves"
    	pathfind from player.target
    	unhighlight all hex
    	pick hex with hex.dist>0 and hex.dist<=playerMoves
    		highlight hex
    	set state to "wait player"

    Having the player, and enemies be able to move into each other to attack probably needs some more thought on how we are doing things. Right now when an object moves it thinks of everything else as a wall.

    For player movement: if we click on a tile, and an enemy is on it, we can decide not make that one a wall, since typically we make enemies walls.

    For enemies, we already have that logic in event 38 to do attacking. I just don't do anything, except not move into the tile.

    Anyways, just some ideas. I haven't done any updates to the examples, just referenced them.