OpenBOR Live Stream Q&A

DCurrent

Site Owner, OpenBOR Project Leader
Staff member
All, assuming my schedule permits, I will open a weekly one hour live stream on YouTube each Wednesday at 12:00 Eastern Time (GMT-5). During the sessions, I will take questions live on a first come, first serve basis. If there are dead periods, I will live code and focus on a specific development aspect. See this post for upcoming and finished streams.

Session I - 2022-03-02 (Closed)

Session II - 2022-03-09

Mario Style Jump Control

OpenBOR 4.0 Feature Preview - Cheats

 
Last edited:
Hi Damon,

About game concepts, I'm wondering how the enemy chooses which attacks he will use between attack1, grabattack, freespecials and duckattack (with no range set).
I suppose that he won't be using duckattack since he's got no specific reason to duck. It seems that he uses his basic attack around 50 pixels distance from the player even it doesn't touch it (that will be great if some of these informations are added to the Openbor Manual next :) ).

My other questions are about the new Openbor engine update: what are the new features that will be integrated to it and if it has a release date?

I'm wondering if you want to share too some technical demo that can help much people here. Ex: the dynamic day/night system or the mode7 of Lucia Run that can open a lot of new possibilities.

Thanks for all your answers 😊
 
Last edited:
Thanks to everyone who watched and participated, I hope it was useful. If there is enough interest I'll try and make this a regular thing and maybe focus on live coding some specific concepts.

DC
 
  • Like
Reactions: ABK
@DCurrent Oh I lost the first live :(

Please, make this a regular thing, it will be very useful for all of us. Your concepts are helping me a lot to code better scripts. The last one about "getentity" used on kimono "vortex" prevented me from creating a bunch of variables.
 
@DCurrent Oh I lost the first live :(

Please, make this a regular thing, it will be very useful for all of us. Your concepts are helping me a lot to code better scripts. The last one about "getentity" used on kimono "vortex" prevented me from creating a bunch of variables.
lol, you didn't miss much. It was kind of a mess really, I even somehow screwed up the feed so you can't see the questions people were asking. I'll try to do better next time around.

DC
 
It was interesting @DCurrent your less intimidating in person lol. Only feedback is make sure the text is big and readable when displaying code. are these available offline or once you miss them there gone ?

When you were answering my question my wife came back from work and needed my help so I missed half the answer.
 
your less intimidating in person lol

That's funny because I don't consider myself intimidating at all, but people who actually meet me in real life often tell me I'm outright frightening. I have no Idea why. It's not like I'm a huge guy or anything (183cm, 90kg), and unless someone goes out of their way to test my patience I try to never be aggressive.

In any case, making myself more approachable was the whole point. I know my answers here can seem harsh at times when I don't mean them that way, so I hoped a live chat would help some.

Only feedback is make sure the text is big and readable when displaying code. are these available offline or once you miss them there gone ?

The stuff I typed today is gone, but I didn't show anything that isn't already available elsewhere. Next time I'll try to make sure it's big enough to read, and if I write anything new I'll make it available as a Gist.

DC
 
@DCurrent you mentioned users dont know the difference between a real crash and a engine error well how about we have a error screen repoting the issue and press any key to shut down. This will be very useful when modding you wont have to keep diving into the logs and all other users will know why they are getting a crash too so they can easily report it to the developer.
 
@DCurrent you mentioned users dont know the difference between a real crash and a engine error well how about we have a error screen repoting the issue and press any key to shut down. This will be very useful when modding you wont have to keep diving into the logs and all other users will know why they are getting a crash too so they can easily report it to the developer.
I like this idea. I'm not sure how quickly I can implement it, but will definitely take a look.

DC
 
Thanks DC for your online explanations, that was very interesting and useful :) . Yet, I'm afraid that the answers given will be difficult to find if they are not listed somewhere like on the forum or the manual.
That's very kind to you to taking time to respond to some questions ;) .
 
@DCurrent you have to help me out here this is driving me crazy. How do I cancel left and make the the input down ?

file: "data/scripts/inputall.c"
C:
//#include "data/scripts/scripts.c"
#define OBC  openborconstant
#define GEP  getentityproperty
#define CEP  changeentityproperty
#define SLV  setlocalvar
#define GLV  getlocalvar
#define GEV  getentityvar
#define SEV  setentityvar
#define GLP     getlevelproperty
#define CLP     changelevelproperty
#define OBV  openborvariant
#define COBV changeopenborvariant
#define GPP  getplayerproperty
#define SGV  setglobalvar
#define GGV  getglobalvar
//#define self GLV("self")

void main()
{//All players Inputscripts
    void self = GPP(GLV("player"),"entity"); //Get calling entity
    int playerIndex = GLV("player"); //Get player by index
    int left = playerkeys(playerIndex, 1, "moveleft"); //New key status of "left"

if(left)
    {
        changeplayerproperty(playerIndex, "newkeys", 0);
        playerkeys(playerIndex, 1, "movedown");
    }   
}
 
@DCurrent
Thanks for all your explanations in the live, this was very enlightening.

It's very useful, thanks man.

In addition, in case you make another live, below are the questions I have about the update scripts.
It has a similar format as the questions about variables, but focused on reducing both memory and cpu usage.

2) Updated.c / Update entity / Update level / Ondraw / Think scripts (Maybe should I add onmove scripts too?)
- Advantages and disadvantages of each.
- Which saves more cpu?
- Examples of the correct usage to save cpu.
- Is there a problem if I'm using all these events to draw a lot of content to the game?
- Why are most people always avoiding using them?
 
