Page 1 of 2
[WIP] Time Travel (name subject to change) [time_travel]

Posted:
Mon Nov 30, 2015 12:18
by iangp
Any Steins;Gate fans?
Hi guys,
This mod would be implement a time travel on minetest.
The IDEA:Using a microwave and your cell phone, you can send messages to the cell phone of someone that are in the past.
In this case for yours phone, and preventing you to place that node, kill that chicken and etc... Using a text...
What you will actually get:A phone with this actualy these apps working:
- Message
- Video Galery
- Alarm
- Notes
Divergence Meter;
The microwave and the (gel) apple [now it's working fine];
Instructions- Making Gel Apple:
Requirements:
- Apples
- CRT TV (From Homedecor mod)
- Microwave Cellphone (Name Subject to change)
- Fuel (any flammable thing)
How to make:
Get the microwave cellphone aparatus (from creative inv.) and place it.
Get the CRT television from homedecor mod and place near the microwave.
Finally put a apple in the microwave and put the fuel (I know it's better change that...)
Gel-apple will appear on the microwave's output!
Check the code on github,
hereDownload Latest version of ModScreenshot
Some videos1st test with video feature2nd Test with improvements by RuiLicense:
Textures: (CC BY-NC 4.0)
Sounds: (CC BY-NC 4.0)
Code: LGPL
Dependencies:
homedecor (the television [CRT TV])
The organization records the activities in the site.
El. Psy. Kongroo.
That's all sonovabits
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Mon Nov 30, 2015 17:55
by cx384
nice mod
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Mon Nov 30, 2015 23:40
by Inocudom
Well, that node is certainly very decorative.
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Wed Dec 02, 2015 10:56
by iangp
[UPDATE] Added a darker back on nixie's tubes (for better visualization) and a boost on light source;
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Thu Dec 03, 2015 11:00
by iangp
In progress:
Make a functional Phone...

It's so cooooool!!!
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Fri Dec 04, 2015 12:34
by iangp
More screenshots of the phone:


Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Sun Dec 06, 2015 20:50
by Minetestforfun
wow, great work :)
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Mon Dec 07, 2015 12:31
by iangp
The message system it's getting great !!!
have sounds... cell phone numbers...
And I'm approaching to play a video in-game on minetest:
I choose a animated gif split layers and merge in vertical frames with gimp...
but it still slowly for more than one users...
If everything goes wrong with time travel (what I think not will happens)
the code can be forked to make a cell phone mod
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Fri Dec 11, 2015 13:17
by iangp
Hi people now you can play a short video from GIFs on minetest...
Check my video HERE
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Mon Dec 14, 2015 22:03
by mahmutelmas06
Woaa getting much better then i imagine :)
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Mon Dec 14, 2015 22:41
by iangp
mahmutelmas06 wrote:Woaa getting much better then i imagine :)
Thank you
UPDATE: added a "progress bar" to video player...
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Fri Dec 18, 2015 14:06
by iangp
Microwave is coming...

[DELETED]

