On sprites, UPBGE 0.2.5

Hello,

So I just glanced over some old post by BPR showing how to animate UVs through object color and died inside as I realized that I did it through shapekeys for years when a cleaner solution was so obvious. Anyway, I whipped out my calculator, hooked up some math nodes and got the setup working in like ten minutes, easy as goblin pie.

But there is a problem: you have to specify number of columns and rows for each spritesheet, both for the nodegroup that does the UV displacement as well as in logic properties or somewhere else where python can read it to control the animation in the standalone player (so no bpy).

One easy way out? I can add a menu where you register objects as spritesheets, set the values once and then it automatically translates the changes to all other fields. Could make it part of the spritebake thing I wrote forever ago, so finally make it an actual addon.

And so while am at it I guess Iā€™ll just make the ultimate sprite toolbox. Anyone got any other ideas for making spritesheets ā€œeasierā€ to use?

Well @Thatimster has made an addon years ago. Itā€™s behind a paywall tho but here it is:

gpl anyone?

CANCER. Mine will be better and free.

1 Like

Hi! I think the best way would be to make an addon or a system in which you could choose animations and how to play them - as with the action actuator-specify the action and how to play-play to the end, cyclic animation, play with a stop if some condition became false, or use the properties-columns rows and frames then the user will specify what frames he needs this is how gpl scripts work, although the best would be an addon of sprite animation as in other engines-unity/unreal

uhm, addons do not fall under gpl, or what do you mean?

paywall is indeed not my preferred way, but we all need to earn something somehow and thattimster did a lot for the community so he deserves it. If the addon is good or not i cannot say because i didnt use it. But if you can make one thatā€™s free and easy to use then i gonna use it.

addons should be gpl, since they tie into bpy, which is gpl. thats my basic understanding, not sure if something changed since i heard this.

Yes, but donā€™t forget when using game engine the addon will not be included, itā€™s only a tool for us developers to use.

Also if you want to sell the addon then yes gpl is a thing:

Since he leans quite heavily towards non-programmers I really doubt he bothered to obsfuscate the code. But if he did, thatā€™d be against gpl AFAIK.

Iā€™m not against making money, but here itā€™s mostly students and small teams with little to no budget. Trying to profit off of that demographic is effy at best, so nope, timmy gets no love from me.

@Villi89 state based, aye. Thatā€™s what I have in mind.

Off the top of my head, for each action you have:

  1. ā€œin triggersā€ or whatever causes the action to play.
  2. ā€œplaymodeā€ or how the action should play.
  3. ā€œplaydataā€, frame-to-frame duration, hitboxes, active frames and any behaviour associated with that state.
  4. ā€œout triggersā€ or whatever evaluations you want to run by the end of playback

A lot of possible data for each action but youā€™d only use all of it in a worse-case scenario.

Thatā€™s what Iā€™m thinking as I prototype out some UI to test some stuff out. Ugh, having corona was better than understanding this API, Jesus Christ. Must persevere.

i dont have the addon, but id bet its a run of the mill addon, which does fall under gpl. i never said he couldnt sell it, but like that says, you should be able to request the source code free of charge, bypassing the paywall.

often times addon makers will include parts that work past gpl which render the source code useless, or in the case of that ecycles, lock up the usable builds.

in general the blender community supports the addon devs, or simply dont know about gpl. we need to remind everyone that blender is gpl.

Yes, it would be cool to see such an addon, itā€™s a pity the developers of BGE at one time did not make a normal sprite animation system - this would attract a lot of artists who could make models and games at the expense of logic bricks, I remember a long time ago 5 years ago I tried the same scripts playing sprite tiles but they were tied to the material and it was impossible to add the same object to the scene because the animations of such added objects are the same

One would think so, but in this case no, wel for europe that is. If something is behind a paywall and you did not buy it, then you canā€™t request the source, you need to have the addon before you can ask for the source. This is not gpl related but related to the laws of creation(i forgot the correct naming), if he offered the addon for free then you can simply ask for the source.

completely agree

Hi! there are copyright the developers of blender have mentioned it a long time ago - that any blend file is the property of its author even if itā€™s just a cube, the property of the author of the addon, every script for the game engine, and everything that made the artist/programmer in a blender, under gpl that gets compiled under the gpl license in the exe file or invoked from a file, and there are many ways to circumvent the gpl is perfectly legal and not spreading their works and scripts because of the license

Alright, so I spent around the last eight or so hours squeezing my brains trying to find a way to get antialiasing on the opengl viewport render so I wouldnā€™t have to deal with internalā€™s weird-arse habit of ignoring ambient light color, also because I am very much in love with the look of the old upbge viewport.

Well, turns out all I had to do was change engine to blender render -> go to render tab -> anti aliasing -> check ā€œFull Sampleā€. Documenting this for the next poor soul that wonders how.

Now that I know for certain we can get quality images with the opengl render instead of the awful crapfest that is internal not understanding basic bge materials, the possibility is opened up to use 2.7x upbge solely as a rendering engine. Which is the absolute best way to do NPR, bar none.

Tying this back to spritebake: I will leave the option to use internal for anyone who doesnā€™t know whatā€™s good for them, but opengl render will now be the default. Furthermore, since Iā€™ve also discovered that this is very, very convenient for regular animations that have nothing to do with games, Iā€™m also going to work on some automation scripts for doing stuff with the compositor and VSE, like say, rendering each frame multiple times with different settings and/or layers to then combine them for some effect. You know, for completenessā€™ sake.

So forget about gamedev, this is going to be a straight-up GRAPHICS tool, maan!

Very cool - i can ask you - is there a video with the work of your addon? :slightly_smiling_face:

Thereā€™s an old video but Iā€™d rather not link it. Itā€™s not very well done or even thought out :B

And the old version doesnā€™t do much as it is now, just renders an animation to a spritesheet without setting up any logic. No UI; all text, duct tape and prayers. And it uses an old inefficient method to animate the spirites btw so donā€™t use it.

But I guess I should have something to show this week, maybe next. I donā€™t know. Most of the rendering code is similar so I just have to do some cleanup and add a few buttons, but I keep thinking of things I could add and get sidetrack testing them out.

I agree with you - there is no point in posting old videos when it comes to new development, I hope when you finish and the sprites come to life there will be an interesting video - I will wait :smiley: