Hola,
small post
I've added ShowEquipScreen event step.
It's a pretty simple event step with no parameter.
It's use is to show the equip interface and it's meant only for that.
In fact items that are not equippable are not shown.
This is useful if you need to change equipment mid-event
For example the slave might be unconfortable in her current dress and ask to be dressed differently before going out.
Remember the previous post about outlaw public nudity?
In that event if a guard stop you will ask to redress the slave before giving you a fine.
He gives you 3 warning if at the third the slave is still nude you will be forced to jail.
Bye bye!
Showing posts with label technical. Show all posts
Showing posts with label technical. Show all posts
Monday, August 1, 2016
Saturday, February 27, 2016
Parse R.I.P.
ACHTUNG! Technical post ahead
I really like Parse and it is the backend used for XMaker and RPGAutoCAT (For feedback)
It is ultra simple to use, the sdk is very well written and very explorable.
It is free for small amount of requests ( my case ).
It looked like it was going very well for the parse team.
And then:
An Important Announcement.
Parse's hosted services will be fully retired on January 28, 2017. We're proud that we've been able to help so many of you build great mobile apps. Read more on this announcement and what this means for your app here. Thank you for using Parse.
This is what is shown on parse site as of 28 january.
:(
When I received the email saying they were shutdown I was like:
What?
It was really unexpected.
(
For whoever is still reading and don't know what's Parse.
Parse is a Baas (Backend as a service). To make it really simple it's a database in the internet.
History in a nutshell:
Parse started as a startup, it was then bought by facebook in 2013, it continued good for a couple of years and now it's dying.
)
Anyway, now I need to explore other Baas, there are a lot and at the moment they look all bad compared to Parse (SDK wise).
I'll already experimented a bit with app42 cloud it seems, uhm decent, but there are already problem that make me think about the stability of the system.
In fact, making a request make the app crash if there's no internet connection...
This is only an issue with asyncronous request, with syncronous I can catch the exception and continue normally.
Anyway, after having these horrible experience (I'm still shaking for Parse departure), I decided to abstract the Baas out. Baas and XMaker now reside in different assemblies and interact through another assemblies which is just an interface over the Baas.
This should make switching baas pretty easy in case of other surprises...
Sunday, January 17, 2016
Finally an If else that make sense
Okay,
this is a continuation to the previous post.
I wasn't happy with the IfElse element.
At start I was trying to decide whether it was better to let ifelse as it was or change it for this:
<If Expression="true">
<SetText>I will be displayed</SetText>
<Else>
<SetText>I won't be played</SetText>
</Else>
</If>
I'm still not sure this is better than the <IfElse> I described in the previous post.
So, I looked at how Slave Maker does it.
Here's a short excerpt:
<if gender='2'>
<Question event='CockOutOfHole'>Ask for a cock</Question>
<else>if</else>
<Question event='CockOutOfHole'>Ask for a cock</Question>
<Question event='CockIntoHole'>Stick cock into the hole</Question>
</if>
Well...
This, from my point of view, made even less sense than mine...
So, finally I decided to go with the normal way of doing an if else.
Here's the final version (I think) version:
<If Expression="false">
<SetText>I wont be displayed</SetText>
</If>
<Else>
<SetText>I will be displayed</SetText>
</Else>
I had to make a little more work since this was the first time I had to treat two sibling xml nodes as "one step"
Before all elements were evaluated singularly.
Anyway this gave me the opportunity to make an ElseIf too.
<If Expression="false">
<SetText>I wont be displayed</SetText>
</If>
<ElseIf Expression="true">
<SetText>I will be displayed</SetText>
</ElseIf>
<Else>
<SetText>I wont be displayed</SetText>
</Else>
Yay!
I'm pretty happy with this, since it's a lot more natural than the previous solutions.
this is a continuation to the previous post.
I wasn't happy with the IfElse element.
At start I was trying to decide whether it was better to let ifelse as it was or change it for this:
<If Expression="true">
<SetText>I will be displayed</SetText>
<Else>
<SetText>I won't be played</SetText>
</Else>
</If>
I'm still not sure this is better than the <IfElse> I described in the previous post.
So, I looked at how Slave Maker does it.
Here's a short excerpt:
<if gender='2'>
<Question event='CockOutOfHole'>Ask for a cock</Question>
<else>if</else>
<Question event='CockOutOfHole'>Ask for a cock</Question>
<Question event='CockIntoHole'>Stick cock into the hole</Question>
</if>
Well...
This, from my point of view, made even less sense than mine...
So, finally I decided to go with the normal way of doing an if else.
Here's the final version (I think) version:
<If Expression="false">
<SetText>I wont be displayed</SetText>
</If>
<Else>
<SetText>I will be displayed</SetText>
</Else>
I had to make a little more work since this was the first time I had to treat two sibling xml nodes as "one step"
Before all elements were evaluated singularly.
Anyway this gave me the opportunity to make an ElseIf too.
<If Expression="false">
<SetText>I wont be displayed</SetText>
</If>
<ElseIf Expression="true">
<SetText>I will be displayed</SetText>
</ElseIf>
<Else>
<SetText>I wont be displayed</SetText>
</Else>
Yay!
I'm pretty happy with this, since it's a lot more natural than the previous solutions.
Friday, January 15, 2016
new event step: IfElese
Warning: Somewhat technical post
During the writing of various event I always found myself writing if but till now I never had a if else.
I simulated the ifelse using the Switch event step like this:
<Switch Expression="[Trainee.Mind.Purity.Slut]">
<Case Value="true">
<SomeEventStep/>
</Case>
<Case Value="false">
<SomeEventStep/>
</Case>
</Switch>
It does work but it feels strange to me using a switch for doing so.
So I finally decided to add a IfElse.
The previous example became:
<IfElse Expression="[Trainee.Mind.Purity.Slut]">
<Composite>
<SomeEventStep/>
</Composite>
<Composite>
<SomeEventStep/>
</Composite>
</Switch>
Unfortunately xml doesn't make it much better then the previous version but at least now you don't have to specify the Value="true".
IfElse must have two child, the use of a <Composite> is only if you have to specify more than one event step.
Using a IfElse kinda feels better than the switch but I'm still evaluating other solution, since this doesn't feel too natural...
During the writing of various event I always found myself writing if but till now I never had a if else.
I simulated the ifelse using the Switch event step like this:
<Switch Expression="[Trainee.Mind.Purity.Slut]">
<Case Value="true">
<SomeEventStep/>
</Case>
<Case Value="false">
<SomeEventStep/>
</Case>
</Switch>
It does work but it feels strange to me using a switch for doing so.
So I finally decided to add a IfElse.
The previous example became:
<IfElse Expression="[Trainee.Mind.Purity.Slut]">
<Composite>
<SomeEventStep/>
</Composite>
<Composite>
<SomeEventStep/>
</Composite>
</Switch>
Unfortunately xml doesn't make it much better then the previous version but at least now you don't have to specify the Value="true".
IfElse must have two child, the use of a <Composite> is only if you have to specify more than one event step.
Using a IfElse kinda feels better than the switch but I'm still evaluating other solution, since this doesn't feel too natural...
Thursday, April 2, 2015
Working on the inventory system
Ahoy, yarrr.
Why the pirate sounds, you might ask.
Well, yes, as you probably was thinking, the reason for that is totally random.
Anyway, I'm now working on a inventory system.
It's not the first time I try to model a item system and I remember that I always struggled to that.
But this time seems to be going in an interesting way.
All thanks a post I've found in some forum were people were talking about how to make a inventory system.
Well, I show you how it's now (it's a bit crude but it's just to show how the interaction goes).
Now, for the technical part. How the Inventory system actually work.
Earlier I said I read the post. That post actually kinda opened my mind.
One of the people told to just make a base class Item and then subclass to make more specialized items.
E.g. Item -> EdibleItem -> Cake
That's was my idea at first, but then someone wrote something like this:
Instead of subclassing you should think an Item as a set of feature.
BOOM. That blow my mind.
Long story short, items in game are substantially just a named container for action you can do with them.
For example the bra we have seen in the images is an Item named bra, which contains an action named Equip. The Equip action when called move the item to the slave inventory and equip it.
This let me attach behaviour to the object freely.
Next thing I'm gonna do is to create some kind of store in the game and add a Sellable action for the items.
Okay, that's to much for one post, so see you next time YAAAARRR
Why the pirate sounds, you might ask.
Well, yes, as you probably was thinking, the reason for that is totally random.
Anyway, I'm now working on a inventory system.
It's not the first time I try to model a item system and I remember that I always struggled to that.
But this time seems to be going in an interesting way.
All thanks a post I've found in some forum were people were talking about how to make a inventory system.
Well, I show you how it's now (it's a bit crude but it's just to show how the interaction goes).
1. The inventory will show both the player and the slave inventory.
2.Clicking on an item will open a context menu which can have 1 or more actions. For example: Equip, Use, Sell... In the example here bra is a dress and so can be equipped.
3. Selecting Equip will move the item to the girl inventory and equip it (as you can see by the subtle white under the top)
Now, for the technical part. How the Inventory system actually work.
Earlier I said I read the post. That post actually kinda opened my mind.
One of the people told to just make a base class Item and then subclass to make more specialized items.
E.g. Item -> EdibleItem -> Cake
That's was my idea at first, but then someone wrote something like this:
Instead of subclassing you should think an Item as a set of feature.
BOOM. That blow my mind.
Long story short, items in game are substantially just a named container for action you can do with them.
For example the bra we have seen in the images is an Item named bra, which contains an action named Equip. The Equip action when called move the item to the slave inventory and equip it.
This let me attach behaviour to the object freely.
Next thing I'm gonna do is to create some kind of store in the game and add a Sellable action for the items.
Okay, that's to much for one post, so see you next time YAAAARRR
Sunday, March 22, 2015
Introducing how event are written 3: Expressions and parameters
Hello,
this time we are going to write another simple events where I'll introduce the expressions and parameters.
Let's say I want to have a more dinamic event (relatively to the previous two we have seen). For example I want that the player need to pay a fee to enter a building.
We are looking for an event written like this:
If player doesn't have enough money
Kick him out
else
play the main event
To have something like this we need 2 things that we haven't still seen:
this time we are going to write another simple events where I'll introduce the expressions and parameters.
Let's say I want to have a more dinamic event (relatively to the previous two we have seen). For example I want that the player need to pay a fee to enter a building.
We are looking for an event written like this:
If player doesn't have enough money
Kick him out
else
play the main event
To have something like this we need 2 things that we haven't still seen:
- An if event step
- A way to check player money
So let's start with the former and write a basic event
<SetText>Bouncer: Halt!</SetText>
<SetText>Bouncer: You need to pay the standard fee to enter.</SetText>
<SetText>Bouncer: 50!$$</SetText>
<If Expression="true">
<SetText>!$player: I think I left my money in the other pants.</SetText>
<SetText>The bouncer kick your butt making you fly outside of the place.</SetText>
<End/>
</If>
<SetText>!$player: Here you are sir.</SetText>
<AddMoney>
<Reason>Expensive place entrance fee</Reason>
<Amount>-50</Amount>
</AddMoney>
<!--The rest of the event here-->
As you can see the If event step is pretty simple. It has a Expression attribute where you write an expression that will be evaluated at runtime.
If the expression return true the event steps inside the If are played otherwise not.
In this case the expression is "true" which, DUN DUN DUN, always evaluate to true.
So in our basic event we always get kicked out.
Another thing to notice is the <End/> event step, which, as its name suggest, will end the event.
Sidenote: At the moment I'm not sure there will ever be an If Else event step because I'm not sure I can achieve a clean way to write it in XML, but anyway an if else behaviour can be simulated using a Switch that has both true and false cases.
Okay, having a bouncer that will always kick your butt, is not that great. So, how can we check player money?
Other than using normal mathematical construct the expression can evaluate information called parameters. Parameters are specified inside [] brackets.
In our case we need the [Money] parameter. This return a number that represent the current player money.
So, knowing this we can now write:
<SetText>Bouncer: Halt!</SetText>
<SetText>Bouncer: You need to pay the standard fee to enter.</SetText>
<SetText>Bouncer: 50!$$</SetText>
<If Expression="[Money] < 50">
<SetText>You only have !$expr{[Money]}</SetText>
<SetText>!$player: I think I left my money in the other pants.</SetText>
<SetText>The bouncer kick your butt making you fly outside of the place.</SetText>
<End/>
</If>
<SetText>!$player: Here you are sir.</SetText>
<AddMoney>
<Reason>Expensive place entrance fee</Reason>
<Amount>-50</Amount>
</AddMoney>
<!--The rest of the event here-->
We have, unfortunately, to use the < entity instead of < since in XML you can't write the < character blindly.
Anyway as you can see our expression is now [Money] < 50 and so we will enter in that if only if player money are less than 50.
Another interesting thing to notice is that you can use expression in text using !$expr{} writing your expression inside the brackets.
This way we can give feedback on how many money does the player have.
Now our event will work correctly. If we have less than 50$ we will get kicked out, we will enjoy the full event if we have 50 or more.
Sidenote: The expression used by the game are evaluated using NCalc. On their site you can find the documentation, the sintax and some example.
When I'll make the first release the game will contain the documentation where all the available parameters are described.
Okay, that's it for this time.
Bye bye!
Monday, March 16, 2015
Introducing how events are written 2: let's go working!
Hi,
here's the second lessons on how the events are written.
Today let's see how to put up a simple working event. This way we can see some new event steps.
So, how a slave in a fantasy hentai world could make money?
What did you say? By being an astronaut? Well, thats... unexpected.
Anyway okay.
So we start with something basic:
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
Yeah, very basic...
Anyway here there's already something new.
Have you spotted it?
It's the !$trainee. Okay le'ts start by saying that when you see something that starts with !$ it's called an Alias and inside the game will be replaced with something more meaningfull. For example our !$trainee will be substituted with the name of your slave.
Now, during events your slave stats improve/degrade as a consequence of what she do.
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<AddBody>Wear +++++ Being in space is tiring</AddBody>
<AddBody>Fitness ----- There's no way to train in space</AddBody>
<AddMind>Wear +++++ Being in space is tiring</AddMind>
<AddMind>Happiness +++ Being in space is a wonderful experience</AddMind>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
There are 2 kind of stats: body stats and mind stats.
The body stats represent phisical trait of the girl while mind stats represent mental traits.
Anyway <AddBody> is used to modify body stats while <AddMind> is used to modify mind stats.
A stat that is common to both is Wear. The higher it is the more fatigued the girl is, phisically and mentally.
Both <AddMind> and <AddBody> have the same sintax:
<AddMind>Wear(1) ++++(2) Being inbla bla(3)</AddMind>
here's the second lessons on how the events are written.
Today let's see how to put up a simple working event. This way we can see some new event steps.
So, how a slave in a fantasy hentai world could make money?
What did you say? By being an astronaut? Well, thats... unexpected.
Anyway okay.
So we start with something basic:
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
Yeah, very basic...
Anyway here there's already something new.
Have you spotted it?
It's the !$trainee. Okay le'ts start by saying that when you see something that starts with !$ it's called an Alias and inside the game will be replaced with something more meaningfull. For example our !$trainee will be substituted with the name of your slave.
Now, during events your slave stats improve/degrade as a consequence of what she do.
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<AddBody>Wear +++++ Being in space is tiring</AddBody>
<AddBody>Fitness ----- There's no way to train in space</AddBody>
<AddMind>Wear +++++ Being in space is tiring</AddMind>
<AddMind>Happiness +++ Being in space is a wonderful experience</AddMind>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
There are 2 kind of stats: body stats and mind stats.
The body stats represent phisical trait of the girl while mind stats represent mental traits.
Anyway <AddBody> is used to modify body stats while <AddMind> is used to modify mind stats.
A stat that is common to both is Wear. The higher it is the more fatigued the girl is, phisically and mentally.
Both <AddMind> and <AddBody> have the same sintax:
<AddMind>Wear(1) ++++(2) Being inbla bla(3)</AddMind>
- The first part is the name of the stat being modified.
- The second part is the amount the stat will be modified. +++++ mean it will increase a lot, using less plus will increase it but less. ----- will decrease the stat a lot and using less minus will still decrease it but less.
- The third part is the reason the stat changed. This will be displayed to the player.
Now let's add another event step.
<Event Name="work_as_astronaut">
<SetTitle>To infinity... and beyond!</SetTitle>
<AddBody>Wear +++++ Being in space is tiring</AddBody>
<AddMind>Wear +++++ Being in space is tiring</AddMind>
<AddMind>Happiness +++ Being in space is a wonderful experience</AddMind>
<AddMoney>
<Reason>Worked as astronaut</Reason>
<Amount>2000</Amount>
</AddMoney>
<SetText>!$trainee worked as an astronaut! WIIII!</SetText>
</Event>
Guess, what <AddMoney> do?
Exactly, it make the game crash.
No, I mean it add a given amount to the player money.
The <Amount> is how many money will be added (or removed if it's negative) from the player finance.
The <Reason> is the same as the reason for <AddMind> and it is used to display info to the player.
Now let's fire this bad boy, shall we?
As you can see:
- !$trainee is changed and is now Jeane
- The money are added to player finance as can be seen in the screen.
- You can't see the stats but I assure you they had been added to trainee stats (I would have shown you the stat panel too but currently it doesn't display the reason so let's wait a little)
Okay, hope I have been clear enough.
Monday, March 2, 2015
Introducing how events are written: Hello world!
NOTE: technical post meant for whoever is interested on how the game events works.
I think I never explained how events for the game are written (other than saying they're written in XML)
So I'll start make some post where I show you some simple event and I'll explain what's it means.
So let's see the programmer basic, the hello world example.
We start by creating a new .xml file and put it in the events directory of the game. We call the f
ile MyFirstEvent.xml
and in the file we write:
<Events>
<Event Name="hello_world">
<SetText>Hello world</SetText>
</Event>
</Events>
What all this mean?
<Events> is our root, all event defined in this file will be inside it.
<Event> is the definition of an Event and must contain in his attribute a Name. Having a name is necessary for the event to be referenced by the game or by other events.
Finally inside the event we have a <SetText>, I already said something about event step. Well this is the most basic one.
When the game see this event step, the given text is displayed to the user and the game will wait until the player click continue to go to the next event step.
Not all the event steps wait for the user input for example the <SetTitle> event step will be executed and will continue immediately to the next event step.
So for example we can do this:
<Events>
<Event Name="hello_world">
<SetTitle>My first event</SetTitle>
<SetText>Hello world</SetText>
</Event>
</Events>
When the event fire the title (the big text on the screen, you can see it in the figure on the bottom) will be setted to My first event and immediately the SetText will be fired setting the event text to hello world.
In order to play the event there's stilll one thing to do. The game doesn't know which event should be playable so you have to tell him.
For that you have to create an activity.
The game work in weeks, every week you decide what to do for the next, then all the event planned are played.
Activities are what the player can do during the week. For example things like: work at bar, rest, take a walk are all valid activities.
For our example we need to create a new activity (at the moment I can't say where you will have to write the activity bit since it'll change in the future.)
The activity is written like this:
<Activity>
<Name>Hello world activity</Name>
<Duration>1</Duration>
<EventReference>
<DirectReference>
<Path>Events/MyFirstEvent.xml</Path>
<Name>hello_world</Name>
</DirectReference>
</EventReference>
</Activity>
Let's see all the bits:
<Name> This is the display name the user will see for that activity.
<Duration> How much in days the event is long. The maximum is 7. Note that things like 0.5 are valid numbers. (But atm all the basic events are 1 days long)
<EventReference> Is what event the activity will play. As you can see it contains a <DirectReference> that is an element you can use inside events too that contain the relative path of the file containing the event and the name of the event.
After adding your activity you will see it in game, you can select it and play it.
The result are shown here:
Note that the screen are going to change and are just for demostrative purpose
I think I never explained how events for the game are written (other than saying they're written in XML)
So I'll start make some post where I show you some simple event and I'll explain what's it means.
So let's see the programmer basic, the hello world example.
We start by creating a new .xml file and put it in the events directory of the game. We call the f
ile MyFirstEvent.xml
and in the file we write:
<Events>
<Event Name="hello_world">
<SetText>Hello world</SetText>
</Event>
</Events>
What all this mean?
<Events> is our root, all event defined in this file will be inside it.
<Event> is the definition of an Event and must contain in his attribute a Name. Having a name is necessary for the event to be referenced by the game or by other events.
Finally inside the event we have a <SetText>, I already said something about event step. Well this is the most basic one.
When the game see this event step, the given text is displayed to the user and the game will wait until the player click continue to go to the next event step.
Not all the event steps wait for the user input for example the <SetTitle> event step will be executed and will continue immediately to the next event step.
So for example we can do this:
<Events>
<Event Name="hello_world">
<SetTitle>My first event</SetTitle>
<SetText>Hello world</SetText>
</Event>
</Events>
When the event fire the title (the big text on the screen, you can see it in the figure on the bottom) will be setted to My first event and immediately the SetText will be fired setting the event text to hello world.
In order to play the event there's stilll one thing to do. The game doesn't know which event should be playable so you have to tell him.
For that you have to create an activity.
The game work in weeks, every week you decide what to do for the next, then all the event planned are played.
Activities are what the player can do during the week. For example things like: work at bar, rest, take a walk are all valid activities.
For our example we need to create a new activity (at the moment I can't say where you will have to write the activity bit since it'll change in the future.)
The activity is written like this:
<Activity>
<Name>Hello world activity</Name>
<Duration>1</Duration>
<EventReference>
<DirectReference>
<Path>Events/MyFirstEvent.xml</Path>
<Name>hello_world</Name>
</DirectReference>
</EventReference>
</Activity>
Let's see all the bits:
<Name> This is the display name the user will see for that activity.
<Duration> How much in days the event is long. The maximum is 7. Note that things like 0.5 are valid numbers. (But atm all the basic events are 1 days long)
<EventReference> Is what event the activity will play. As you can see it contains a <DirectReference> that is an element you can use inside events too that contain the relative path of the file containing the event and the name of the event.
After adding your activity you will see it in game, you can select it and play it.
The result are shown here:
Note that the screen are going to change and are just for demostrative purpose
Subscribe to:
Posts (Atom)





