paulscottrobson's Forum Posts

  • If your game or app or whatever is accessing and updating data used in local storage with any frequency it is probably better off in a cache - unless it is multiplayer and more than one person is updating it of course. Once read into a dictionary it can be accessed immediately.

  • Probably you shouldn't use LocalStorage like this. Think of it as a distant store with very slow connections, you don't want to be sending stuff back and forwards all the time.

    Practically I would load a single item at the start and save it back (say) at the end of each game, with all the data json encoded using a dictionary.

  • Okay. I think I've fixed it, basically see http://studio2.org.uk/c2/working.capx. Somewhat butchered so you might want to use it as a basis

    After a lot of experimenting getting nowhere I remembered I had a similar problem in (of all things) Frogger, where I was figuring out continous sprites making up logs and turtles. The problem, I think is when you do xxxx overlapped with xxxx at offset(a,b) it gets mixed up about which xxxx you mean. Inverting this (hence looking for failures and the 15-VA_BITWISE) seems to crack it, along with the foreach action. It doesn't seem to cope well automatically - if you take the foreach out, it doesn't work.

    The problem with this is that it does this on every frame which is a bit heavy on the processor, you may want some sort of invalidate flag in SP_001 so it only picks ones it hasn't already done, if you change an edge for some reason you can mark it invalid.

    Also, you were using self.x-16,self.y in the offset, when it should have been -16,0 (because it's an offset ), I didn't realise for a while.....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not totally clear what's happening here - you are creating this dungeon and then you want each path square in it to be decorated differently depending on what's immediately around it ?

    My instinctive reaction here is you have a sychronisation problem. Would it be better rather than to try to do everything at once, to split it into two very seperate sections of code - firstly build your paths without any edging effects (e.g. the maze builder bit) and then check the directions for each open path to see which decoration to use. It looks like you are trying to do both at once which strikes me as asking for trouble You could put the two parts in seperate source files which would maintain seperation.

    There's a lot of sprites in this as well, but your proc. dungeon is not that densely packed in terms of 'open paths'. It may well be worthwhile using a tiled background for a lot of the default stuff. I appreciate the need for it not to look too cloned, Walls that can blow up etc. could be created dynamically on a seperate layer on top.

  • You are probably mixing the order up. The difference between webstorage and localstorage is you have to wait for responses using events. It can't be thought of like you do an Array etc., it's asynchronous. It's a bit like talking to someone over a very bad phone line.

    If you look here http://myconstruct2dev.blogspot.co.uk/2 ... roids.html and the github link on the page there is a game where it definitely does work <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";-)" title="Wink"> and it's a very simple implementation

  • Hi. I came across this by accident and I have done three (?) of the four ; Pacman, Galaxians and Frogger ; see my blog at http://myconstruct2dev.blogspot.co.uk/ ; I have been cloning (ish) games as a learning experience in C2.

  • That's going to involve hacking WebGL and/or Canvas. There's probably a better way to do it.

  • This isn't difficult, as the event sheets are XML, so all you need to do is parse those files and read them in. A small Python script could do it.

  • I think ifyou run it from https it only asks once.

  • It is possible but usually inadvisable, unless it is something like the picker. Why do you want to do this ?

  • s = ut + at^2/2 in 2 axes.

    I note this is isometric. I would be inclined to calculate it in real world coordinates and then convert to isometric ones.

  • Well, the word you are typing in will have two variables. One is the actual word itself "elephant" (say), the other is the position in the word you are currently at , 4 (say).

    This means you want the fourth letter of elephant (the 'p') which you can compare against the letter that you have typed or clicked on.

    Note, unlike many BASIC type languages, the mid function counts from zero, so mid("elephant",4,1) is "h" *not* "p" as you might expect (e.g. "e" is index 0,"l" index 1 and so on)

  • Yes, I am, mainly to reduce sprite reusage - sprites and sprite fonts are tinted/recoloured. I will give it a go, thanks for your help

  • Thanks - I don't have any 3rd party plugins though, only the ones that come with C2 ?

  • Addendum : I reinstalled C2 and it seemed to make no difference.

    I then had a look at some other games I had recently written, initially they displayed the same problem "sagging text" dropping and at a slight angle. Then, for no apparent reason, one seemed to fix itself, and the problem went away. Briefly.

    It appears that if I load project 1 (the one above) it displays this behaviour, loading project 2 (Frogger clone) it also displays it, but closing and opening and clicking on its title screen makes the effect go away in both projects. The first project works fine from then on, even if I close the second, but if I close and reopen Construct 2 the effect appears again until I load the other project in.

    Which makes the problem manageable, albeit weird.