Excal's Forum Posts

  • I personally use viewports to center stuff.

    ViewportRight("Layername") / 2

  • vee41

    The game board is 18x7, and filling every possible space with a square (even if invisible) is 126 sprites. Add in UI sprites, the gameplay sprites, background image + sprites to create background animations, and we're looking at 180-200 sprites on screen. Thankfully, this game is turn-based so these sprites aren't all moving in real-time.

    I intend to make the game as flashy as possible while minimizing the amount of sprites that are 'doing nothing'.

    Now, I'm not sure what the performance gains are on not having sprites vs. making sprites invisible, but maybe Ashley (or anyone who is knowledgeable on this matter) can explain whether the performance gains caused by removing sprites altogether (as opposed to making them invisible) is going to make a difference.

  • Got a screenshot?

  • I'm honestly still not convinced.

    Your method works, and I'm not going to question that. It's also simple and easy to understand.

    However, I do think it's possible to do this without making the squares be there (even if invisible). I have a screenshot on page 1 showing how I'm trying to do it, although for some odd reason it fails after a certain point and begins saying all remaining squares on the board do not exist, and I'm not quite sure why.

    Another reason is because I don't want to have to populate the entire board when creating a pregenerated board state. I want to be able to place the squares (aligned to grid, of course) and not have to place invisible ones in order for the array to work.

  • Hmm, I'm under the impression that destroying it is better for memory usage, especially since I'm testing this on my iPad. Am I wrong?

  • Also, another possible problem is that the squares on the board are not placed exactly in a multiple of 32, at least not when using Yann's random grid generator.

    I've contacted him asking about why the offsets are necessary.

    vee41 this is another problem. The original version of my game used squares and walls. The latest iteration destroys the walls so the background below can be shown. This means at some points, there will be no square.

  • Your array population starts off by picking the square nearest to 0,0

    Does the array population still work if there is no square in the top left corner?

  • I think the problem, in my case, is that I want the array creation to be more flexible.

    For example, my program currently uses a script to randomly generate the game board. However, the array population function occurs in a different event sheet - the gameplay event sheet. This is because I want to be able to populate an array that represents the board state regardless of how the board was generated (whether through the random board generator or using a pre-created board state).

    However, your approach for populating the array should still work I think. You set the xi and yi values when you populate the array, so I suppose for it's okay in my program to generate the board, populate array, and then set the squares to match certain array values.

    I'll give it a shot using your array population method and let you know how it goes.

  • vee41, What do the Square.xi and Square.yi variables represent? And why is it necessary to set them to loopindexes?

  • vee41, how great of you to grace my thread with your presence!

    Joking aside, Firefly Village looks great so far!

    Currently, the link you posted doesn't work. I'll give it a few minutes as you might be uploading.

  • , if you're new to C2, you can still download the .capx and look through it if you want to figure out how to implement something, such as a notification box, highlighting, etc.

    I'm also currently working with an audio composer to flesh out the music and sounds. I learned from my first project that graphics + sounds can create an atmosphere that can turn even the most terrible or un-innovative game into something people will enjoy playing.

  • Yann Was there a reason why all the NoZone sprites had to be offset by 0.5?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Just saw this: Beta release r140

    All I can say is thank you. The fact that you plan on adding a debugger gives me newfound faith in you guys and confidence that you're not getting sidetracked with (currently) less pressing issues like Wii U export.

  • First set of graphics are now incorporated. What are people's thoughts about the style?

    <img src="http://i.imgur.com/Hkgy1QV.png" border="0">

    <img src="http://i.imgur.com/4buVvy4.png" border="0">

    <img src="http://i.imgur.com/XA11e4H.png" border="0">

    <img src="http://i.imgur.com/LoQVcxA.png" border="0">

    You can also test it live: CoHackTest

  • I've made some tweaks so now the array is correct for PART of the game board. There's a point where it starts saying every space is not a game board space, even though that is visually not true.

    <img src="http://i.imgur.com/6ZSxv1Y.png" border="0" />

    I've messed around with the array setup code to accommodate for the offset in Yann's random grid generator. Now I'm confused as to why this array input code works for PART of the grid but not the whole thing.

    <img src="http://i.imgur.com/tj6mMLA.png" border="0" />