@Kratus you will have no issues with the windows or linux ports but when you try running games on a PSP (333mhz cpu) or a Wii (700mhz cpu) or even a low end android device then you will see the performance hit.

@DCurrent you made a tutorial on how to use bitwise keyscripts I have searched and searched I can not find it on the forum.
 
Last edited:
@DCurrent I copied your script but its not working for me.

C-like:
void main()
{
    int player_index = getlocalvar("player");

    int key_hold = getplayerproperty(player_index,"keys");

    if(key_hold & openborconstant("FLAG_MOVELEFT"))
    {

        key_hold ^= openborconstant("FLAG_MOVELEFT");

        key_hold |= openborconstant("FLAG_MOVEDOWN");
    }

    changeplayerproperty(player_index,"keys",key_hold);
}
 
@msmalik681:

Sorry, I assumed you were using a prototype build. I added inputall in revision 6989.

Bit operators were always around, and I'll try to explain some of it when I can. In the meantime, just google bitwise logic and you'll find tons of info. The only difference in OpenBOR script is we don't have the ~ operator. I think @Plombo said something about adding it, but don't recall. We have the other operators.

@Kratus:

Updates are not inherently bad at all. Like most things, it's just how you use them. I'll make that a topic for the next scheduled session.

DC
 
@Kratus you will have no issues with the windows or linux ports but when you try running games on a PSP (333mhz cpu) or a Wii (700mhz cpu) or even a low end android device then you will see the performance hit.
@msmalik681
Yeah man, it's true. In Windows port I have no problems, but I'm making some game for other peoples and they want to run on low hardware devices like PSP, Wii, Android and Dreamcast (for this one, some Ian Micheal tips helped me a lot).

I had a bad experience in the past year when I finished a game with a lot of ondraw/update scripts and then the customer asked for a Dreamcast port, unfortunately I had to redo the whole project to optimize most possible and reduce the memory/cpu usage.

The idea is to develop in a Windows port with already all optimizations, and then it will be easier if someone asks for a port for low hardware devices.

@Kratus:

Updates are not inherently bad at all. Like most things, it's just how you use them. I'll make that a topic for the next scheduled session.

DC
@DCurrent Thanks, it will be very helpful.

About the inputall, I tested and can confirm that it works in prototype builds, like the 7123 I'm currently using on SOR2X. To be honest, it opens a ton of customization options specially on menus. @msmalik681 Thanks for bringing this question to the last live.

Man, you have no idea of how many variables you are preventing me from creating by using the last "getentity" tip, a lot of thanks for that. I'm using this method to identify random alive entities in real time that meet some defined requirements.

My old method is based on creating global variables at the "onspawn" event to store specific entities for further use, in case two or more entities have no other connections like the "parent" property.
 
Back
Top Bottom