lucid's Recent Forum Activity

  • right, if we're talking about the same thing, which is predicting movement, so you can move a character and estimate their position based on what data you have already received, while waiting for the next packet.

    This would be done completely differently, and to varying degrees, if you were making a fighting game, an rts, a chess game, or a fps. I don't know how difficult this is to make, or whether you have the time. But I think it would be useful, even without doing interpolation for you.

  • the new version is only downloadable in this last tutorial post for now. the other links in this thread are still to the previous version.

    if thats download s2.rar doesnt work with this latest tutorial, or if it works with the others, somehow, i messed up the upload, and ill fix it when i get home in a few hours.

    but yeah, if you downloaded it anywhere but at the top of this latest tutorial, its a different version.im keeping the old version for now, until i remake the caps to work with the new version

  • this thread has some interesting examples:

    http://www.scirra.com/phpBB3/viewtopic.php?f=3&t=4736

  • Yes Ash. I agree with pretty much everything you said

    An agreed upon method of submitting bugfixes, which can later be reviewed by the devs and utilized as is, edited, or at the very least, used to find the source of a bug.

    There can be minimum guidelines for commenting, and of course for the methods of submission.

    Any contributions would be submitted with no implied promise of either an acceleration in development, or a response from the developers.

    Those lines I wanted to emphasize. I would imagine it's disheartening to look at the bug tracker in it's current state when you have almost no time time to work on it. Having an extra set of expectations for "helpers" wouldn't really be helping you.

    I don't have much time to work on this, either. But I would gladly do some of it; at the very minimum, anything I've already found. And I can take a peek from time to time on the bug tracker to see if there's anything I might be able to take a look at. I'm not sure what kind of time the other plugin devs have, but between the 4 or 5 of us, I think it could really add up.

    I think it's important we make very clear guidelines for commenting, so there isn't additional time wasted deciphering our code and what it's supposed to do. When submitting the code there should also be guidelines for how to submit, and what to include- for instance, a small report that states the filename and line number where the relevant code is located, why we think it doesn't work, and if the solution is not obvious, a suggestion for a change in code.

    Also, I think when having trouble finding a particular bug, we can post to the plugin forum, and help eachother out. I think this could end up being very constructive.

    and yes I did that on purpose

  • ok, here it is folks.

    the long awaited SUPER tutorial

    but first, let's go over some of the changes that have been implemented since our last visit.

    first of all, the arrangement of the actions in the table has been changed. This is to consolidate it, hopefully place more important items closer to the top, but more importantly to keep you from having to scroll down as much. The side effect of this is that caps made with old versions of the plugin no longer work. Until I have time to remake the other tutorials I will have the new version as a separate download, so people can still do those tutorials. Also I've tried to hunt down all the "" instead of {""} default values in the fields that ask for an array. please let me know if you find any I missed.

    Next is with object deletion. Now when you delete an object from an array, it will automatically delete all other instances of that object in the same array, and you have the option of replacing those elements with references to the default (with "as type" options), or deleting those elements from the array. this is the fix to the crashable problems before related to destroying an object and still having other copies of that object in the array.

    Also, you can now delete an array. The action was there before, but didn't do anything, as it had not been implemented yet.

    I don't have time to dig through all the old tutorials right now, so I want to briefly go over a few things I may have missed, mostly with object and objecttype arrays.

    first, with s you can create or destroy objects by name(remember o.({"address"}) for objects, and ot.({"address"} for objecttype expressions return the name of the type). These are similar to the regular Create and Destroy functions, except now you can destroy by name, and when you create, you have full control over whether the object is picked and how it is picked.

    There is a Pick Object condition, and action. Choose whichever works in the situation. All it does is pick whichever object you choose, and gives you options for how it is picked.

    There is a "pick all of objecttype" action. Which I hope to add to later. For now, it picks everything of that type, which is basically like resetting the picking for that object.

    there is a Set Position/Dimension/Angle action that let's you change the x,y,z,width,height,and angle of an object with a single action. you can choose to keep anything the same by simply leaving the default "same" string there instead of giving a numerical value.

    This action serves several purposes:

    first, the object doesn't have to be selected at all. This works with the array location of the object. You can move around many objects in complex ways without regard to picking. Having this all in one action reduces clutter on your event sheet, and it is also much faster in large doses, since the event system only has one call's worth of overhead. This can be especially useful in arrays of objects, and loops.

    There is an action to convert an objecttype array to an objectarray, by making a new instance of every objecttype in the array, and putting it into an object array, and there is an opposite command, which takes an object array's types and puts them into an objecttype array.

    and lastly, there is a "break loop" action which allows you to break out of a loop. after calling the action the remainder of the actions will still be called, but the loop will exit after the current iteration.

    We are at the point in the tutorials that if you find any actions, conditions, or expressions, I haven't explained after this tutorial, please ask..

    now, on to the SUPER TUT!!!!(pronounced toot, not tutt)

    ok, first here's the download of the new version:

    click here to download new version

    <img src="http://dl.getdropbox.com/u/1013446/s/s.png">

    First we will go over the basic stuff you need to know about supers.

    Once again, this tutorial assumes you have read and understand the previous tutorials.

    First off, let's remember what a super is.

    a string is a container to hold text, a number is a container to hold a numerical float value, an object is a container to hold a reference to an object, and an object type holds a reference to an object type. Supers are containers that can hold any amount of arrays of any of those, and any amount of arrays of other supers.

    As an example, there is one master super. And everything we've created in any of these tutorials has been created in that master super ( {""} ). you could have created a superarray with one super in it called "mysuper". And everytime you placed a new array instead of saying to place it in {""}, you could have placed it in {"mysuper"} ( or {"mysuper,0"} ), and the tutorials would have run the same. The purpose of the super, however, is to serve as customizable containers (like c++ structs), so you can organize your data in meaningful ways.

    So let's get started with some real stuff.

    first off, we need to look at how we add superarrays:

    <img src="http://dl.getdropbox.com/u/1013446/s/objectarray3cap/addsuper.PNG">

    everything the same as before, use the same action. ignore the object related options. But two parts are significant in the super. First one is Default. I have "mytemplate" entered here. you can also leave it as the default 0, which makes an empty super. We'll come back to how the defaults work for supers. but for now, let's move on to the option that is unique to supers.

    Add one default super

    This does exactly what it says. After creating the super array, it adds one super. The reason this option is there, is because as you are creating your entire data structure. There's a good chance you'll want to create a single named super, and go right into adding items to it. Often times you will just use the super on it's own, and not use the array as an array at all. Since you need to have a super there to add things into it. it's convenient not to have to add an element to the array as a separate step before you do this.

    and that's pretty much all you need to know for the basics. After you create a super, when you want to make a new object array in it, instead of putting {""} for where to put it, you put in the name of your super array.

    so you create a superarray "mysuper"

    you want to add a number array "nums"

    after creating the superarray "mysuper", and adding one default

    <img src="http://dl.getdropbox.com/u/1013446/s/objectarray3cap/addingtosuper.PNG">

    very simple.

    if you want to retrieve the value at index 2, of this number array you would do:

    s.n({"mysuper","nums",2}

    if you added another super to the same super array, and you added a "nums" in it, and you wanted the value at index 2, you would do:

    s.n({"mysuper",1,"nums",2})

    if you added another super to "mysuper", and called it "wow", you could then add to that super with the address

    {"mysuper","wow"}

    and you could access a "nums" array in that as well

    s.n({"mysuper","wow","nums"})

    you can embed as many supers within super as you want. This can be used to create characters that have names, and a sprite, and an array of objecttypes in their inventory, and hitpoints, a list of friends, etc. The possibilities are endless. Any type of logical structure that works in your head, you can now arrange your data in construct that way. That's the purpose of the super.

    let's have a quick reminder about pointers now

    there is an action "set pointer"

    <img src="http://dl.getdropbox.com/u/1013446/s/objectarray3cap/addpointer.PNG">

    this would create a pointer to that address (for anyone curious, no, it's not an actual c++ pointer underneath)

    the pointer is just a shortcut.

    after doing that, when you wanted to access that pointed location:

    {"mysuper","wow",2,"this could get complicated","are you serious?",2,"oh man, this is crazy"}

    you could just type

    {"p","pointy"}

    "p" is a special character used for accessing pointers.

    pointers are not aware of their type, you can point to a certain object:

    {"mysuper",1,"nums",3}

    and that would point to the 4th number

    and use this anywhere you'd use a number address

    or you can point to an array:

    {"mysuper",1,"nums"}

    where the pointer could point to either the first number in nums, or the array itself

    and if you point to a super

    you can continue off of a pointer address, for instance...back to this:

    <img src="http://dl.getdropbox.com/u/1013446/s/objectarray3cap/addpointer.PNG">

    let's say "oh man, this is crazy" is a super

    and inside "oh man, this is crazy", there is a number array called "nums"

    it would be valid to say Add a Number to

    {"p","pointy","nums"}

    you can make pointers to pointers

    so this is valid:

    <img src="http://dl.getdropbox.com/u/1013446/s/objectarray3cap/pointertopointer.PNG">

    they are infinitely recursive, so you can have pointers to pointers to pointers, ad infinitum

    back to basic looping one more time here

    remember that to refer to the array that is being looped

    you can use {"l","loopname"}

    with supers, if you are looping through {"mysuper","wow",2,"this could get complicated","are you serious?",2,"oh man, this is crazy"}, and "oh man, this is crazy" contains a number array called "nums"

    you can refer to nums similar to the pointers {"l","loopname","nums"}

    in this way you can do a loop on a superarray, and then within each super, loop through it's arrays

    also you can use a pointer as your looping address, and have a pointer point to loop {"l","loopname"} address, and a loop address be a pointer, once again these can be used within oneanother infininitely.

    a few other quick notes before we move on to the real meat of the tutorial,

    when you "set pointer", if there is no pointer with that name, it is created, if there is, it is overwritten. you can reassign pointers as you see fit, and use them as variables that can point to any type of data. I will give some advanced examples, but they can safely be used as simple shortcuts, when you don't want to type the same long name out over and over.

    for example, you could make a pointer "temp", that you use any time you want to use a shortcut, and just reassign and reuse it to point to arrays, or numbers, or other pointers, whenever you need a new shortcut. or you could do something more complex, and have the pointer actually change to different supers you want to remember for different purposes. Also, keep in mind that this array notation {"this","that",0,"and the other"}

    is just strings and numbers, just as you can use an expression for the numbers

    you can use an expression for the strings

    you could have an array of strings called "mypointers"

    and then do this:

    {"p",s.s({"mypointers",3})}

    another advanced concept for those brave souls, is to keep in mind, if needed you could name arrays using string expressions. These are not private variables, you are free to use any tricks you want with strings to manipulate them.

    OK, now for the realness. After this tutorial, it should become obvious that 's' completely redefines the boundaries of what is possible with construct. And all future tutorials will either be to introduce new functions, or to give other ideas of applications. Please feel free to request "could you make a such and such editor" or a "such and such system", and it may possibly be a future tutorial.

    first here is the cap:

    http://dl.getdropbox.com/u/1013446/s/lvleditortut.cap

    try the exe of the cap, drag some stuff onto the board, choose the character start location, and save it. it will automatically launch the saved filed so you can look at it. then either restart the exe, or move stuff around, and add stuff, and then hit load, and everything is set back to your save.

    now,

    let's look at the layout editor:

    <img src="http://dl.getdropbox.com/u/1013446/s/objectarray3cap/Capture2.gif">

    the items at the upperleft are all of family blue.

    the load, and save buttons, the guy, and the line are not

    neither is the dummy sprite that is off screen.

    in start of layout:

    <img src="http://dl.getdropbox.com/u/1013446/s/startoflayout.PNG">

    we make an object array called "menu"

    then we make a super called "level"

    then we add an object array called "objs" inside "level"

    first we add the player sprite to {"level","objs"} (which will store our level)

    after that we loop through all the blue objects, and add each one to "menu" (which will store the objects you can add to your level)

    <img src="http://dl.getdropbox.com/u/1013446/s/ondrag.PNG">

    On drag start - blue (the one's on the top left of the menu)

    for each object in "menu", and we names this "menudrag", and do not alter picking

    if {"menu",.li("menudrag")} (the current object in the "menudrag" loop)

    remember, we just added each object at the beginning to "menu"

    if {"menu",.li("menudrag")} is picked as "blue"

    (basically, if anything in "menu" is the one being dragged)

    if you remember the exe, each time you drag an item from the menu,

    it seems like you're getting a new copy fullsize, and the original is staying there.

    here's how this part works, I'll paste it again, for easy reading:

    <img src="http://dl.getdropbox.com/u/1013446/s/ondrag2.png">

    we create a new object of type .tt("blue") that is the true type of the picked "blue", and we create this new object at the same location as the picked "blue"

    now, we don't want all type of extra steps to make dragging take over a new object

    so we put the new object which is now picked as whatever the true type of "blue" is (.tt("blue"))in "menu" at .li("menudrag"), so were replacing the "menu" item we are dragging with the new one we just created. Now the new one replaces the one in the array of the one we just started dragging.

    and the one we just started dragging is "blue", so we add that to {"level","objs"}

    and make it the original large size.

    ok, our level editor is complete except for saving and loading:

    <img src="http://dl.getdropbox.com/u/1013446/s/lvltut/save.PNG">

    when you click on the save sprite:

    the first action is:

    <img src="http://dl.getdropbox.com/u/1013446/s/lvltut/createnewobjectpossuper.PNG">

    this is a shortcut to save you time for a common task

    it creates a super for you that contains whatever object spacial info you choose, for an entire array of objects

    first you choose an object array, in this case {"level","objs"}, where we've been saving the objects we've added to the level.

    then you choose where to create the new super, you can choose an actual super address, or "same"

    so it creates the super in the same place as the object array you chose, in this case {"level"}

    so in this example we choose x,y, length and height

    you choose a name for the new super, in this case it's "pos"

    and you choose a default value for the super, in case you were planning to use it for other things

    you don't need to know this to complete the tutorial, but it may be useful later:

    the contents of the super are number arrays with the same number of elements as the object array you choose

    the names are "x","y","z","w"(for width),"h",(for height)", and "a"(for angle)

    it only creates the arrays for the values you chose to include

    when you choose the object array, before you type anything in, the default is "leave empty", this will create the super, and the number arrays, but not input any of the values into the array

    since we chose an object array, "x" will be filled with the x values of the objects at the same position in the array, "y" with the y values, etc.

    here it is again:

    <img src="http://dl.getdropbox.com/u/1013446/s/lvltut/save.PNG">

    the next action is Save Super:

    <img src="http://dl.getdropbox.com/u/1013446/s/lvltut/savesuper.PNG">

    you choose a filename (doesn't have to be txt, should be something else actually)

    the address of the super you wish to save

    the type you would like to save MUST BE superarray. I will either add the other options, or remove the option. And furthermore, it is only saving one super...not superarray...for now, just think of this action as Save Super

    This isn't limiting though, since you can add any array to a super, and if you choose {""} it will save everything.

    The last option is Encrypted

    the encryption is secure enough to trust your game info with. Someone who can get around the copy protection of a game could figure it out. But not your average joe. You can safely save scoretables, character info, dialogue, levels...anything. We choose unencrypted in this case, just for the hell of it.

    Before we move on. please understand. This allows you total power to save any type of data. If we wanted to add dialogue strings, or numbers for the starting force of physics objects, or object path info, basically you can make any type of gamesave data, or any type of editor, and not worry about the saving part. you could make a 3d mesh editor, an ai logic editor, an in-game movie editor. Creating editors, which was previously a very involved, technical, and tedious task is now as simple as using the save action, once you put things in your super.

    <img src="http://dl.getdropbox.com/u/1013446/s/lvltut/fileandelete.PNG">

    I only included the file object for this purpose, to load the file we just saved, so you can look at it. You do not need the file object to load and save. If you are curious, change the save to encrypted so you can see what the encrypted file looks like.

    after this we delete the "pos" superarray, since we don't need it. On a side note, there is an action to Add/Overwrite the these object positions/dimension.orientation supers, so you can store this information and use it for other purposes other than saving it.

    finally:

    <img src="http://dl.getdropbox.com/u/1013446/s/lvltut/loadsuper.PNG">

    first we clear the object array. there is an option to "destroy all objects"

    so this functions as a simple way to get rid of all the objects on the current level

    next is load super "levelsave.txt"

    <img src="http://dl.getdropbox.com/u/1013446/s/lvltut/load.PNG">

    filename, we know

    encrypted must be the same as the file was saved or it will not work, and will most likely crash

    Load objects as types

    the options are No, load as new instances, or if it is useful for whatever reason, you can load them as their types in an object type array. when you save an objectarray, you are only saving what objects they are. Information like location, and plugin info is not saved. just what type of object it was. this is why we put the location information in the super to be saved as well.

    choose a super to load it to. ALL INFORMATION IN THIS SUPER WILL BE OVERWRITTEN by the loading action.

    and layer to spawn objects, so if you don't load them as types, what layer are we going going to put them on?

    finally we have the apply spacial info action:

    <img src="http://dl.getdropbox.com/u/1013446/s/lvltut/apply.PNG">

    choose an object array, choose an array made with one of the Object Position, Dimensions, Angle actions, and viola! All the spacial info is applied to the object array. It is important to store and apply the same exact info, you cant store y, and angle, and then apply only angle. for now, it ignores the names of the arrays, which is slightly faster. if there is a huge need to be able to apply partial info, just save the info to separate supers. At the end you have the option to Delete the Spacial info super after applying. you can delete just the single super, or the entire array. This is just a matter of convenience for just this type of situation, where you just want to use the info once, so you don't need a separate action.

    just for fun, and practicality, here's a level loader:

    <img src="http://dl.getdropbox.com/u/1013446/s/lvltut/loader.PNG">

    http://dl.getdropbox.com/u/1013446/s/lvleditorloadtut.cap

    single event. the objects have their in-game behaviors on.

    take a look, for it to run, you'll have to have already saved a level

    well, enjoy your newfound power

    feel free to ask questions, especially of the "would it be possible to..." variety

    things I forgot earlier:

    Templates, the default values of supers->

    there is a Create New Template action. You name the template in the action and that is it.

    the template is simply a super.

    to get to this super, you use the notation {"t","templatename"}

    you can use any normal action on a template.

    you add all the arrays, you need, it can be as complex as you wish.

    when you create a super, you can use a template as the default.

    it is not advisable to add objects to this array, because they can be destroyed from somewhere else, but remember you have the action to convert an objtype array to an objectarray.

    you can fill your template with empty arrays, or they can have values in them. Whatever is most appropriate, you may have a "character" template that starts with certain items in their inventory, but no entry in the name string array for instance.

    when used as default for superarrays, they are created as copies of the templates in the normal way and under the normal circumstances defaults would be created and used, except when attempting to access outside the range of the superarray, which is simply not supported or accounted for.

    This will be expanded later to give you more options, but as of now when saving, all template are automatically saved. When loading, all current templates are automatically deleted, and replaced with the contents of the save file.

    and lastly, there are new s.ipx({"objectaddress"}), and s.ipy({"objectaddress"}) functions like the s.x({"objectaddress"}) and s.y({"objectaddress"}), except these return the imagepoint x and y values of the object.

    have fun

  • Ashley. I'm sure it isn't intentionally rude, but it comes off that way.

    The other plugin developers I've spoken to in chat seem on board.

    If the answer is no, please respond as such, instead of ignoring the post completely.

    Please note the following (about the Construct source code proper).

    If the terms of the Prof-UIS license is stopping you from releasing the entire source code, then this is a violation.

    You cannot choose to not release source code because it "is messy" or otherwise personally disagreeable. This is also a violation.

    Personally, I know nothing about the licensing issues. I just want to help the project get back on it's feet.

    I don't want dev credits, or a red name tag. I just see this as a way to reduce the workload. I don't want to see construct fade away before 1.0, and I'm not alone in my concern this is the way things are headed.

  • EDIT:COPY PASTED TO MOST RECENT POST

  • you can double check to see if it's a reported bug or not

    I think this might be because if you touch slightly up or down it overrides the left and right

    other than vibration, which is not within it's scope

    the 'custom controls' plugin has a much less buggy version of the 360 plugin

    plus you don't need to set up multiple conditions for multiple control schemes

    but back to your cap

    this line will do all the 360 analog stuff, and also take into account the analogness of it:

    click the image for full view

  • no

    you can't use variables in that way

    they are interpreted differently,

    and have a different syntax, 'like this', "instead of this"

    you can use arrays for this purpose

    or I would recommend using the s plugin

    which is designed to allow more logical data organization

  • coming soon:

    the next tutorial will explain how to make a drag and drop level editor, that saves and loads encrypted level files, in just 4 events:

    <img src="http://dl.getdropbox.com/u/1013446/s/objectarray3cap/leveleditor2.PNG">

  • there's a 360 driver you can get janman that works with directx, which is basically any non360 pc controller

    http://www.tocaedit.com/IB/index.php?automodule=downloads&showfile=4

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • the 's' plugin has a random seed feature

    also, the perlin noise plugin is made for another type of seeded random

lucid's avatar

lucid

Member since 16 Jan, 2009

Twitter
lucid has 22 followers

Connect with lucid

Trophy Case

  • 15-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

22/44
How to earn trophies