Intrepid's Recent Forum Activity

  • I would love to see the example of only having a set amount of tiles in your game window at once.If this is possible i could do things i never thought possible with construct 2. Im making a terraria/Minecraft style of sandbox game.

    Sorry for keeping you waiting RookieDev, haven't been active recently due to life.

    I'll be looking at the example trying to improve it, this will be an implementation for sure.

    How can I make a tree generator for this?

    Its just an example, I would need to use some similar code to spawn trees, chests, mobs, and so on,

    so if I want, for example, that 1 on 50 blocks (top block) got a tree,

    how can I code that?

    I thought it would be easy as it has a grass generator for the top blocks,

    but after an hour trying I couldn't do it :/

    I'll work on getting this in too, You could pick an X column, then scan down the Y until you found a solid. Hopefully it'll be a pain-free process, but we'll see.

    I'm going to try to make it generate into a non-power of 2 length for more control over level generation. Hopefully it'll be done soon, I'll try to get it finished it over the weekend.

  • I got to take a look at it, works well and plays smoothly. I did get a bit confused when I was at the top of the level and it was all dark. I am curious how you did the lighting though, how did you implement that?

    I hope you keep going with it, I'll be looking out for the thread :)

  • Sorry there, been really busy lately. I remember trying to test it, but there were errors when I tried to extract it. Can you try repackaging it?

    Also, you might get some better visibility if you create a thread for it over in My Creations. More people seeing it, more people trying it :)

    Anyway, I'll try again tonight, and redownload it.

  • Have you been using Yann's? His method uses those sin/cos equations to locate

    the neighbor to check, while mine will check based on set variables in the if/then loops you're talking about. They both do the same thing, but his is more graceful, and I really like how he did it. Mine is a very straightforward approach, but uses a lot of actions.

    If you've been going off of his example, I would say to stick with his.

    It sounds like you have been, so keep doing that! Mine was more intended for an example of one way to implement it and show it could be done, but I'm not a super wizard so it uses more events than it should. Then Yann made it into, in my view, a proper implementation for a game with more control over the generation and is overall a cleaner and efficient method. He did an awesome job making it better with his optimizations and I learned quite a bit from it, so thanks Yann!

    Lastly, I put that disclaimer into mine because it's an example and not very efficient. More specifically, where you pointed out, it will create EVERY tile in the "lvl" array. This is fine when it's in a small scale, like how it is now you shouldn't get more than 7-8,000 tiles/objects in your layout. But if you go larger than that, like say to a terraria sized level, you're going to get tile counts to the millions. Just a small sized level in terraria is 4300x1200, or 5,160,000 potential tiles. You're not going to want to create all of those tiles, it'll bog and become unplayable. You'll want to implement some way to only have a set amount of tiles in your layout at once, such as what's going to be seen in your game window. I've got something already made that I can make an example from and show you if you want.

    Best of luck with your game!

  • Thanks very much for this. I used it to learn how to use arrays in Construct2 (they made my head hurt initially), and i've now turned it into a decent terraria lite demo.

    I've got multiple block types (gold etc), placeable ladders, placeable blocks, grass that regrows over time based on certain rules, realtime lighting, etc. I got very inspired lol. Learned so much from your code. Wasn't aware of the bit technique for tile selection, thanks again. :)

    That's awesome! I"m glad you and everyone else find this helpful.

    I hope you show us your project soon!

  • Okay, gave it a performance boost, should run fine even with the bigger levels.

    Added some pretties such as grass and bitsolved tiling. If you wanted to,

    adding caves to this would be a piece of cake.

    If you were willing, this could be stretched into a terraria-lite in the

    browser. Browser performance might not be there yet, but it will be soon.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm, didn't know this was still generating interest! I'll put some optimizations in, get it going faster.

    Also, you can destroy tiles by left clicking them. Don't know why that wasn't mentioned.

  • Pretty nifty, I had wanted to do similar in classic, since it'd be easier

    to do solving with a plugin as compared to doing it with events.

    Does it check to see which tiles are collideable or not?

  • What I'd like to see is a way to change between the two different schemes.

    I like the new one, but now I have to go and remember all the new symbols

    for objects since that's how I usually find an object in a list.

  • Ashley, I'm testing on an HTC Evo 4G, running android 2.3.5.

    These are what I'm testing with:

    With JS

    Without JS

    It's just 3 red rectangles. Is it alright if I try out your test file

    (with the JS file) on my phone?

  • Ashley, I just tried exporting in R83, and leaving the phonegap.js

    file still results in a white screen. It's just 1 layout with 1 sprite.

    Are you changing anything in the JS file, or doing something different

    than what the guide/tutorial says?

  • Ashley, I think right now it's with phonegap. Leaving out the JS file

    worked in R80.2 and R82 exports, so I don't think it's Construct.

Intrepid's avatar

Intrepid

Member since 4 Aug, 2010

None one is following Intrepid yet!

Trophy Case

  • 14-Year Club
  • Email Verified

Progress

15/44
How to earn trophies