Posted:
Wed Dec 23, 2015 05:22
by Rui
[DELETED]
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Wed Dec 23, 2015 11:46
by iangp
Mother of God Ó_O
XD XD XD XD XD XD
I was working on the audio file trail... but for copyright questions I didn't do anything
that's awesome!!!
I'll try use "minetest.after" and see how it works on my notebook. (a cool thing with "after" is no frame dropping)
The memory use it's OK?
PS:
I've serched for hours to find that: "minetest.get_dir_list()" and I didn't find ははははは
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Wed Dec 23, 2015 13:39
by iangp
Well, I test and find it offensive hahahaha it works pretty well :D
A new commit it's comming soon so...
I working on implement a way to pause the video and artificial intelligence (parsing language) for messages for the past.
Now the code of show video function is like this
and some lines are removed...
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
function show_video(player)
local name = player:get_player_name()
local videosrc = PHHandler[name]["video"].src
local t_frames = PHHandler[name]["video"].frames
--local snd = PHHandler[name]["video"].snd
local i = 1
--local images = minetest.get_dir_list(modpath.."/textures", false) -- 1.png, 2.png, 3.png....
local t = 0
for i = 1, t_frames do
minetest.after(t, function()
if PHHandler[name]["playing"] then
minetest.show_formspec(name, "time_travel:show_video",
"size[10,10]" ..
"background[0,0;10,10;timetravel_phone_90.png;false]"..
"image[0.8,7.4;9.4,0.6;timetravel_video_bar.png]"..
"image[0.3,2.5;"..(5*2)..","..(2.81*2)..";"..videosrc.."."..i..".png]".. --500 x 281
"image[0.8,7.4;"..(9.4*(i)/t_frames)..",0.6;timetravel_video_bar_BLUE.png]"..
"image_button[0.3,7.4;0.7,0.7;timetravel_button_pause.png;pause;]"..
"image_button_exit[8.7,3;0.6,0.6;timetravel_phone_X.png;x;]"..
"image_button[8.7,4.5;0.6,0.6;timetravel_phone_O.png;o;]"..
"image_button[8.7,6;0.6,0.6;timetravel_phone_P.png;p;]"..
"")
if i == 1 then
--minetest.sound_play(snd)
end
else
minetest.show_formspec(name, "time_travel:show_video",
"size[10,10]" ..
"background[0,0;10,10;timetravel_phone_90.png;false]"..
--"image_button[3.5,4;2,2;timetravel_button_play.png;play;;false;false;]"..
"image[0.8,7.4;9.4,0.6;timetravel_video_bar.png]"..
"image[0.8,7.4;"..(9.4*(i)/t_frames)..",0.6;timetravel_video_bar_BLUE.png]"..
"image[0.3,2.5;"..(5*2)..","..(2.81*2)..";"..videosrc.."."..i..".png]"..
"image_button[0.3,7.4;0.7,0.7;timetravel_button_play.png;play;]"..
"image_button_exit[8.7,3;0.6,0.6;timetravel_phone_X.png;x;]"..
"image_button[8.7,4.5;0.6,0.6;timetravel_phone_O.png;o;]"..
"image_button[8.7,6;0.6,0.6;timetravel_phone_P.png;p;]"..
"")
end
end)
t = t+1/10 -- frame rate
end
end
ありがとう Rui さん (your name is written in katakana? I'm learning (trying) japanese XD)
[DELETED]

Posted:
Wed Dec 23, 2015 15:26
by Rui
[DELETED]
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Wed Dec 23, 2015 16:22
by iangp
Rui wrote:>>The memory use it's OK?
It's running so slow.
However, it have the advantage of being able to adjust the length.
This mechanism is very slow and buggy.
If a short video, you should use the verticalframe.
If you use this mechanism, you need to write actions for closing the formspec.
Well, It still better than global steps here on my コンピュター 'cause It does not have... eh... large frame dropping issues
Play large movies it's just a "programing challenge for crazy guys" *hehehe* and it not will be a problem for the mod.
I think it could be useful for video tutorials on servers or something like that...
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Wed Dec 23, 2015 17:53
by iangp
Ah it's slow only with more frames than 100~148 frames at 15fps... ~9 seconds of video
And the startup time are slow too.. cause are too many frames for load on memory...
hmm :-/
I think I'll find a way to lock the frame rate using global steps... :(
[DELETED]

Posted:
Thu Dec 24, 2015 02:58
by Rui
[DELETED]
[DELETED]

Posted:
Mon Jan 04, 2016 13:50
by Rui
[DELETED]
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Mon Jan 04, 2016 16:00
by iangp
Rui wrote:Another idea (line 551~):
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
elseif fields.play then
PHHandler[player_name]["playing"] = true
local rate = PHHandler[player_name]["video"].framerate or 1/15 -- Frame rate
local frame = PHHandler[player_name]["video"].frames
local s = 0
for i = 1, frame do
minetest.after(s, function()
show_video(player)
if i ~= frame then
PHHandler[player_name]["frame"] = PHHandler[player_name]["frame"] + 1
end
end)
s = s + rate
end
minetest.after(s + rate, function()
PHHandler[player_name]["playing"] = false
show_video(player)
end)
sounds nice but need a fix:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
elseif fields.play then
PHHandler[player_name]["playing"] = true
local rate = PHHandler[player_name]["video"].framerate or 1/15 -- Frame rate
local frame = PHHandler[player_name]["video"].frames
local s = 0
for i = 1, frame do
minetest.after(s, function()
if PHHandler[player_name]["playing"] then
show_video(player)
if i ~= frame then
PHHandler[player_name]["frame"] = PHHandler[player_name]["frame"] + 1
end
end
end)
s = s + rate
end
minetest.after(s + rate, function()
PHHandler[player_name]["playing"] = false
show_video(player)
end)
Without this "if", you won't be able to get out of the movie player until the all of "afters" registered run...
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Tue Jan 05, 2016 15:54
by Krock
Oh nice idea!
I think you should rename this mod to "Phone Simulator" because a time travel mod is kinda hard to realize in our space and time continuum.
One question: After changing the history with my microwave, how would I get from the Beta line back to the Alpha one?
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Wed Jan 06, 2016 11:37
by iangp
If it's hard it's for me hahaha
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Wed Jan 06, 2016 11:54
by iangp
Krock wrote:One question: After changing the history with my microwave, how would I get from the Beta line back to the Alpha one?
I'll keep it random at this time...
but I can also make a comparison: What changed in relation to the current world you are in... and transform this info in a percentage, that involves your current_world% + changes%, that will turn into your sekai line. So you can go back to the Alpha lines only if have a negative change...
that's really confuse... I must work more on it, however I'm working on easy things first.
but it's a really good programming challenge uh?
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Wed Jan 06, 2016 16:34
by iangp
Rui
I've tested the idea and it works!
I just get some random video and split in frames... and separate the audio trail with audacity and export it to OGG format.
[you speak engrish right hahaha? (I think me too)]
check the newest video folks
[DELETED]

Posted:
Sat Jan 09, 2016 15:07
by Rui
[DELETED]
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Sat Jan 09, 2016 15:47
by iangp
I just asked because Okarin's english haha
A sound novel it's like a visual novel game? (I never played a visual novel)
I like your idea... I think it could be "easily" implemented with the message system.
(easily means isn't hard to code but it could be hard to make a cool story/history/tale/whatever).
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Sat Jan 09, 2016 16:22
by iangp
UPDATE: Added a simple Alarm Aplication
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Sat Jan 09, 2016 17:25
by slemon
Here is an idea about how to implement the time traveling: divide the world into equal parts on the y-axis (let's say 500 nodes for the layer). The initial world is spawned at y=30500. Then, each day for instance, we copy this world 500 nodes down. We also copy old player's positions and homes, etc. Using the time machine, it should be possible to move through these layers. After all space is filled with layers, the oldest layers can be replaced by the newest ones.
Re: [WIP] Time Travel (name subject to change) [time_travel]

Posted:
Sat Jan 09, 2016 17:50
by iangp
Ah yes but for Time Travelling nodes isn't necessary all this work... Minetest has a built-in function:
"minetest.rollback_revert_actions_by" so we can back on time... I already tested but I don't implemented yet because I need a efficient way to save the player position...
also it's possible backup the "map.sqlite" file "manually" (reading bytes and writing on other file... and then switch them)
But thanks for your suggestion!