SpongeBrain's Forum Posts

  • The first of the Random Maze Tutorials is nearly ready for release.

    I just have to finish off a few things first.

    Should be finished by the end of the week.

    This first one will focus on a simple algorithm for creating random mazes, going into detail about how the coder should approach the tasks, before allowing you to set the size of a maze and watch it being generated.

    As you can see from the screenshots, as well as the size of the maze, you can control the speed of the generation and the zoom level.

    You can also decide to have the camera follow Pacman (who's kindly volunteered to carve out our maze for us), or have control of the camera with the right mouse button.

    I should point out that originally I'd planned to release this as a documented .cap file, but during the changeover from 0-based arrays to 1-based arrays, I decided to start again without using arrays (to save waiting) and the program uses detection instead.

    As this isn't a method that anyone would use when creating a maze for their game, there is no value in releasing the .cap.

    Because of this, I've made the tutorial very detailed on the specific aspects of maze creation, with plenty of diagrams, so as long you're comfortable using arrays there's no reason why you'd need the cap file anyway.

    Sponge.

  • As a couple of people have already pointed out in this thread, the "Hide" is greyed out in the right-click menu.

    Is this going to be brought back in the next build?

  • I was going to use an array, but using a listbox will save me having to manually shift the numbers down the array and shorten the range each time.

    Nice one!

  • Before I go ahead and use a dynamic array instead, is there a number pool object or function in Construct.

    Nothing found on the search here, or on the wiki as far as I could tell.

    For those not familiar with it, it allows a range of numbers to be stored, which can then be retrieved at random without repetition.

    The card game object probably uses the same sort of number pool to stop duplicate cards appearing (I've looked at the Card Game object to see if I could utilise that, but it's not suitable for what I want).

    Cheers.

  • Here's another one worth mentioning.

    The colour of the description text on a disabled Group is almost unreadable.

    At least on Vista it is.

    <img src="http://img5.imageshack.us/img5/8145/groupp.jpg">

    Are you using system colours for this?

    I'd prefer to see specific colours used, so that they can be seen on everyone's computer.

    Maybe even give us a choice of colours.

    Sponge.

  • ::: It would be nice if Construct remembered the "Save as" path for applications and the "Open" in the Picture Editor separately.

    Currently, if you import a graphic through the Picture Editor, and a little while later decide to save the app under an incremented backup (so you can't use "Save"), the file window takes you to the folder you last used, which for me is the graphics folder.

    It also works in reverse, so after saving a file using "Save as", when you go to import a graphic, you are taken to the app folder.

    I do have my app files and graphic files close together (they're in sub-folders of my "projects/Construct" folder, but it does require a couple of clicks to get to the correct directory for what construct is trying to do.

    ::: Another thing that would be useful is to be able to see the filename of the current project in the Title bar, rather than just the project name.

    ::: Finally, and this may already be in there, but I've missed the shortcut, it would be nice to have a shortcut to get the scale back to 100% in the layout editor.

    Using CTRL+ Mouse-wheel to zoom in and out of the editor is a godsend in the same way it is in Firefox, but unlike Firefox, CTRL+0 doesn't resize it back to 100% (again, I'm sure it's probably in there somewhere, but I haven't looked hard enough).

    Cheers,

    Sponge.

  • Well that makes sense of the results that I got.

    Is this mentioned anywhere in the docs or on the wiki?

    Couldn't find anything on there, but I think it needs to be.

    Sponge.

  • Yeah, INT works, but what I couldn't understand was why it was throwing back a float when there was no divisible maths going on.

    In fact, just creating a new cap with Global variables "CurrentCellX"=0 and "SizeX"=10, and the statement:

    "CurrentCellX" = random ("SizeX")+1

    will produce floating point numbers like 4.22801958731946 every time, without any other maths going on.

    Is that expected behaviour?

    I suppose as long as people are aware of it, it'll be ok, but I wouldn't have thought that floating point would have been used until it was forced to by maths that involved or resulted in a floating point value.

    Sponge.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Using a Global Variable as a range for a random number produces a floating point number

    I'm sure this is a bug, and it was bugging me for ages, until the penny dropped.

    I'm using Global variables "SizeX" and "CurrentCellX", and I'm only using integer calculations throughout, but I wasn't getting conditions firing when comparing CurrentCellX to an integer, and the debugger revealed why.

    Having set "SizeX" to 10, and then setting "CurrentCellX" using

    Set "CurrentCellX" to random("SizeX")+1

    the debugger showed that "CurrentCellX" was producing values like 2.09159510755603 and 3.46251876045338

    So it looks like using a Global variable as a range in the random statement produces a floating point value.

    Could someone else confirm this please.

    Sponge.

  • Whilst the subject of servers and online use is obviously important, and it doesn't hurt to discuss it at great length during it's production, my thoughts are on the usage of the object in Construct.

    With MMF2's plugin, and obviously with any online code written in any language, the game designer has to decide how often packets are sent, and then write the code to implement this.

    What I was wondering was whether the online plugin for construct would allow the user to assign specific conditions to specific objects, and then the plugin would deal with the sending of information.

    To clarify, you have 2 cars ("carA" and "carB"), one controlled by you, and the other controlled by a person elsewhere.

    Now, as anyone who's coded online apps before will know, you can't just constantly send a stream of data for the postions of the cars, as this will just bring your app to a standstill, so data has to be sent whenever it's needed and no more.

    So, in an ideal world, the "SEND" part of the plugin would allow you to:

      Add an object to it (say "car2" for this example) Send packet when condition met (position changed/time elapsed/predictive position/etc)

    In the "RECEIVE" part of the plugin, you would be able to:

      "Listen" for packets with a recognisable name Run functions or groups depending on the name of that packet

    If the plugin is a simple send and receive packet plugin, like MooClick, then it would be easy enough to code the sending and receiving using it, but if it was built-in it would be a lot faster (processing, not sending and receiving ) and it would also be a lot easier for those without experience of online coding.

    Sponge.

  • Personally, I'd be happy with just the ability to connect to the machines on my LAN, and the ability to connect directly to someone's IP, like Duke Nukem and many others games did back in the day.

    Full online connection would obviously require a lot more thought and discussion.

    I'd hate to see LAN and IP play delayed because of the work that was required to get full online play up and running.

    Sponge.

  • Ahh right.

    Cheers.

    I didn't keep up with the discussion in the other thread, and wasn't sure where it ended.

    The arrays seem to be working fine in this build (all 1-based), so I can finally finish the random maze tutorial.

  • Wasn't "random" going to be 1-based, or was it decided that it was best left as it was?

    I haven't checked arrays yet (I'm about to), but in general it looks like a good build.

    Sponge.

  • I've found that actually double-clicking the object symbol in the event line takes me to the point where I get to choose the object, without having to back up a couple of pages first.

    Not sure if this was because of circumstances specific to me at the time, or whether it always works that way.

  • Excellent work mate.

    Love it!

    I also agree that it would be nice to have one that does it the original way too.

    Very nice.

    Sponge.