lennaert's Forum Posts

  • $sql = mysql_query("INSERT INTO `$db`.`scores` (`id`,`name`,`email`,`phone`,`car`,`insurance`) VALUES ('','$name','$email','phone','car','insurance')");

    removed roque semiclon and some misplaced qoute

  • Unity: will require your users to install the unity plugin to play it in a browser.

    Construct2, will enable to you to export it to the various platforms, web being the easiest one to attain for any user.

    If you want on the fly switching of perspective, use the same layout, else each switch will cause a short lagg while the layout gets loaded, making the switching less fluid as the levels get bigger.

    Using them in the same layout, would be the fastest method to switch views manually.

    I would just use some method to disable updates on the hidden layer,until you switch to it.

    I keep hearing bad comments on unitys lacks of updating manuals/guides and what not, but thats related to fast development or so I hear.

    Im not aware which export options unity offers, but I know construct 2s is vast.

    New arcade ?

    *pokes the subject*

  • I would say thats dependant on your mechanics.

    So in effect, no, the memory usage is not the same.

  • The closing could be a bug.

    Earlier the blinking was due to having objects outside the layout, dont know if this is still the case.

  • The Answers action on event 23 is wrong. Should be:

    Answers: Set size to (5, AnswersOriginal.Height, 1)

    <img src="smileys/smiley32.gif" border="0" align="middle" />

    Sharp spot.

    edit: I had to set mine to 6 though

    edit 2: Seems like you need to set to the amount of question you have : "numberOfQuestions"

  • Suggestion:

    A temporary thread to work around the missing private messages notification sometimes causing lengthy delays in communication.

    Like,

    Hey PSI, you got mail.

  • Wow, nice solutions lennaert. Thanks.

    My great problem right now is how store this object states to return then later.

    To static objects (like buildings) it is easy. But to NPCs, that will be running through the map, it will be more difficult. In that cases, i can left the objects running and only destroy the sprites and effects. But I dont have experience in C2 to judge if this will worth the effort.

    I'm trying to avoid that annoying thing - normal in 8/16bit games - when you run back for something that you just pass by and it no more exists.

    But thanks for sharing your exp.

    :)

    I overcome the problem with instance variable from objects which get created and destroyed ... smart implementation of game mechanics.

    If my object is dependanton a certain value, and it woulld be just 1 object, then I could either stuff the data in a var, or even an array ... but if you have to do this for all enemies .... it becomes a pain ...

    So ... what I did, is make sure each enemy doesnt have references that need to carry over some create -> destroy -> create

    Image something like an enemy picked something up ... and needs to have it after a new created ... I simply did not implement such a method, as its too much hassle.

    Like with enemy health, if an enemy gets destroyed and recreated, it gets its health back after a new create ... i just envision that as being logical, you shouldnt have run away lol

    for objects that need to be there when I return later, I simply do not remove them.   If they have some dynamic behaviour tied to variables .. then simply only disable the behaviour to save CPU and enable with some method when needed.

    A lot of good mechanics comes down to applying a minimilistic KISS appraoch.

    If you have something thats really important to have it remember state, and destroy and comeback, you can always store something in a variable or array and get that data when you need it.   I would see this as a workaround, and not apply too many of them.

  • Savvy001 I used your solution and when I observe the planets are moving away from sun with every rotation around the sun. Do you also have this problem?

    The way of for example earth lokks likhe that: <img src="https://dl.dropboxusercontent.com/u/44710358/earth.JPG" border="0" />

    Hi

    Im building a little app in which sprites orbit a center object but gain more distance over time.

    I think its suposed to do that.

  • I am doing something similair.

    I do this lazy loading with dynamic objects which use behaviours for player interaction. Like enemies.

    I use a distance check on an object, which has lists of items to be spawned, and keeps track what gets killed.

    If you get out of range, the objects return to the spawn point and get destroyed there. As soon as all spawned options been spawned and enemies destroyed, the spawn point gets destoyed or gets a boolean to avoid avoid unneeded distance checks..

    Having distance checks might not be ideal .. but you can use all sorts of triggers ..

    for example, on an entrance to a big piece of the level, have some hidden image in the beginning, and on overlap, trigger events needed for spawning and creating objects.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a animations heavy game: download size atm 35mb, hardly any aduio yet, and half of the graphics in.

    In the begnning i used one layout with all my assets ... but this grew big ... up to a point where it said memory usage 160mb.

    I came to find out this indicator is the largest amount of memory any of my layouts use.

    So I took a deeper look and found that splitting the pbjects layout for assets into smaler, worked very well.

    So now I have an objects layout for my player chracters, I have a layout for soley enemies characters and animations, and have a decicated layout with Level props and items.

    Download still 35mb, but max memory usage dropped to around 80mb !!!!

    In short, the memroy usage indicator isnt a realiable measurement for memory usage, but more an indictor what the size of the largest memory iis from your layouts. (values indicates one layout)

  • Lennaert

    the main reason im looking to swap positions of items is because this game will have chests that the player can swap items to and from.

    I Have no issues with how this inventory works in general,im just trying to add to it.I guess what your saying is i have to rewrite my whole inventory?

    It apparently wasnt build with that intent.

    Either it has to be rewritten with that possible function incorperated.

    Or some method has to be added allowing for the array with inventory items to be rewritten upon item swap. But my knowledge of the Inventory stops here, I know there is a list of predefined items, stating which item falls in what category, but its also tied to the spot in the regual inventory. So it could very well be, that while rearranging your inventory you will need to update the equipted array too ....

    It ofc is possible, but as I didnt build it, for me it would be a lot of trial and error before having it work decent.

    There are other inentory systems out there which work more to your liking, but do not have the equiped items thing in it.

  • The thing is, your inventory system was/is already working correct.

    I only added an interface option which allows to drag inventory items to their desired equipment placements. And it works, just like clicking them does. I used the xisting mechanic, I only added 2 events to handle drag start and drag letting go.

    And i added an extra condition where you normally clicked on the equipment slots, with over lap option.

    This effectively makes the function the exact same as clicking it.

    From what it looks like your asking is, after dropping, swap the locations in your inventory ... which imo .. is also kinda useless in the first place as your just reordering your material around in you inventory slots. But the inventory placement, and items system work as it should.

    Heres a problem, your equiped item is tied to the item in your location inventory. You will have to rewrite your array contents if you want to swap them ....

    whats wrong with having the inventory items remain on their position once equiped ?

  • Lennaert Thank you for taking the time to help me out with this issue.

    Do you know how to implement this feature to the slots on the left?

    What im trying to do is once the item is dragging and over the desired slot i wanted the item to swap places with eachother along with the amount.

    Youve created this in the equipment slots and that isnt the slots for my inventory even tho they will be used aswell.

    I dont think that is possible as it would require rewriting almost the entire thing.

    The items on the left, is your inventory. they depict what you have. (horizontal lined squares)

    The items on your right, is your equiped items list, (vertical stacked row)

    Now, if you drag or click your item to the first square in the right row, it means you have THAT item equiped on helmets, while it is still in you left inventory.

    You can change the items equiped,but they will remain on the same spot in your inventory.

    Your inventory has no system to swap spots within your inventory locations and I am not going to make that as it would require rewriting a large chunk.

    Your inventory is actually very advanced, but it looks to me your not understanding it yourself.``

  • lennaert Im not understanding what you mean by"colored items only fit in certain squares"All the squares are the same as the tile size and Im dragging the red block tile over the orange and they are not swapping positions at all.

    It means, the colored items are items with types, like helmets arm and leg plates and body armor.

    The row on the right is a figure, probbly depicting a body: in the top square fits helmet, below that arm plates, torso items then and at the bottom leg items or shoes.

    The red and orange sqaures are helmets, they fit in the top square.

    So you dont have a simply inventory, you have a charatcer item placement shield with small inventory.

    the items lined up on the left is actaully your inventory, what selected on the right, is equiped.

    Havent you noticed, that when you place items in the right side, that the character actually starts wearing it ? look at the helmets for instance, your character then actually wears a red or orange helmet.