[Solved] Script: Small SMW Screen Size (512x448)

Description: Have idea for a script, but you can't make it? Post it here!
Moderators: Yoshi021, Lx Xzit, 5438A38A, Semi-moderatos, Moderators

Raiden1 M
Topic author, Citizen
Citizen
Avatar
Raiden1 M
Topic author, Citizen
Citizen
Age: 25
Reputation: 5
Posts: 8
Joined: 10 Apr 2017

Post #1by Raiden1 » 9 May 2017, 18:43

Hi there,

apart from me I think there are quite a few people who would like to have a smaller screen size for their levels/episodes. Since I have no clue of TeaScript I thought posting a script request here wouldn't be a bad idea.

I actually found a clever guy on youtube who was able to make an appropriate lunalua script for SMBX 2.0 with the exception that he used SMB1 screen size 512x480. Link: https://www.youtube.com/watch?v=-Wz1MpqfQH8

Current screen size is 800x608 (25 blocks by 19) - I found the SMW screen size 512x448 (16 blocks by 14) to be the best imo.

I don't know the differences between lunalua and TeaScpript but I believe it should be possible to do the same in TeaScript. Maybe some of you have experiences in both lunalua and TeaScript. In this case I copied the lunalua script "a_ScreenReduce" I found in the level folder (download link in the video description) below:
Spoiler
-- API to return
local SR = {};

local GM = API.load("a_gm8");

-- Screen margins
-- Screen size = (800 - margin.left - margin.right)
-- by (608 - margin.top - margin.bottom)
local margin = {
left = 4.5 * 32;
right = 4.5 * 32;
top = 2 * 32;
bottom = 2 * 32;
};

local enabled_margin = true;

function SR.enable_margin(bool)
enabled_margin = bool;
end

function SR.on_tick()
if (enabled_margin) then
GM.draw_rectangle(0, margin.left, 0, 600, c_black);
GM.draw_rectangle(0, 800, 0, margin.top - 8, c_black);
GM.draw_rectangle(800, 800 - margin.right, 0, 600, c_black);
GM.draw_rectangle(0, 800, 600, 600 - margin.bottom, c_black);
end
end

function SR.margin_set(left, right, top, bottom)
margin.left = left;
margin.right = right
margin.top = top;
margin.bottom = bottom;
end

function SR.margin_reset(left, right, top, bottom)
margin.left = 4.5 * 32;
margin.right = 4.5 * 32;
margin.top = 2 * 32;
margin.bottom = 2 * 32;
end

function SR.onInitAPI()
registerEvent(SR, "onTick", "on_tick");
end

return SR;

So yeah, if someone can make a similar script for SMBX 1.4.x please don't hesitate to post it here. :)

Thanks! :bye:
Last edited by Raiden1 on 15 May 2017, 16:18, edited 1 time in total.

Catskart M
Count
Count
Avatar
Catskart M
Count
Count
Age: 20
Reputation: 144
Posts: 260
Joined: 29 Nov 2015
Location: France

Post #2by Catskart » 10 May 2017, 7:48

It's possible with teascript, I'll make it.

Raiden1 M
Topic author, Citizen
Citizen
Avatar
Raiden1 M
Topic author, Citizen
Citizen
Age: 25
Reputation: 5
Posts: 8
Joined: 10 Apr 2017

Post #3by Raiden1 » 10 May 2017, 21:00

I'm glad to hear that. Great! :good: pls keep me updated :)

Catskart M
Count
Count
Avatar
Catskart M
Count
Count
Age: 20
Reputation: 144
Posts: 260
Joined: 29 Nov 2015
Location: France

Post #4by Catskart » 13 May 2017, 17:45

Raiden1 wrote:I'm glad to hear that. Great! :good: pls keep me updated :)

Here the release !

viewtopic.php?f=82&t=2030&p=13498#p13498


Return to “Script requests”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest