Visionaire Studio 4.2.5 Released

  • #80, z HelixAbyssThursday, 17. December 2015, 22:13 hodinky 9 years ago
    Now that I'm on break I installed the update. Everything ran just fine without modifying anything (except for one little thing is a bit off which I'm working on fixing now). Although, I tried adding borders to one of my fonts and the game completely froze up as soon as text in that font was supposed to display. Should I make a thread about this?

    edit: I tried copying the keyboard control code from page 2 into a definition script and it isn't working for me... the arrow keys cause the character to change direction but not move. I feel like I missed something..

    Bažant

    24 Posts


  • #81, z afrlmeSaturday, 19. December 2015, 16:39 hodinky 9 years ago
    Now that I'm on break I installed the update. Everything ran just fine without modifying anything (except for one little thing is a bit off which I'm working on fixing now). Although, I tried adding borders to one of my fonts and the game completely froze up as soon as text in that font was supposed to display. Should I make a thread about this?

    edit: I tried copying the keyboard control code from page 2 into a definition script and it isn't working for me... the arrow keys cause the character to change direction but not move. I feel like I missed something..


    I ended up with the same result when I tried pasting in the script. Character would rotate but not move. When I tried it in the old demo game that came with the free version of 3.7.1 it worked as it was supposed to.

    Imperátor

    7285 Posts

  • #82, z HelixAbyssSaturday, 19. December 2015, 22:29 hodinky 9 years ago
    I ended up with the same result when I tried pasting in the script. Character would rotate but not move. When I tried it in the old demo game that came with the free version of 3.7.1 it worked as it was supposed to.


    I went to try something similar, but for some reason the demo game was not there, so I used another game I had downloaded from here (Fantasy Quest) and threw the code into that. Had some very strange results, the keyboard control worked some of the time but if I wandered into certain areas it went back to just controlling the direction of the character. I examined the waysystem and action areas to see if anything lined up with where the character stopped moving and I just can't find any patterns. I went through my own game and tried the keyboard at various places in each scene to see if I could figure anything out but it never worked.

    Should I make a post about this in bugs? It seems like the new functions aren't working as they should and this is pretty important to me... several of the scenes in my game were designed to be navigated with the keyboard and it's a little awkward using the mouse.

    Bažant

    24 Posts

  • #83, z afrlmeSaturday, 19. December 2015, 23:58 hodinky 9 years ago
    The script provided is just one script. I don't know if Simon spent a while on perfecting it or whether he just wrote it as a quick example. Personally I think it's more of a basis point for you (whoever) to write & improve on.

    As for why it's not always working... I'm not sure if it has something to do with the way you create your characters walk animations, as there is option for sliding between frames or update position on each new frame. There's also things like movement offset, speed & displacement to take into account as well as the way system & action area stuff.

    I think in time that Simon will probably come up with a less buggy way of controlling characters with keyboard &/or gamepads.

    Imperátor

    7285 Posts

  • #84, z HelixAbyssSunday, 20. December 2015, 00:19 hodinky 9 years ago
    Thanks AFRLme, I'll play around with some things and see if I can get it working. It's not the end of the world if I have to keep mouse control only for now, at the rate development is going for my game there will probably be a proper way to get keyboard control working by the time I finish, haha!

    edit: Ok one more thing I just noticed. So I opened up that other project that partially worked with the keyboard control and started messing around, and I am able to walk outside of the way border in some places when I use the keyboard. Not super far outside, but far enough that the character's hotspot is clearly beyond the way border.

    edit2: I'm so sorry for going on and on about this, I'm hoping to figure this out and hopefully help anyone else having similar issues. So, after advancing to the next scene in this game, the keyboard control started working perfectly, even after returning back to the first scene. No more issues with walking off the border. This is too weird. Ok one final addition, it wasn't the returning to the scene, it was the fact that at the end of the scene the waysystem changed to one that has a "hole" in the way border (because of an area that can't be walked over) I just didn't test the keyboard control at that poin. So it turns out having a hole in the wayborder caused things to start working, I tested this on my own game and sure enough, it started working.

    Bažant

    24 Posts

  • #85, z UraalMonday, 21. December 2015, 20:53 hodinky 9 years ago
    Heyas, I recently downloaded the new version of Visionaire to test it out. What does "Spine" support mean exactly? We can now use Spine atlas + JSON as an animation file directly? If so, how you do that?

    Bažant

    93 Posts

  • #86, z afrlmeMonday, 21. December 2015, 22:57 hodinky 9 years ago
    I think Simon or David posted some examples of how to use it somewhere in this thread.

    Imperátor

    7285 Posts

  • #87, z TinTinThursday, 07. January 2016, 17:21 hodinky 9 years ago
    Hey guys,

    here a script for walking with the arrow keys and gamepad:
    local mouse_x = 0
    local mouse_y = 0
    local charmove_x = 0
    local charmove_y = 0
    
    function keyboardHandler(eventType, character, keycode, modifiers)
    	if eventType==eEvtKeyUp then
    		print('key up: ' .. keycode)
    		keycode = keycode % 1073741824
    		if keycode == 80 then -- left
    			charmove_x = 0
    		elseif keycode == 79 then -- right
    			charmove_x = 0
    		elseif keycode == 81 then -- down
    			charmove_y = 0
    		elseif keycode == 82 then -- up
    			charmove_y = 0
    		end
    		createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y},25)
    		
    	elseif eventType==eEvtKeyDown then
    		print('key pressed: ' .. keycode)
    		keycode = keycode % 1073741824
    		if keycode == 80 then -- left
    			charmove_x = -100
    		elseif keycode == 79 then -- right
    			charmove_x = 100
    		elseif keycode == 81 then -- down
    			charmove_y = 100
    		elseif keycode == 82 then -- up
    			charmove_y = -100
    		end
    		createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y},25)		
    	elseif eventType==eEvtControllerKeyUp then
    		print('controller up: ' .. keycode)
    		if keycode == 1000001 then --controller key A up
    			createEvent('eEvtMouseLeftButtonDown')
    			createEvent('eEvtMouseLeftButtonUp')
    --			createEvent('eEvtKeyDown',{x=0,y=0},eKeyEscape,0)
    		end
    	elseif eventType==eEvtControllerKeyDown then
    		print('controller down: ' .. keycode)
    		if keycode == 1000001 then --controller key A down
    		end
    	elseif eventType==eEvtControllerAxis then
    		if string.match(character, 'RIGHTX') then
    			mouse_x = keycode
    			createEvent('eEvtControllerAxisMouseMove', {x=mouse_x, y=mouse_y}, 19, 9)
    		elseif string.match(character, 'RIGHTY') then
    			mouse_y = keycode
    			createEvent('eEvtControllerAxisMouseMove', {x=mouse_x, y=mouse_y}, 19, 9)
    		elseif string.match(character, 'LEFTX') then
    			charmove_x = keycode
    			createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y}, 25)
    		elseif string.match(character, 'LEFTY') then
    			charmove_y = keycode
    			createEvent('eEvtControllerAxisCharacterMove', {x=charmove_x, y=charmove_y}, 25)
    		end
      	end
      return false
    end
    
    registerEventHandler('keyEvent', 'keyboardHandler')
    


    By the way, we have 3D Model file now for objects.


    Nope just Spine.

    Shaders or something else?


    I've updated the shader script accordingly: http://wiki.visionaire-tracker.net/wiki/Shader_(CMS)

    The quality of the zooming is better now and you have interactivity.
    I'm sorry guys, but no action parts yet. It's high up on my list.

    Any info on how to use spine with visionaire? How do I implement it?


    Load the json-file with the path control on the bottom for objects or with 3d model file path control at character settings. Then add animations, go to animation settings and select the animation. If you want to use multiple spine files for a character you need to use a json file that links to them like this:

    {
      "multiplexer":"",
      "skins": [],
      "files": [
        {
          "name": "PARTS/B_default/aliena_B.json"
        },
        {
          "name": "PARTS/DB_default/aliena_DB.json"
        },
        {
          "name": "PARTS/F_default/aliena_F.json"
        }
      ]
    }
    



    It's great script for keyboard character movements but unfortunately it doesn't support slopes.I know it's so complicated but if is any way for it I'm appreciate for any help.
    Thanks

    Fanoušek fóra

    196 Posts

  • #88, z afrlmeThursday, 07. January 2016, 18:48 hodinky 9 years ago
    You would need to create states (FSM) to check the ground terrain. You could create some action areas inside the way system for each scene. Then you can update a state (lua variable, condition or value) to determine what the walk script should do.

    Yes it is complicated because you also need to check the direction the character was facing when they entered the action area (sloping down or up, etc).

    Visionaire Studio is certainly not Game Maker Studio when it comes to creating collision detection, creating slopes, rotating characters or complicated movement. It was never intended for it, so you will have an hard time trying to create something more akin to an action platformer than a point & click game.

    Imperátor

    7285 Posts

  • #89, z SimonSThursday, 07. January 2016, 20:30 hodinky 9 years ago
    What do you mean with slopes ?

    Kapitán

    1582 Posts

  • #90, z afrlmeFriday, 08. January 2016, 01:00 hodinky 9 years ago
    I think he means like in Game Maker where you can create hills & when physics are enabled the character could rotate when colliding with an hill & slide down the hill if the player lets go of the movement keys.

    https://www.youtube.com/watch?v=1r1rElIiWqw

    Imperátor

    7285 Posts