Rable's Forum Posts

  • Hello,

    As stated in the title, I'd like to create a customized icon to replace the default NW.js icon.

    I've found this tutorial, which suggest using Format Factory and Ressource Hacker, but the tutorial is nearly 2 years old. Isn't there a more "official" way to create an icon for a NW.js project?

    Thanks in advance!

  • I'm quite confident that the memory is cleared at the beginning of each layout. This has been somewhat hinted by Ashley in this post :

    And as he suggest, you can see it for yourself. Start your game in debugger and look at memory usage. You'll notice that when you switch from one layout to another, memory usage decrease drastically. I learned that the hard way when I needed to optimize my previous mobile game (now I develop for desktop and life is soooooo easier!)

    I guess this indeed implies that putting all the objects on a loader layout is pointless, even harmful as it will delay your loading screen with no purpose.

  • I don't think you are wrong at all! This makes perfect sense and I will have to keep that in mind when designing games.

    Now my current (big) game has only one layout for every fights, so I will have to choose in either having a longer loading time before each fight or having a very slight loading delay when a new object is appearing. At least now I know what are the flaws of each solutions.

    Thanks a lot, this was very interesting and important!

  • This is quite an important information to me, so I need to be 100% sure about it. I've read the posts from Ashley at least 3 times in the past, and I just re-read them just now, and I don't see anything in them that would make me think it is a bad idea to create a layout dedicated to stocking objects. Could you quote the part of the articles which make you think it is?

    I myself am using such a layout in all my project and didn't have had any problem until now. Of course, if it turns out that it is really bad practice, I will change that.

    Actually I already asked the exact same questions nearly one year ago, and the globally admitted reply is that such layouts were good practice.

    (second paragraph is the question)

    Thanks for the information!

  • So I suppose you never decrease the time?

    You can do :

    system > every X seconds (every 0.1 second for example)

    add an action > system > subtract from

    and you subtract 0.1 from your time variable.

    Now your time will decrease by 0.1 every 0.1 second and the code above will work.

  • Hi,

    You probably have a "time" variable in your project. When the player succeed the level just put a new event :

    system > add to > score

    And add the remaining time value to the score.

    You could also enter time*10 or such things.

    Hope it helps! Good luck!

  • One thing you could try is to place a very small invisible object on the border of the ledge, then place precisely the origin of your character object so that it is correctly placed next to the ledge during the climb animation. For example, if your character is hanging to the ledge by his hands, place the origin on the characters' hands for this frame. Then just set the character's position to the invisible object's position as soon as he is attached to the ledge.

    I wouldn't bother to move the character's Y position while he is climbing if you have a climb animation. Adjusting the origin for each frame seems more consistent.

    Good luck!

  • Hi,

    It heavily depend on the type of game you want to make. IMO a local multiplayer is not always more difficult to do than a single player game. For example a one player shmup or 2 players shmup is the same difficulty.

    Is there any built-in templates close to the genre you're looking for in C2? If so, I'd suggest choosing a one-player template and then trying to add a second player.

    Good luck!

  • I would pay for a native export addition, everything same as C2, with native export for PC, iOS, Android and Consoles.

    ps. We still have a broken Linux and MAC export since NWjs is bugged (fails to load, red bar) for those platforms for ages.

    Native or better export options are #1 on my wishlist by far. No way to export to consoles (Wii U excepted) is the biggest C2 flaw IMO.

    Better options for isometric games is #2 (on my wishlist).

  • Thanks for the link. I'll check with the technical guys if this is required.

  • gumshoe2029

    Thanks a lot for your concern, but I don't really need something 100% secure. I use this session ID just to figure out that the score of this game has already been injected in the database sooner. It isn't related to password or anything that need high security.

    But it is very possible that one day I'll need something cryptographically secure, so I'll refer to this post if it happens.

    Thanks again!

  • gumshoe2029

    Thanks for the reply. The CB Hash plugin is pretty close from what I am looking for. But if I understand this plugin correctly (which I may not) it doesn't seem to me that it generates random strings. As you state yourself, it uses a seed and generate a character string based on it, right?

    So if I use random (1000000) as a seed, well... It does the same job as just using random(1000000) as the unique code in my case. I don't necesarilly need to have that code scripted.

    But anyway, thanks for pointing out the CBHash plugin to me. I installed it and it will be useful someday for sure. <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    EDIT :

    If anyone else need to do this, here is what I did :

    On start of layout

    repeat 30 times --> text > append keyboard.stringfromkeycode(floor(random(42)+48))

    set sessionID to text.text

    And now I've got my text variable sessionID with a unique 30 character string composed of any random character chosen from numbers from 0 to 9, letters from A to Z and a bunch of special characters.

    If you need more information about keyboard.stringfromkeycode and stuff, you should look at this excellent tutorial by Waltan :

    https://www.scirra.com/tutorials/739/your-own-textbox

  • Hi,

    I try to have correct placement of text objects but can't manage to make it work properly. My problem is that depending on the browser, the same text will appear differently.

    Here is an image

    And in Opera, the text is much lower than in Chrome

    As you see, the result in Chrome is good, but it's bad in Firefox. The given example uses the Google Font "Roboto". Changing the Horizontal or vertical allignment or hotspot doesn't help?

    Is there any solution to be more precise while using the Text object, or should I go back to sprite fonts?

    Thanks!

  • Hi everyone,

    I'm currently designing a game for which I need to put an online database with highscores. Thanks to ArcadEd 's excellent tutorial, everything went smoothly, but now I face another problem.

    The game exports scores to the database at the end of every level. This means that if you scored 600 points in level 1 and 700 in level 2, your total score will be 1300. However, as the score is send at the end of every level, this single session will export scores of 600 and 1300 for this player. This is problematic because of course I want only one score to be send per game session, not one per level!

    Is there a way to avoid this?

    One way I thought about doing this is to create a random (long) string of characters and add this to the database under "sessionID" so that each session correspond to a single ID and the score is sent to the same place of the database, thus avoiding multiple scores to be send from the same game.

    Is there a better way to do this that you can think of?

    If not... well I have troubles creating this random string of characters (it should use most ascii characters). I should probably make a loop and append a random character at the end of a variable, but is there any way easier to select any random character than having a random number between 33 and 126 and extracting the character corresponding to this ascii code?

    Not exactly sure how to translate this into Construct 2 either... Or maybe is there any string generator out there in the plug ins?

    Thanks for any help!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • EDIT : by analysing your capx I've been able to solve the problem! I previously defined the "char" values in each object's properties in the layout. Despite the fact that the values were correct in the debugger, defining all the values on the start of layout like you did fixed the problem.

    Curious, as doing the same in your capx actually works... I should have missed something here.

    Anyway, thanks a lot!

    ---------------------------

    Hi LittleStain and thanks for the answer.

    • The event is triggered once every few seconds
    • "Do something" is normally a function reducing the character's life, but for test purpose, the knight action just says "delete knight", the archer action is "delete archer" etc... Just to be sure it is triggered or not, and it doesn't.
    • Given the "do something" is just delete the object and that it these objects are never created in the event sheet (they are present on the layout)