Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
To solve both of your problems:
Language: lua
local function playerinfo(color,player,y)
local address_offset = 0x010828 + 0x100 * (player - 1)
gui.drawText(335, 290 + y, color, "red", "black", 16)
gui.drawText(345, 310 + y, memory.read_s16_le(address_offset, "WRAM"), "white","black", 16)
gui.drawText(430, 310 + y, memory.read_s16_le(0x010880, "WRAM"), "white", "black", 16)
gui.drawText(520, 310 + y, memory.read_s16_le(0x010860, "WRAM"), "white", "black", 16, "Courier New", "regular", "right")
end
Notice that I changed "memory" by "address_offset" to solve the error, and declared it as local (get used to use local inside your functions). Also, if you just want to align text, currently you have to declare fontsize, fontfamily and fontstyle before, so I used 16 (your size), "Courier New" (drawText default font), "regular" (default). In my opinion, there should be a way to pass them as nil or something like this.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Unless you glitch these exits with Goal Tape Remote Item Swap, like here https://www.youtube.com/watch?v=QPht8Hx4Gj0 (tho I'm almost sure you wouldn't get anything useful in FoI3 because with this glitch you can't walk downward, but you would have to test)
Idem
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Interesting, I encourage this approach to old movies.
I wanna study and TAS Sonic 2 (SMS), because I used it to ask my girlfriend in dating ^^
So yea I can make more ram research and a good lua script to beat [1019] SMS Sonic the Hedgehog 2 "best ending" by mike89 in 18:44.28.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Currently, there's not much you can do, the closest I got was using forms instead of canvas:
Language: lua
local form_width, form_height = 300, 200
local TEST_FORM = forms.newform(form_width, form_height, "TEST")
local TEST_STR = "Creates a textbox control on the given form. The caption property will be the initial value of the textbox (default is empty). Width and Height are option, if not specified they will be a default size of 100, 20. Type is an optional property to restrict the textbox input. The available options are HEX, SIGNED, and UNSIGNED. Passing it null or any other value will set it to no restriction. x, and y are the optional location parameters for the position of the textbox within the given form. The function returns the handle of the created textbox. If true, the multiline will enable the standard winform multi-line property. If true, the fixedWidth options will create a fixed width font. Scrollbars is an optional property to specify which scrollbars to display. The available options are Vertical, Horizontal, Both, and None. Scrollbars are only shown on a multiline textbox"
forms.textbox(TEST_FORM, TEST_STR, form_width - 20, form_height - 40, nil, 2, 2, true, false, "Vertical")
which results in:
The main problem is that this function is to insert/use text or values, so you can type and erase in this space. Also, apparently you can't use a "new line" symbol.
Anyway, since there's not a direct way to do this, I suggest you request this feature at https://github.com/TASVideos/BizHawk/issues.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
So I'll make them! It's in the list of my games to be researched (basically all games that I had when I was a child). Sad that I'm involved in too much projects, so I guess next year I'll start with Porky Pig.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Amazed that this game was TASed! I miss playing this in my childhood (cart was labeled "Gaguinho"), it used to be hard sometimes.
Do you have a ram map or a lua script for it?
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
I asked them in the TASVideos Discord server and they did it! So you can use something like "yourcanvasname.drawImage(...) to draw an image inside it just like in the normal "gui" functions.
You can wait until the next official release, or download the current state of development here.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
It's nice to see a TAS of this game! But how exactly both categories differs?
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
"Did you find this movie entertaining?" No, because unfortunately it's too fast.
Vote: Yes, because fortunately it's incredibly fast.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Oh yea I forgot to post the code I used to test and showed to you in the discord server, there I corrected it simply by using
Language: lua
input_table = joypad.get(1)
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
I made a code that store all inputs from player 1 and print the input table only when movie ends
Language: lua
local input_count = {
["A"] = 0,
["B"] = 0,
["Down"] = 0,
["L"] = 0,
["Left"] = 0,
["R"] = 0,
["Right"] = 0,
["Select"] = 0,
["Start"] = 0,
["Up"] = 0,
["X"] = 0,
["Y"] = 0
}
while emu.framecount() < movie.length() do
table = movie.getinput(emu.framecount())
if table["P1 A"] then input_count["A"] = input_count["A"] + 1 end
if table["P1 B"] then input_count["B"] = input_count["B"] + 1 end
if table["P1 Down"] then input_count["Down"] = input_count["Down"] + 1 end
if table["P1 L"] then input_count["L"] = input_count["L"] + 1 end
if table["P1 Left"] then input_count["Left"] = input_count["Left"] + 1 end
if table["P1 R"] then input_count["R"] = input_count["R"] + 1 end
if table["P1 Right"] then input_count["Right"] = input_count["Right"] + 1 end
if table["P1 Select"] then input_count["Select"] = input_count["Select"] + 1 end
if table["P1 Start"] then input_count["Start"] = input_count["Start"] + 1 end
if table["P1 Up"] then input_count["Up"] = input_count["Up"] + 1 end
if table["P1 X"] then input_count["X"] = input_count["X"] + 1 end
if table["P1 Y"] then input_count["Y"] = input_count["Y"] + 1 end
if emu.framecount() == movie.length() - 1 then
print(input_count)
end
emu.frameadvance()
end
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Tompa, you deserve so much congratulations for this TAS. It was so incredible to watch, and I suppose it was as incredible to make as you found new tricks and exploits.
This TAS makes me URGE to start working with DKC series this year. I can't wait to make an atlas script to display the level arround the game screen and see this TAS with its whole glory. And I'll drag Arne to my projects :p
More than a yes, a star!
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
For sure: yes!
This game looks really hard for casual playthrough, so this TAS got a pleasant and entertaining result.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Also, Amaraticando was working in a full script for DKC2, with hitboxes, make sure to check it to understand how it's reading the game to print correct hitboxes: http://tasvideos.org/userfiles/info/28335593014878764
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Each game handles hitboxes differently, you have to make a RAM/ROM mapping to find out which addresses handle this. In Yoshi's Island, for example, there's a table for sprites' hitboxes widths and heights:
$701BB6 (96 bytes) 24 2-word entries, one sprite per:
Word 1: Width of hitbox from center (both sides)
Word 2: Height of hitbox from center (top & bottom)
So reading this with my YI script, I can print hitboxes easily:
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Wait, there are still 5 days!
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Oh that's nice! I like to see when people code a solution.
You can do pull request there in Git, so they can analyze, test and decide if they want to implement this. I highly recommend this!
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Yea, but you can expand this atlas configuration to mostly all situations (like overworld, transitions) and to other games (hope that you find maps or you're patient enough to make them). In the end, you'll not do this too much, only for some videos that would look nice with it.
Lastly, I don't see black borders as a problem at all. This is our drawback from playing old consoles, but not a problem.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
I hate 16:9 stretching, so a workaround would be a semi-atlas encode, using a lua script, like this:
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
I have no idea why I never heard about this game, it's so good, the OST is amazing, and this is such a nice TAS! Good job, MUGG!
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
In the suggested screenshot it's not even a Snes, it's a Switch, so unfortunately I have to vote yes.
¯\_( ՞ ᗜ ՞)_/¯
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
Since there isn't a built-in feature, I see two solutions:
1) Use more monospaced fonts, like Courier New, Consolas, Lucida Console, Lucida Sans Typewriter, Monotxt, OCR A Extended (probably there are more accepted by .NET Framework, but couldn't find doumentation). Then, standardize your work: use certain fonts for certain ends, and define what font sizes you'll use. Finally, make a code to adapt to your use, like:
Language: lua
local font_dimensions = { -- I got these values from tests, unfortunately, I'll have to check for every font and size you need
["Courier New 11"] = {width = 7, height = 12},
["Courier New 12"] = {width = 7.5, height = 13},
["Courier New 14"] = {width = 9, height = 15},
["Courier New 16"] = {width = 10, height = 17},
["Consolas 11"] = {width = 6, height = 12},
["Consolas 12"] = {width = 7, height = 13},
["Consolas 14"] = {width = 9, height = 15}
--etc
}
-- Custom text drawing function
local function draw_text(x, y, text, colour, bg_colour, size, font, x_offset, y_offset)
-- Handling dimensions
local font_width = font_dimensions[font .. " " .. tostring(size)].width
local font_height = font_dimensions[font .. " " .. tostring(size)].height
local text_length = string.len(text)*font_width
-- Handling x/y offset, if used
if x_offset then x = x - math.floor(text_length*x_offset) end
if y_offset then y = y - math.floor(text_height*y_offset) end
gui.drawText(x, y, text, colour, bg_colour, size, font)
end
So, for example:
Language: lua
-- test
gui.drawPixel(120, 0)
draw_text(120, 0, "TEST CENTERED TEXT", "white", 0, 12, "Courier New", 0.5) -- this 0.5 makes the text 50% to the left of the x you set
results in: (Notice that I drawed a pixel in the same coordinate of the text, for reference)
2) Use BizHawk's font (a modified Courier New, actually), by using gui.text instead of gui.drawText. There are advantages (size is fixed, no matter how upscaled is the emu) and disadvantages (text doesn't appear when capturing the screen) of using this method of drawing text. Its dimensions are: width = 10 pixels, height = 14 pixels.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter
Editor, Experienced Forum User, Published Author, Player
(182)
Joined: 4/7/2015
Posts: 330
Location: Porto Alegre, RS, Brazil
You can't draw "under" the game, so a workaround would be using a condition to the print:
Language: lua
if y_pos >= 160 then
gui.drawText(x_pos, y_pos, "Missed Treasures")
end
Use this inside the function you made for the drawing, assuming that "y_pos" (or whatever you called) is the one incremented every 2 frames.
Oh and "160" because in the image the uppermost pixel of the bottom window is 320, and the gui.drawText function uses the original game coordinates, which is usually half the resolution the emu is displaying.
Games are basically math with a visual representation of this math, that's why I make the scripts, to re-see games as math.
My things:
YouTube, GitHub, Pastebin, Twitter