thePoundation's Forum Posts

  • 11 posts
  • Thanks Rex. Good insight.

  • Yes, thats the one. Thanks for the link to your plugins page, you have alot of problems solved there.

  • Has anyone had experience with Twine integration?

    From my reading it looks to save alot of time on event sheets and layout alternatives with a more optimized interface for designing that kind of logic. I'm reviewing what it will take to make Construct 2 integrate with it and wanted to see if anyone in the community has tried and can offer up any gotchas that might help me consider angles I am not.

    Thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    Im trying to find techniques for making tile based building more dynamic in my games. Most of my games end up having at least one tile based interface or game play so not having to define new tilemaps statically at construct time in each new game would be useful. My technique is to put data uris into an array for each bitmap ( the bitmaps have the tiles ), then run a create function for a map and provide an index in the array to use in the bitmap for the "Load from URL" action. The idea is that I reuse the functional code for creating the tilemap and then tell it what image data from the array to use for its skin/tileset.

    The problem is that for all my tilemap instances, once I run the 'Load from url', it updates all instances with the new load. For example if I had 3 tilemaps and set some tiles into them, whatever I set the tiles to last with 'Load from url', all instances update; even if I create all kinds of convoluted ways to get the specific instance( using instance id, using global vars, using Self, using on Create, using uid, crazy pick all situations, etc. ). No matter what I do all instances update when I load any single instance.

    Is there a way to do what Im trying or is the tilemap class meant to work as multiple instances of a tilemap all of whom share the same bitmap at any given tick?

    Sorry if its a weird question, thanks for any insight.

  • One last post to tie this all together. This is an example using what I did, with R0j0hound's Canvas plugin plus the 'abstract' idea of actually using CGOL for something other than rendering cellular automata. I dont know exactly what I will do with this yet, but sharing for the next person who gets curious, hopefully better with math than I.

    http://a178489.sb2.codeanywhere.net/cgolengine/

    In this example, if you click the red box you will start the generations. You'll start to see some stuff happening in a black-ish box and then see another flickering box in the center that started out as green.

    Whats happening is the generations are ticking away updating the preloaded oscillator pattern. That pattern in that location in the grid creates other distinct phenomenon around it at each change. So I draw the updates into 'plots' in R0j0hound's canvas and read the color data to see if i should update the animation frame or not. When the oscillator is in the 'A' position it will fire a green box, and when in the 'B' a yellow box in another location so that I could also compare both together. This is a simple way that the game engine causes procedural updates through related systems.

    Thanks again to everyone who helped me putter through this lab.

  • Thanks R0j0hound,

    Here's what I have now, it seems to work. Im going to try reverting the for loops back to foreach and see if i just had an error somehow. I added the extra dimension and split the operation in two parts as you did but doing both loops with foreach on the array and using the built in cursor index objects kept giving it strange values. I took foreach out and created nested named loops to get indexes from and now it oscillates as expected.

    I'm very excited to start my actual project now that this 'life engine' works.

  • Yup, looks like my issue was that i conflated the lookup for neighbors with the application of the rules. I did what 'Rhound' did-ish and stored my sum in an extra dimension of my grid so now i can iterate over those values independently. Stupid monkey.

  • Actually I think I have an idea what Im doing wrong. I am trying to process the grid with a foreach. I have a feeling if I make a better loop the weirdness will disappear and i'll have my immortal oscillator as planned mwahahahaha.

    Minor, I tried to load your project but it told me I needed version .91 and seems i can only get .90?

    TiAm, thanks for the source material that canvas plugin is a good tool to have.

    Thanks

  • Wow, thanks everyone for responding; I am very thankful to have so much to review/absorb.

    If anyone cares to point out my error, Im uploading my sample. Its pretty basic, Im not trying to do anything visual yet. You'll want to run it in debug mode so you get the inspector. In there you'll see an object 'boolStates' that has a small grid. You'll see that a set of them are arranged in a line to force a common oscillator pattern. In a single iteration that pattern should reflect across the alternate axis if the algorithm is processing correctly. Since C2 isnt raw code I am trying to work out the order of operation through the event system by having the game's ticking controlled by a toggle on that red square; so you click to start, click again to pause.

    Since the loaded grid has an oscillator the expected behavior is that each tick it reflects and alternates ( my use of reflect and alternate may not be accurate ). Instead what I see is that the form transforms into a static box which then maintains the static state. This would imply that somewhere in the loop the state on a 'neighbor' is inaccurate or I am looking at the neighbors wrong. I assume C2 has to be processing correctly so I feel like 70/30 I have something wonky in my order of operation or 'neighbor' detection.

    Any insight would be great. CGOL is a great way to learn.

    Thanks

  • Hello,

    I tried implementing a basic version of Conway's Game Of Life using a small 6x6 C2 array. Something about the way C2 loops the array in a foreach seems to cause the grid to improperly propagate the standard tests. I can get the statics to work as expected but the oscillators do not, a typical blinker for example transforms to a block in 2 ticks.

    Has anyone out there created CGOL in C2 and willing to take a look at what i have? As best I can tell it has something to do with C2 traversing the y dimensions of an array before the x dimensions. For width N it runs x1,y1 then x1,y2. Its the only thing that seems odd about how its running and like i said the statics work so somehow the transformations have to be looking at the neighbors incorrectly.

    thanks.

  • Hello,

    I have been trying to tweak around with the slider bar control to find the magic recipe to get the CSS to actually update on the page. I've read various topics suggesting different techniques with C2 to 'hack' in some styles but in the end I see the styles applied when inspecting but somehow in the calculations at reflow the styles are wiped and I get the default Slider Bar again. Its a real 'bummer' because this is a nice fast control to build in throttles without messing with Sprites. I'm sorry I dont have screen captures or demo pages to help show the issue, but my steps were pretty default:

    HEAD : "on Start of Layout" event

    ->Slider Bar Set Css Style

    ->->"background-color" : "rgb(150,150,150)"

    I've tried setting IDs and loading css files and such but everytime I see the styles applied in the inspector for the element but in the reflow/recalc the computed values somehow have the styles back to default.

    Thanks.

  • 11 posts