omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    need some criticized input please.

    Pythonista
    pythonista rpg game dev 2d assets
    3
    34
    9543
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • stephen
      stephen @Drizzel last edited by stephen

      @Drizzel THANK YOU this is exactly the kind of respone im hoping for from anyone who participates 😊🤓

      ys im having to do all aspects of this game, programing, art, dialouge, quest lines ect... but on my way im going to also be giving back to the community "barebone" scripts to help others. like openworld even handler, quest system, combat system ect...

      im going to look into your suggestions and ill post updated concepts for public reviewthank you!

      ##updated..

      and the reason for some of the extra detail, not counting tiny scratches, is compensation for resizing they start out as 4000pxx4000px and after processing they end up around 150ptx150pt the process i use is actually prety effective heres a example of a 6kx6k down to 1kx1k

      HD 6k to 1k

      1 Reply Last reply Reply Quote 0
      • Drizzel
        Drizzel last edited by

        Did you draw them on an iOS device? If yes, which app did you use? I'm rather intrigued because Vectornator (what I'm using) is good, but certainly not perfect.

        stephen 1 Reply Last reply Reply Quote 0
        • cvp
          cvp @stephen last edited by

          @stephen said:

          my problem with that is i need them to be scene.Textures..

          You can convert a sgv to an ui.Image via

          
          import os
          import ui
          
          w = ui.WebView()
          fpath = os.path.expanduser('~/Documents/test.svg')
          w.load_url('file://'+fpath)
          w.present('sheet')
          
          with ui.ImageContext(w.width, w.height) as ctx:
          	w.draw_snapshot()
          	ui_image = ctx.get_image()
          ui_image.show()
          
          stephen 2 Replies Last reply Reply Quote 0
          • stephen
            stephen @cvp last edited by

            @cvp dos this preserve alpha?

            cvp 1 Reply Last reply Reply Quote 0
            • stephen
              stephen @Drizzel last edited by

              @Drizzel said:

              Did you draw them on an iOS device? If yes, which app did you use? I'm rather intrigued because Vectornator (what I'm using) is good, but certainly not perfect.

              on iPad Air2
              sketch
              Draw
              vectornator

              most of it is hand painted and with Draw you can use brushes to draw vectors but vectornator give beter control of the vertices.. and the export scaling helps alot
              y process for drawing usually goes...
              Adobe Sketch ⇒ AdobeDraw for base structure
              Adobe Draw ⇒ Adobe Sketch for detailing
              Adobe Sketch ⇒ Vectornator for finalizing and export.

              you can also save to creative cloud on vectornator to combine all three for pretty good workflow

              1 Reply Last reply Reply Quote 0
              • cvp
                cvp @stephen last edited by

                @stephen said:

                dos this preserve alpha?

                No idea at all. I just thought a little time to find a solution svg -> ui.Image

                1 Reply Last reply Reply Quote 0
                • stephen
                  stephen last edited by

                  @cvp thank you! when i get back to the animation system ill rewrite the texture cache and see if i can get that to work

                  1 Reply Last reply Reply Quote 0
                  • stephen
                    stephen @cvp last edited by

                    @cvp said:

                    @stephen said:

                    my problem with that is i need them to be scene.Textures..

                    You can convert a sgv to an ui.Image via

                    
                    import os
                    import ui
                    
                    w = ui.WebView()
                    fpath = os.path.expanduser('~/Documents/test.svg')
                    w.load_url('file://'+fpath)
                    w.present('sheet')
                    
                    with ui.ImageContext(w.width, w.height) as ctx:
                    	w.draw_snapshot()
                    	ui_image = ctx.get_image()
                    ui_image.show()
                    

                    all i get is a white rect from this 😕

                    cvp 2 Replies Last reply Reply Quote 0
                    • cvp
                      cvp @stephen last edited by

                      @stephen For me it is ok for a static svg but white rectangle if animated svg, what you did not yet ask at this moment 🙄

                      stephen 1 Reply Last reply Reply Quote 0
                      • cvp
                        cvp @stephen last edited by cvp

                        @stephen UIWebView does not support animated svg but SFSafariViewController does

                        See my script and for instance

                        	main('https://codyhouse.co/demo/animated-svg-icon/index.html') 
                        
                        1 Reply Last reply Reply Quote 0
                        • stephen
                          stephen @cvp last edited by

                          @cvp

                          here is the same file im testing with. and the mage should have transparency

                          cvp 1 Reply Last reply Reply Quote 0
                          • cvp
                            cvp @stephen last edited by cvp

                            @stephen increase the frame and it is ok

                            import os
                            import ui
                            
                            w = ui.WebView()
                            w.frame = (0,0,500,500)
                            fpath = os.path.expanduser('~/Documents/svg-test.svg')
                            #fpath = os.path.expanduser('~/Documents/test.svg')
                            w.load_url('file://'+fpath)
                            w.present('sheet')
                            
                            with ui.ImageContext(w.width, w.height) as ctx:
                            	w.draw_snapshot()
                            	ui_image = ctx.get_image()
                            	ui_image.show() 
                            

                            stephen 1 Reply Last reply Reply Quote 0
                            • stephen
                              stephen @cvp last edited by

                              @cvp

                              awesome didnt think about the frame. but sadely i seem to lose the alpha transparency. im sure i can go through the process of adding one but at that point id have to change format and then i lose the perks of vector graphics. plus id have to run the add alpha process to a library of images for the game and that seemsnlike a bad idea lol. thank you tho for checking it out for me 😊

                              cvp 1 Reply Last reply Reply Quote 0
                              • cvp
                                cvp @stephen last edited by

                                @stephen transparency works

                                import os
                                import ui
                                
                                v = ui.View()
                                v.frame = (0,0,500,250)
                                v.name = 'with or without opacity=0'
                                
                                w1 = ui.WebView()
                                w1.frame = (0,0,250,250)
                                html = '''
                                <?xml version="1.0" encoding="utf-8"?>
                                <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
                                <svg xmlns="http://www.w3.org/2000/svg" width="304" height="290">
                                	<path d="M2,111h300 l-242.7,176.3 92.7-285.3 92.7,285.3z"
                                	fill="#FB2" stroke="#B00" stroke-width="4" stroke-linejoin="round"/>
                                </svg>
                                '''
                                w1.load_html(html)
                                v.add_subview(w1)
                                
                                w2 = ui.WebView()
                                w2.frame = (250,0,250,250)
                                html = '''
                                <?xml version="1.0" encoding="utf-8"?>
                                <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
                                <svg xmlns="http://www.w3.org/2000/svg" width="304" height="290">
                                	<path d="M2,111h300 l-242.7,176.3 92.7-285.3 92.7,285.3z"
                                	fill="#FB2" stroke="#B00" stroke-width="4" stroke-linejoin="round" fill-opacity="0"/>
                                </svg>
                                '''
                                w2.load_html(html)
                                v.add_subview(w2)
                                
                                v.present('sheet')
                                
                                #with ui.ImageContext(w.width, w.height) as ctx:
                                #	w.draw_snapshot()
                                #	ui_image = ctx.get_image()
                                #	ui_image.show() 
                                

                                1 Reply Last reply Reply Quote 0
                                • stephen
                                  stephen last edited by

                                  @cvp ya you are creating the opacity programaticaly (if thats the right term here lol ) where in my image it is solid where it should have a 50% alpha that i set in third party editor.

                                  cvp 2 Replies Last reply Reply Quote 0
                                  • cvp
                                    cvp @stephen last edited by

                                    @stephen I don't know anything about it but it is only to show that WebView supports opacity in static svg...

                                    1 Reply Last reply Reply Quote 0
                                    • cvp
                                      cvp @stephen last edited by cvp

                                      @stephen how are sure that your file test-svg.svg is half transparent?

                                      1 Reply Last reply Reply Quote 0
                                      • stephen
                                        stephen last edited by

                                        gotcha thank you @cvp 🙃

                                        cvp 1 Reply Last reply Reply Quote 0
                                        • cvp
                                          cvp @stephen last edited by cvp

                                          @stephen sorry, I don't understand What you mean

                                          1 Reply Last reply Reply Quote 0
                                          • stephen
                                            stephen last edited by

                                            @cvp
                                            its ok buddy i had done some research before (you probably know by now how i love research lol) and i couldnt find a way to use svg in scene. im sure there is an objc way but im not familier enough there lol

                                            cvp 3 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Powered by NodeBB Forums | Contributors