tulamide's Forum Posts

    • Post link icon

    Thank you very much, ROJOhound! This was very helpful, incl. the links. I will give it a serious try now

  • Thanks Lucid, I understand it, just don't think it will be useful for anything. Things like health bars are already easy to do with variables, just subtract/add.

    If you can't see lerp being useful for anything, then you did not understand it. Just a very simple example:

    lerp.cap

    (click and drag the blue sprites)

    Now recreate this without lerp. It's possible, but needs more effort. And this is just a very simple example.

  • Just calculate the positions exactly as you did for the array.

    Replace

    (int(Random(2150)/48)*48, int(Random(12762)/48)*48)

    with

    (int(Random(2150)/32)*32 + 16, int(Random(12762)/32)*32 + 16)

    That should do it.

    btw, I'm experiencing problems with the platform behavior. Framerate drops down to 20-30 fps.

    • Post link icon

    lucid, thanks for that. Now it sounds a lot more like Real Studio (that I'm used to). Maybe I should ignore the unpleasant feeling of being overwhelmed and give it another try.

    Here's one question to all who already work on plugins, and please don't be annoyed.

    I saw the thread, where it is explained that you need something for VS Express in order to work on plugins. But I really don't get it. There's something like a 600 MB download, but then again you only need certain parts of it. I don't even know, what functionality it has. And where to install them and how to integrate them, so VS Express knows about it? Isn't there an easier way?

    Yes it is kind of offtopic, so maybe someone can answer by pm?

    • Post link icon

    This is one of the moments where I regret, that I never got used to C++. I have programming skills, the will to solve problems and a long experience with (oop)BASIC and several script tools. But whenever I try C++, I see all that overhead. VS Express is so bloated. It takes so long to start, there are so many files to create and I always wonder, what that editor expects from me. Compared to something like Real Studio or just Notepad to start Python, it just discourages me.

    I really hope there will be dozens of C++-skilled people interested in further development of 0.x

    I really do

  • If you feel more comfortable by reading the following, you could also consider using Python:

    # creating a game object reference (that will run at start of layout)
    class GameObject(object):
        def __init__(self, item=None, type=None, name=None):
            self.reference = {}
            if item != None:
                self.reference['Type'] = type
                self.reference['Name'] = name
                copy_from_item(item)
    
        def copy_from_item(self, item):
            self.reference['X'] = item.X
            self.reference['Y'] = item.Y
            self.reference['W'] = item.Width
            self.reference['H'] = item.Height
            self.reference['Angle'] = item.Angle
    
        def add_pv(self, pv_title, pv_value):
            self.reference[pv_title] = pv_value
    
    #calling a game object reference (most likely a separate script somewhere in the events)
    myCoolRef = GameObject(Sprite, 'Sprite', 'Bullet')
    myCoolRef.add_pv('will_spawn', 'SmokeTrail')
    myCoolRef.add_pv('Lifespan', int(Editbox.Text))
    [/code:1d5w813b]
    
    EDIT: But I really think, 's' would be the better choice for this particular task, simply because it was made for something like that. Saving the informations is just a matter of one order (whereas in Python you would need to create your own writing routines) and the spatial info shortcut is also neat.
  • howdy yall. I noticed I messed up on the pointer and loop based addressing system in 's'

    oops

    I guess no one was really using those features since no one complained.

    So now I wonder what exactly was wrong with pointers? I mean, I use them for about a year now and didn't have any problem whatsoever

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • As promised, here is another example using hash tables. This time I present one possible way of supporting multi-language-games. The languages are stored in hash tables sharing the same keys. Furthermore, the use of a hash table to randomly select items, while every item is only selected once, is shown here.

    Most of the time people will use a system similar to this:

    1) Generate a random number

    2) Compare it with the previously generated random number

    3) If they match, repeat from step 1

    4) Finally after millions of repetitions, the numbers don't match and stuff can be done

    The hash table approach doesn't need that, as every key that was used is deleted from the hash table, and the random number is always generated based on the number of keys left.

    The .rar file contains a cap and three language files (aka saved hash tables) and the events of the cap are extensively commented.

    Download:

    LanguageExample.rar

    I hope it is a useful example

  • On your "where's my IF at" question

    object.visible --> Do stuff
    |
    else (or you could use: object.invisible) --> Do other stuff[/code:1yzpzpjd]
    
    The IF's are hidden, everything is kind of an IF statement so to speak
    

    You are right with the 'if'-part. All events are structured this way, on the left side is either a condition or a trigger.

    But you are wrong with '(or you could use: object.invisible)' in this case. The reason, why this wouldn't work here, can be read in this thread

  • I'd always prefer maintenance over speed. You never know how much issues you will get with too much wasted RAM or illogical code.

    You shouldn't be too afraid of maintenance slowing your app down, though. I tested an array with 10000 cells, moving the contents of 9999 by one to the left. I could do this on every tick without touching the v-synced framerate of 60 fps. In your app you will never experience a situation, where you would constantly move 10000 cells per tick.

    If you are interested, how actual events would look like (and behave), have a look at Verve!

    The sorting algorithm featured there works simultaneously on 4 arrays, moving the contens of cells, deleting entries, inserting data, etc.

    If you can find a way of identifying your objects with keys, then you could use a hash table and place all data as a tokenized string for the values of the keys. It would cost you another routine to pack and extract the data from the strings, but you would never have gaps in your hash table, no matter how often you delete or add something.

    You could also setup your own array structures (like arrays storing other arrays or sub-arrays) by using the 's'-plugin.

    Python would also allow for custom classes. You could create something like:

    class Profile(object):
        def __init__(self):
            self.name = None
            self.age = None
            self.height = None
    
    class Group(object):
        def __init__(self):
            self.profiles = []
    
        def create(self):
            self.profiles.append(Profile())
    
        def delete(self, index=None):
            if index == None:
                del self.profiles[-1]
            else:
                del self.profiles[index]
    
        def set_age(self, index=None, age=0):
            if index == None:
                self.profiles[-1].age = age
            else:
                self.profiles[index].age = age
    
        def get_age(self, index=None):
            if index == None:
                return self.profiles[-1].age
            else:
                return self.profiles[index][/code:ep387qqo]
    
    You would then use it this way:
    [code:ep387qqo]#Your array
    ProfileArray = Group()
    
    #Create a new profile
    ProfileArray.Create()
    
    #Set the age in the newly created profile to 18
    ProfileArray.set_age(None, 18)[/code:ep387qqo]
    
    Saving the data is as simple as using file.write() after having prepared the values. (Won't go into details here, but it really isn't much effort.)
    
    You see, there are many ways, it is up to you to decide which way to go
  • When working object oriented, you will have an easier life using one of the two object oriented tools: 's'-plugin or python

    In the third post on this page, lucid gives a very fine example of how 's' could help you solve any of your issues.

  • Damn, I'm terribly sorry. I mixed it up, not with the list object, but with the edit box object.

  • Yes I know about that. Just wanted to bring in some humor with a wink... Didn't work, so I **** at humor, too

  • MS Paint is what comes with Windows, and yes, it ******

    I'm not so sure about that

    http://www.metacafe.com/watch/2066909/insane_ms_paint_drawing_audi_allroad_quattro/

    Maybe tools are just as good as the people using it (so yeah, for me MS Paint ***** )

  • It does work, but only if "Multiline" is also enabled.