Re: Punkroku area

-- $Name:Tesuto e$
instead_version "1.9.1"

require "dbg"
require "click"
require "prefs"
require "sound"

--game.forcedsc = true;
--game.nam  = ''; --This doesn't work =/
--game.dsc = '';
--game.pic = 'instead.png';
game.act = 'You can\'t.';
game.inv = "Hmm... Wrong...";
game.use = 'Won\'t work...';
indpnum = 1;    --20
pic = '1.png';
main = room {
    forcedsc = true;
    nam = function(s)
        pic = tostring(indpnum)..'.png';
        return img(pic);
    end,
    dsc = function(s)
        walk(r1);
        return nil;
    end,
    click = function(s, x, y)
        walk(r1);
        return "You clicked at "..x..','..y..'.';
    end,
};


r1 = room {
    nam = function(s)
        pic = tostring(indpnum)..'.png';
        return img(pic);
    end,    
    enter = function(s)
        indpnum = indpnum +1;
        return nil;
    end,        
    dsc = function(s)
        return walk(r2);
    end,
    exit = img(tostring(indpnum)..'.png');
    click = function(s, x, y)
        return "You clicked at "..x..','..y..'.';
    end,

};

r2 = room {
    nam = function(s)
        pic = tostring(indpnum)..'.png';
        return img(pic);
    end,
    enter = function(s)
        indpnum = indpnum + 1;
        return nil;
    end,
    dsc = function(s)
        return walk(r1);
    end,
    exit = img((tostring(indpnum)..'.png'));
    click = function(s, x, y)
        return "You clicked a picture at "..x..','..y..'.';
    end,

};

--Experiment with new and delete to dynamically create a picture loader file. Until not file.

Re: Punkroku area

I want to create different ways of saying the same thing. Any ideas for a function that will handle a list?

ex.
game.use = {'. OK ',' got it. ',' Used. ',' Did it. ',' All right. ',' Right on. ',' Success. ',' Ok. ',' Got it. ',' Used . ',' done. ',' okay. ',' right on. ', 'Finished.'};

I like to create a fortune on page 1 of the russian questions. There was a good idea:

function (s) luckf = {i = rnd (100); if i <to then return -1; else if i <(100-s) then return 0; else if i> = (100-s) then return 1; end end end end,

s = 10; -- s is the weight of fortune here 10%bad outcome 80% good and 10% really good

The part that is left is using it

useit = function(s)
 success  = luckf(5); -- here there is a weight of 5. 5%misfortune 90% normal success or critical hit etc...
if success then p' extra good fortune'; else if success == false then p 'Too bad, not enough luck'; else p 'done'; end end end,

I want to know how to use italics and bold in the text, so I can create a theme to use different fonts for a better story. I read somewhere on the corners to change as the narrator tells the story. Maybe all CAPITAL LETTERS! or adding a semi random text.

28 (edited by MaJoR KolZ 2013-08-25 16:08:08)

Re: Punkroku area

Simple function, that choose phrase from list per random-function rnd

function rout (list)
       return list[ rnd(#list) ];  
end

How to use:

rout { '. OK ',' got it. ',' Used. ',' Did it. ',' All right. ',' Right on. ',' Success. ',' Ok. ',' Got it. ',' Used . ',' done. ',' okay. ',' right on. ', 'Finished.' }

For your's example:

game.use = function()
   local ans = rout { '. OK ',' got it. ',' Used. ',' Did it. ',' All right. ',' Right on. ',' Success. ',' Ok. ',' Got it. ',' Used . ',' done. ',' okay. ',' right on. ', 'Finished.' };
   return ans;
end

Text format:

   p ( txtb "text1" )    -- bold
   p ( "text2" )
   p ( txtem "text3" ) -- italic


This code will print: text1 text2 text3

29 (edited by Punkroku 2013-08-27 04:31:57)

Re: Punkroku area

Thank you that was very helpful! With the bold and italic I think I can write in different fonts instead of bold or italic. When I make theme I just specify more fonts in a list. Very cool I will try it out!

Heres some talk about spins and Narrative variation this way the narrator can tell the same events in different ways. Like saying uh  like..... or  um,, druucnkinn  taallllk   orrrr something else rike japanese peopre speak. Or vowel rotation. thu dag wont hemo

its a way to parse text in different out puts I think it would be good for encryption. I wish that I could output text on a sine wave instead of a straight line see my font. Also what about strikethough and upside down text. s̶t̶r̶i̶k̶e̶t̶h̶o̶u̶g̶h̶ ̶ ı ʍɹıʇǝ ndsıpǝ poʍu ʇǝxʇɥǝɹǝ ǝɹǝɥ ʇxǝʇ uʍop ǝpısdn ǝʇıɹʍ ı ̶ ̶ɥ̶b̶n̶o̶ɥ̶ʇ̶ǝ̶ʞ̶ı̶ɹ̶ʇ̶s

Checkout http://curveship.com/

Re: Punkroku area

Punkroku wrote:

I updated comments for Instead

; $Name:Legend$
; $Name(ru):легенда$
; $Name(fr):Légende$
; $Name(es):Legion$
; $Name(it):Leggenda$
; $Name(jp):伝説$

How do I convert this to be read by Instead? When I write to txt file it changes to ??????? ?????

Re: Punkroku area

I look into yo theme.ini
When you need to position scrollers u need to use

win.up.x, win.up.y, win.down.x, win.down.y

it's coordinates by axes X and Y

don't understand this

Punkroku wrote:

How do I convert this to be read by Instead? When I write to txt file it changes to ??????? ?????

In which format do you need to convert and what about txt file?

Qui habet aures audiendi, audiat...

Re: Punkroku area

And some about theme made..,
please RTFM!
http://instead.syscall.ru/wiki/en/gamed … dl-instead

Qui habet aures audiendi, audiat...

Re: Punkroku area

Punkroku wrote:

... I want to use animations with cursors but have problems. Is this supported? Can I specify an offset for png arrays. The animated gif cause a problem and leave pictures from last frame onscreen. Combines but not replace....

GIF support by INSTEAD is works but dont works well. Dont know about PNG. Maybe Peter may tell us something more detailized.

Qui habet aures audiendi, audiat...

Re: Punkroku area

I impressed in your INSTEAD activity, but the ONLY way to write right code is to read documentation....
I looked your code, it is full of strange things, i have commented some lines.

Punkroku wrote:
-- $Name:Tesuto e$
instead_version "1.9.1"

require "dbg"
require "click"
require "prefs"
require "sound"

--game.forcedsc = true;
--game.nam  = ''; --This doesn't work =/
--game.dsc = '';
--game.pic = 'instead.png';
game.act = 'You can\'t.';
game.inv = "Hmm... Wrong...";
game.use = 'Won\'t work...';
indpnum = 1;    -- WRONG, use global {} for variables (in documentation)
pic = '1.png'; --- WRONG, use global { ... } for variables (in documentation)
main = room {
    forcedsc = true;
    nam = function(s)
        pic = tostring(indpnum)..'.png';
        return img(pic);
-- better: pr(indpnum, '.png');
    end,
    dsc = function(s) -- WRONG, never use walk or actions in DSC, i did not understand here anything. DSC is scene description
        walk(r1);
        return nil;
    end,
    click = function(s, x, y)
        walk(r1);
        return "You clicked at "..x..','..y..'.'; -- this is haos
better:
        p("You clicked at", x, ",", y)
        walk(r1)
    end,
};


r1 = room {
    nam = function(s)
        pic = tostring(indpnum)..'.png';
        return img(pic); -- see above, same
    end,    
    enter = function(s)
        indpnum = indpnum +1;
        return nil; --- no needed, just delete this line
    end,        
    dsc = function(s)
        return walk(r2); -- same haos, look above
    end,
    exit = img(tostring(indpnum)..'.png'); -- ?????? cant understand what it is

Re: Punkroku area

to animate cursor there is only one way. to use sprites module.

Re: Punkroku area

And if you need more detailed info about LUA language you should to learn basics from
www.lua.org

Qui habet aures audiendi, audiat...

37 (edited by Punkroku 2013-08-27 03:43:26)

Re: Punkroku area

Peter wrote:

to animate cursor there is only one way. to use sprites module.

How do I uses sprites module from theme.ini. This is not the game only for the theme.

j-maks wrote:

don't understand this
Punkroku wrote:

    How do I convert this to be read by Instead? When I write to txt file it changes to ??????? ?????

In which format do you need to convert and what about txt file?

I am trying to convert the name of the theme:
; $Name(ru):легенда$
; $Name(fr):Légende$
; $Name(es):Legion$
; $Name(it):Leggenda$
; $Name(jp):伝説$

when I save *.ini file it changes characters to ????? instead of russian or japanese.

[bold] PREVIEW OF NEW THEME[/bold]
[align=center]http://instead.syscall.ru/forum/misc.php?action=pun_attachment&amp;item=852&amp;download=0[/align]

Post's attachments

Attachment icon Faithful.png 790.95 kb, 97 downloads since 2013-08-27 

Re: Punkroku area

Last night I had a crazy dream that would make a good idea maybe to inspire someone...

I was on a boat a big ship... All the people that lived there were like prisoners. So people were magical other people looked really ugly. One guy  my friend could turn into graffitti art and stick to walls. We were trying to escape off the ship because it was like jail.

I guess the reason they put us there was because we were infected or part of some government experiment.
__________________________________________________________________________________

Next Genie...
You are the next genie but you need to get out of the lamp... The lamp is like pandora's box. The genie gives you 2 things that will help you escape..... A Pez Dispenser that spits out magical candy. And a magical seed. You have to find the key and exit out of a door. You have the power to dig into the wall to goto another room...this moves the room from one end of the world to the other.

Re: Punkroku area

Punkroku, if you have any ideas for games - just make them. If you have an initiative, there's no one but you, who would implement them. You are welcome.

I've collected most of your messages here. Hope you don't take offense.
We've found out that you had some troubles with your mental health.
We are really sorry about that. We hope, you are better.
So if you want to write something - feel free to write here. Nobody will ban you here.
This branch is specially for you.

40 (edited by Punkroku 2013-08-29 20:48:16)

Re: Punkroku area

Fine if I must be in my own section for forum... I will make my own forum.. Bye. Even though this defeats the purpose of forums.

My last gift is a book to you vpodobaev find it at this link: http://www.scribd.com/autumn_leon_2

My regards to Peter, bye all.

http://www.bitsfit.com/home/forum/install/index.php

Post's attachments

Attachment icon EchoSignopenInvent.pdf 1.41 mb, 2859 downloads since 2013-08-27 

Re: Punkroku area

I see that offense was still taken. Pity, but it's ok.
Everyone has his own disease. We live in a damaged world. And we are damaged.
But a one should understand that he is damaged.
We can tolerate a one (a human), but we cannot tolerate a disease.
I have no any hatred to you, but being an administrator(-tyrant cool) I should react when inadequate people come to the forum and start to write many inadequate messages.
So, nobody sends you out. If you want to come back - come back. If you want to play Instead games - play Instead games, if you want to make a new game - just make it. You are welcome!

Hope everything will be ok with you! God bless you!

42 (edited by Punkroku 2013-08-29 16:29:47)

Re: Punkroku area

For any one that reads this and wants to learn python programming for games. Here is a link to a free pdf. http://www.pygame.org/project-Making+Ga … -4067.html

For a list of lua complilers: WOWiki was the most extensive http://www.wowwiki.com/Lua_editors. I am now using ZeroBrane

Re: Punkroku area

Irremann wrote:

Как правильно написать такой код: img('путь/', переменная, '.png')? В таком виде не работает.


img('путь/', tostring(переменная), '.png')

Re: Punkroku area

Punkroku, I have moved your message, because it is incorrect. The correct way is to concatenate variables with .. operator. All variables are already treated as strings when concatenated.