XHXIAIEIN's Recent Forum Activity

  • When I think of Egyptian games, the first thing that comes to my mind is Senet, a very ancient tabletop game. Some people say that Senet is the world's first board game.

    I recall seeing some video games before. I don't know if it has anything to do with egyptian, but I think they may have some very similar aesthetics.

    Chants of Sennaar

    store.steampowered.com/app/1931770

    Heaven's Vault

    store.steampowered.com/app/774201

    Egypt: Old Kingdom

    store.steampowered.com/app/646500

    Lost in Art: a Miniature Realm

    store.steampowered.com/app/2900050

    Apotheon

    (Ancient Greek Mythology)

    store.steampowered.com/app/208750

    Assassin's Creed Origins

    store.steampowered.com/app/582160

    (Wait! also thinking of Temple Run, Zuma, Yu-Gi-Oh! )

  • {"is-c3-clipboard-data":true,"type":"events","items":[{"eventType":"block","conditions":[{"id":"on-any-touch-start","objectClass":"Touch"}],"actions":[{"id":"create-object","objectClass":"System","parameters":{"object-to-create":"DrawingCanvas","layer":"0","x":"Piggy.X","y":"Piggy.Y","create-hierarchy":false,"template-name":"\"\""}},{"id":"set-size","objectClass":"DrawingCanvas","parameters":{"width":"Piggy.Width","height":"Piggy.Height"}},{"id":"paste-object","objectClass":"DrawingCanvas","parameters":{"object":"Piggy","effects":"with-effects"}},{"id":"tween-one-property","objectClass":"DrawingCanvas","behaviorType":"Tween","parameters":{"tags":"\"FadeOut\"","property":"offsetOpacity","end-value":"0","time":"0.3","ease":"easeinoutsine","destroy-on-complete":"yes","loop":"no","ping-pong":"no","repeat-count":"1"}},{"id":"set-animation-frame","objectClass":"Piggy","parameters":{"frame-number":"Self.AnimationFrame+1\n"}}]}]}
    
  • You need to use the LocalStorage

    /#open=localstorage-hiscore

    /#open=level-selection

  • You are mixing up the order of the two things you are about to do. You may want to first check if the corresponding userID and password exist in userArray, and if true, stop loop and use localStorage to check the item for this user.

    你可以加QQ群 180911504

  • You need to wait for Check userID to complete asynchronously before use userArray Load data. Just like you add the LocalStorage callback condition below. But you have already done this because you use another array object user_data below. And you don't have any information about AJAX here, so you may have written it wrong.

    And, the user_check function, This loop Array condition, you may need to use it as a sub-condition.

    I don't quite understand whether the two array objects user_data and userArray are the same thing, But what you want to load from LocalStorage is already in the user_data array object.

    中文版回答:

    LocalStorage 是一个异步动作,你需要等待异步完成才能得到请求的数据。不能直接挨着写 userArray 读取数据。要像下面一样: 先检查是否存在,如果存在再获取数据,获取到了再读取。

    不过,你已经是知道了要这么做的,因为你已经在 On item userID get 里面,用另一个数组 user_data Load 到了本地数据。本地数据都在这里面。

    我不是很理解 user_data 和 userArray 这 2 个数组对象是否是相同的东西,但如果你希望从 LocalStorage 中读取存档,再进行遍历数据,你需要将上面的 userArray 的 Load 动作,也放到下面的 On item get 里面。

    或者在中间夹一个 "等待前面异步完成" 动作,然后继续用 userArray 读取数据。然后添加一个子条件,把开头系统循环的事件放在子条件继续执行

  • XHXIAIEIN you mentioned that it isn't optimized. Did you bring that up because you noticed a significant slowdown, especially compared to pasting frames? I thought shifting uvs would be faster.

    Yes, it still uses the full iamge size(216x288) in memory, not the size of a single frame(70x70). If you use more pictures in the future, it is not healthy

    I think a possible optimization method is to pre-process the image after get the strip info. that is, before "LoadStrip()" in this example, cut each frame contained in the Strip, and save it into the animation frame of Sprite. Then use the sprite normally.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is an example of using the advanced random selection of empty positions in a 2D array.

    cdn.discordapp.com/attachments/225550155531812865/1244194000370532365/RandomPickArrayItem.c3p

  • I learn a example by R0J0hound in this post and re-made a example:

    cdn.discordapp.com/attachments/225550155531812865/1285262088108769280/load_spriteStrip.c3p

    This example will load a file containing sprite strip/sheet frames from the project's files.

    Then it will be displayed as a single frame in the game

    noted that: this example is not optimized. You can refer to what R0J0hound mentioned and use the drawing canvas to paste a single frame for better results.

  • WeChat also has two product directions. The other is WeChat Mini Program, which directly provides a webview environment. When C3 releases a mini program, if it does not need to use WeChat's API function, it will not need to do much work to release it.

    // index.wxml
    <web-view src='{{url}}' />
    
    // index.js
    Page({
    	data:{
    		url: "",
    	}
    })
    

    However, WeChat mini programs cannot publish game content, but they can be used to do some tool applications.

  • Does WeChat use a webview with a real browser engine like Chromium or WebKit? Or is it still based on a custom browser engine?

    As far as I know(link), WeChat Mini Games uses Chromium as the WebView rendering layer and V8 as the logic layer on Android. iOS uses WKWebView as the rendering layer and JavaScriptCore as the logic layer.

    However, they did not provide this environment directly, but encapsulated it. In the Android, they use a custom engine XWeb 126 (equivalent to Chromium 126) to rendering.

    The documentation still mentions Chromium 67, which means their staff hasn't updated the documentation for a long long time. All the documentation is very confusing and outdated. It's terrible to read.

    Therefore, the main task is to convert the Canvas API into WeChat's WX Canvas API.

  • I agree, The "Nth" it should be a relative number, not an absolute number.

    We should select the Nth child object of the same type relative to the parent object, rather than a specific one in the entire hierarchical family tree.

    In this (example.c3p), only the first event works, the others do not work as expected.

    I know that the yellow box has 3 blue box child object, so I just need to select the number via 0, 1, 2. Let's go a step. if i want to continue selecting the last red box of this blue, what should I do?

    If I have to save this index manually, It's much easier to use another system comparison condition.

  • I get some callbacks from some functions. I want to send a signal there, then receive the signal via the eventsheet and then continue to do something. But I can't seem to find a interface to do it.

    window.api.sayHello(data => {
     // do something
    });

    Update:

    A new signal() method, as well as waitForSignal() for allowing JavaScript code to also wait for a signal, is now available in r401.

    Now we can do

    window.api.sayHello(data => {
     runtime.signal("")
    });
XHXIAIEIN's avatar

XHXIAIEIN

Member since 26 Mar, 2016

Twitter
XHXIAIEIN has 9 followers

Trophy Case

  • 8-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • RTFM Read the fabulous manual
  • x42
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x10
    Lightning Draw First person to up-vote a new Construct 3 release
  • x9
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

20/44
How to earn trophies