mindfaQ's Forum Posts

  • new version is 0.3; current number of events: 52

    https://copy.com/f0bvviAvgOE9fiAO

    you can try out the current state at:

    http://strategy-investor.de/mgz10/vnengine/

    what's new?

    • image
    • move
    • set (re/set values of decisions)
    • macro / runmacro (define script snippets that can be reused)

    Some finetuning is needed for the music (thinking about fade out and need to detect if the same piece is already playing, and if it is, it should just continue playing).

    Not sure if positional play is needed for sfx.

    Next things I will be working on:

    • fade out/in for images
    • save / load
    • main menu
    • text history
  • Or:

    on touch start & touching object: start timer once tag "delay" for 3.0 seconds

    on touch end: stop timer tag "delay"

    on timer "delay": do actions

    might not detect when the touch leaves the object though, so might need an additional:

    is not touching object button: stop timer tag "delay"

  • I added new functions:

    https://copy.com/CounHpDqNPCRRyoc

    version 0.2; current number of events: 32

    newly added functions:

    • character
    • background
    • text
    • choice (just noticed a bug there)
    • require
    • goto

    I put in image and move placeholder functions, so the example script pretty much plays through now, just without character images.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • depends on whether you have always the same format or if your system has to work with different formats

    if its always mm:ss, you could for example just calculate

    int(tokenat("4:00", 0, ":"))*60+int(tokenat("4:00", 1, ":"))

  • Very interesting, cool stuff. Performance is my main gripe with Construct 2, too.

  • rexrainbow: yeah your plugins rock. Still I would like to try it with just the standard stuff of Construct 2. Btw is there a way to evaluate with variable names. Your plugin seems to be able to do evaluation, but can I work it in without it? I know there is the javascript execute of the browser object, but how would I use variables from construct there?

    Ofris: one can't expect a fully capable engine in 100 events, but it might work as basis one could expand, yeah. With RenPy there is already a good and simple to use open source VN engine that people can use, so this is just a for-fun project and maybe a few people will find it interesting or educational.

    I started scripting:

    https://copy.com/RXvmGj2ghnW4AO9J

    version 0.1b; number of events: 10

    done so far:

    • reading the script
    • exection of functions

    and added the most simple to implement functions:

    • sound
    • music
    • wait (added this, can't hurt)

    I adjusted the script (fixed a typo) and added the newly added functions at the start so you can see (or rather hear) them in action.

  • different direction: either use a minus in front of every "cycle" you see in the sin/cos formulas OR instead of adding dt to the cycle, substract dt from it.

  • It would work like this.

  • there you go:

    https://copy.com/peH6Upm8jirpoI31

  • Here is a very simple example of how a script file could look (that the engine is supposed to understand / parse):

    character | Carl | c | 100 | 20 | 20 | Arial
    character | Steve | s | 20 | 60 | 100 | Arial
    character | System | none | 100 | 100 | 100 | DejaVu Sans
    
    anchor | start
    music | on | main_music
    background | main_screen
      text | none | Where do you want to go?/nPlease make a choice :).
    # comments and empty lines should be ignored
      choice | scene1 | 1 | I want to go to scene 1. | 400 | 100
      choice | scene2 | 1 | I want to go to scene 2. | 400 | 150
        require | on | scene1 | 1
          goto | scene1
        require | off
        goto | scene2
    
    anchor | scene1
    image | carl_happy | 1 | middle | bottom
    music | off
      text | c | You did it!
    image | carl_suspicious | 1
      text | c | But why am I alone here/n and the background didn't even change. 
      text | c | Hmm, no music playing either... I'll be better getting out of here.
    image | clear | 1
    goto | start
    
    anchor | scene2
    background | scene2
    image | carl_happy | 1 | left | bottom
    image | steve_happy | 2 | right | bottom
      text | s | Awesome!
      move | 2 | middle | bottom | 1
      text | c | You did it! Your decision-making is unparalleled.
      sfx | yeah
      choice | success| 1 | Go back to the main menu. | 400 | 100
    image | clear | 1
    image | clear | 2
    goto | start[/code:30ieovtv]
  • Hi, thanks for your input. Most of the things you mentioned are already in my list under a different "label". Text appearing word by word / instantly / text speed would be contained in the options for text display.

    Conversation record would be history.

    Point and click elements is contained in keep track of decisions (which kind of includes being able to make decisions usually by clicking buttons).

    Navigation would be partly skip function, but I guess there can be additional other navigation tools, too, true.

    Different character sprites for different emotions is contained in simply displaying images.

    Language support should be doable by adding a language selection layout and loading the appropriate script file (each language will have one, then). It would go to advanced tools, which I think I will not manage to put in below 100 events, but let's see.

    For now I thought about the kind of functions I need to do my basic tasks:

    functions:

    character | name | characterid | textcolorR | ~G | ~B | font

    # defines a character

    choice | decision | add | label | positionx | positiony

    # spawn a button that lets you make a choice, if label omitted, it is nonclickable

    require | on/off | decision | value

    # another tool for flow control

    # when "on" the following lines will be ignored, if the value for decision is not equal or greater than value

    # when "off" it will turn off the last requirement, that has been imposed

    text | characterid | text

    # display dialog, maybe we should be able to define default positions like left, right, middle

    # /n for newline

    # text will display and then wait for user click until it continues

    image | imagename | imageid | positionx | positiony | scale

    # load a character image

    # we will add a transparent image with name clear to visually clear the screen

    move | imageid | positionx | positiony | movetime

    # will move the image over move time to position x and y

    background | imagename

    # load a background image

    sfx | filename

    # will play voice or sfx once

    music | on/off | filename

    # will loop a piece of music or stop it

    anchor | id

    # let's you create an anchor (can be the start of a scene, etc.)

    goto | id

    # let's you jump to an anchor

  • result v1.0: https://copy.com/KCTlxMno6FGbhQto

    http://strategy-investor.de/mgz10/vnengine/

    code is not very clear and organized due to trying to stay within the 100 events limitation

    ---

    I will attempt to create a visual novel engine in less than 100 events as a proof of concept. I am not sure if I will succeed though, but I will try <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">. I will add annotations and thoughts on the way. Please bear with me.

    For now, I will try to collect needed features the engine is supposed to be able to do.

    Basic features (have to be in for sure!)

    • main menu with (new, load); this can possibly be worked as a normal game screen
    • import a script file that will tell the game what to do and that can be edited outside of Construct 2 (similar to a RenPy Script maybe, should be kind of human-readable)
    • load images
    • move images
    • display dialog (characters should be able to have differently colored text)
    • display choices for user input
    • keep track of decisions and follow the correct story branch based on that
    • audio (music and speech)
    • simple save and load system
    • an UI

    advanced features (don't have to be inside, but would be nice to have; should be done after all necessary stuff is in the game):

    • transitions
    • history
    • skip function & other navigation (thanks Ofris)
    • options for text display / hud
    • multi language support (thanks Ofris)

    Are there more features, that are needed and I didn't think of?

  • Yeah thought so, but hoped you might have an idea. Will report it to Opera when it persists within the next update of Opera Dev. Thanks.

  • Problem Description

    This time with other browsers (recent versions which I installed and after the test uninstalled again) tested

    I tried the audio effects example of scirra as preview in Opera Developer 29. Clicking on a sfx will start it once and once it's over, no other sounds will be heard again, ever. If I spam click after the first initial click, it will start the sound multiple times, but all the sounds playing will cut off, once the initial sound has finished playing.

    Attach a Capx

    it is in the scirra examples folder

    Description of Capx

    In part it is supposed to start sounds by clicking on buttons.

    Steps to Reproduce Bug

    • browser: Opera Developer 29.0
    • keep clicking on sfx buttons

    Observed Result

    sounds will cut off after initial first sound effect has finished playing

    Expected Result

    sounds continue to work

    Affected Browsers

    • Chrome: no
    • FireFox: no
    • Internet Explorer: no
    • Opera developer 29.0: yes

    Operating System and Service Pack

    Win 7 Home 64bit, fully updated

    Construct 2 Version ID

    r198