? The Really Great RPG PC thread! (Page 1) ● SmileBASIC Source Forums

Sign In

Register
*Usernames are case-sensitive
Forgot my password

The Really Great RPG PC thread!

  • #1 ✎ 571 IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength Really Great RPG is being ported to PC and lacks suggested a thread about RGRPG for PC so yeah i made one Edit:Read the next post in this thread for more details from Mr. 360 himself! Posted Edited by IAmRalsei
  • #2 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself What I'm making will include a port of RGRPG, but it is not RGRPG PC. also look at this super cursed code I'm trying to write and get to work:while true do love.graphics.print("this is not the way to program in love2d.", 0, 0) sbVSYNC() end Posted
  • #3 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Actually wait a second cool stuff Alright, fine. I have completely abandoned the idea of the code snippet from the previous post. That's a disgusting way to do things, especially when you're going to add the setup-update-draw loop back anyway. I'm going to integrate SmileBASIC-style features into Love2D in a neat way. Here's a ***WORKING*** code sample. function setup() fishes = {} for i = 1, 64 do fishes[i] = Sprites.new(math.random() > .5 and 244 or 245) if math.random() > .5 then fishes[i]:toggleAttribute(Sprites.Attributes.FlipH) end if math.random() > .5 then fishes[i]:toggleAttribute(Sprites.Attributes.FlipV) end if math.random() > .5 then fishes[i]:toggleAttribute(Sprites.Attributes.Rot90) end if math.random() > .5 then fishes[i]:toggleAttribute(Sprites.Attributes.Rot180) end fishes[i]:toggleAttribute(Sprites.Attributes.Additive) fishes[i]:home(8, 8) fishes[i].variables[2] = (window.screen.width / 8) + (i * 2) fishes[i].variables[3] = (window.screen.height / 8) + (i * 2) fishes[i].variables[4] = i * 2 fishes[i]:addCallback(becomeFunky) end end function update() for i = 1, #fishes do fishes[i]:update() end end function draw() love.graphics.clear(0, 0, 0) Sprites.startBatch() for i = 1, #fishes do fishes[i]:draw() end Sprites.endBatch() end function becomeFunky(sprite) sprite:offset( sine(window.frames + sprite.variables[1], 120 + sprite.variables[4], sprite.variables[2], true) + (window.screen.width / 2), cosine(window.frames + sprite.variables[1], 90 + sprite.variables[4], sprite.variables[3], true) + (window.screen.height / 2) ) sprite:rotation( sprite:rotation() + 2 ) sprite:color( sine(window.frames + sprite.variables[1], 120 + sprite.variables[4], .5, true) + 1, sine(window.frames + sprite.variables[1], 180 + sprite.variables[4], .5, true) + 1, sine(window.frames + sprite.variables[1], 240 + sprite.variables[4], .5, true) + 1 ) sprite:scale( sine(window.frames + sprite.variables[1], 90 + sprite.variables[4], 2, true) + 3, sine(window.frames + sprite.variables[1], 90 + sprite.variables[4], 2, true) + 3 ) endWhile it is working, you can't run it right now, as you don't have the API. Pranked!!! Anyway, the screenshot. It shows off map importing, (from my dumb map format) the code I just wrote above, and z-sorting in my SmileBASIC API. All running at 60 FPS, with a minimal amount of draw calls. I'm thinking of calling my API Smiley, (Smiley2D? Smiley 2018 Pro Edition?) to carry on the legacy of TUTORIAL.PRG. Also, I'm working off of another API I made for Love2D that adds a lot of boilerplate, such as program flow, window.screen, pixel perfection, and sine functions. This is not part of RGRPG2, it's just a graphics demo. Think of it as the Super Mario 128 to RGRPG's Super Mario 64. Also, Minit's OST is extremely good, please listen to it. Edit: additional z-sorting image! Look at this! It's really easy to implement! Extremely elegant, too! Sprites.startBatch() for i = 1, #fishes do --' Dumb hack if fishes[i].type ~= "sprite" then Sprites.endBatch() Sprites.startBatch() end fishes[i]:draw() end Sprites.endBatch() Posted Edited by TheV360
  • #4 ✎ 571 IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength I forgot all about this thread! Posted
  • #5 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Progress Update! Text has been added to this API! function setup() t = Text.new(50, 30) end function update() t:locate(math.floor(math.random() * t.width), math.floor(math.random() * t.height)) t:color(math.floor(math.random() * 16), math.floor(math.random() * 16)) t:print("Heck!", false) end function draw() love.graphics.clear(0, 0, 0) t:draw() endThe text cursor exists too, so this works! t:print("I am on the first line!") t:print("I am on the second line!")Text coloring is also hardware-accurate, and if you clear the screen it fills the screen with background color. Then if you scroll the screen, you also see that it doesn't fill the screen with the background color! I also stole data from otyaSmileBASIC to make the text characters accurate to the SmileBASIC font GRP! Instead of using lazy "just calculate it on the fly" technology, I have decided to use the "GENERATE 4,000 QUADS AT STARTUP" technique! wait Never mind i found an edge case and I can safely say I hate COLOR 0, [any non-zero color here]. Posted Edited by TheV360
  • #6 ✎ 571 IAmRalsei Forum Leader Hidden Achievements First Year My account is over 1 year old Website Expert Programmer Programming no longer gives me any trouble. Come to me for help, if you like! Programming Strength
    Progress Update! Text has been added to this API! function setup() t = Text.new(50, 30) end function update() t:locate(math.floor(math.random() * t.width), math.floor(math.random() * t.height)) t:color(math.floor(math.random() * 16), math.floor(math.random() * 16)) t:print("Heck!", false) end function draw() love.graphics.clear(0, 0, 0) t:draw() endThe text cursor exists too, so this works! t:print("I am on the first line!") t:print("I am on the second line!")Text coloring is also hardware-accurate, and if you clear the screen it fills the screen with background color. Then if you scroll the screen, you also see that it doesn't fill the screen with the background color! I also stole data from otyaSmileBASIC to make the text characters accurate to the SmileBASIC font GRP! Instead of using lazy "just calculate it on the fly" technology, I have decided to use the "GENERATE 4,000 QUADS AT STARTUP" technique! wait Never mind i found an edge case and I can safely say I hate COLOR 0, [any non-zero color here].
    oh cool
    Posted
  • #7 ✎ 1626 12Me21 Head Admin Third Year My account is over 3 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Lua isn't evil, you know... math.random(0,15) (well actually, it doesn't have a math.abs() function so I guess it is evil) Posted Edited by 12Me21
  • #8 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself
    wait Never mind i found an edge case and I can safely say I hate COLOR 0, [any non-zero color here].
    Fixed... but at a cost. I now have an inverted copy of the font along with the font. I might try to use a shader to invert the font while drawing, so I don't have to use this copy. Nice! Edit: Heck yeah, I used a shader and it works! now time to sleep
    Posted Edited by TheV360
  • #9 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Today I spent five hours on fixing sprite attributes. Anyway, everything's going pretty well other than that. Tomorrow I'll get a GitHub repository up for both my Template and SmileBASIC library. Anyway here's all my current progress: [url=https://youtu.be/TEZd4dWmKWM]https://youtu.be/TEZd4dWmKWM[/url] [url=https://youtu.be/H7CwEYJltgQ]https://youtu.be/H7CwEYJltgQ[/url] Posted
  • #10 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Here's the repository, if anyone wants to see my horrible code. Not much progress, but I'm having a lot of fun with shaders. (Extremely basic shaders, but still funky) Posted
  • #11 ✎ 1626 12Me21 Head Admin Third Year My account is over 3 years old Website Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself I think your readCharacterListing function can be written as: function readCharacterListing(filename) Text.Characters = {} local file = love.filesystem.read(filename) for character, x, y in file:gmatch("(%d+),(%d+),(%d+)") do Text.Characters[tonumber(character)] = love.graphics.newQuad(tonumber(x), tonumber(y), Text.Size, Text.Size, Text.Sheet:getDimensions()) end end EDIT: also why is gray called "DarkGray"? There aren't even any other grays Posted Edited by 12Me21
  • #12 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself I'm going to change the color names to the ones listed in the Instruction List, as that is always the most reliable source of information free from errors. Currently developing SPDEFs and readDefinitionListing, which does a similar thing, but is different enough that it needs its own function. SPDEFs will probably be the last thing stopping me from making the animations module thing. (aside from energy and school and real life) school isn't real Posted
  • #13 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Just added animations! Not accurate at all right now, and the code is horrible, but I'm proud of it! Posted
  • #14 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself Seems like the library is getting pretty usable. I wonder if anyone's going to make anything with it soon? New project hyping checklist ☑ Ominous solid color profile picture ☑ Posts about the vague idea of working on a project ☐ Actually making something Posted
  • #15 ✎ 87 seggiepants This is a cool project and I hate to be a Debbie downer, but I should mention a few things.
    1. Oracle vs. Google. https://en.wikipedia.org/wiki/Oracle_America,_Inc._v._Google,_Inc. Oracle sued Google over their use of the Java API in Android. It went back and forth for a while, but it looks like Google lost (personally I don't think APIs should be copyrightable). Re implementing SmileBasic's graphics API in Lua could be troublesome. Truthfully it probably would never go past a Cease and Desist, but still it is something to consider.
    2. Use of the SmileBasic fonts, graphics, and presumably down the line music and sound effects. These are owned by SmileBasic under copyright, and they could easily get you in legal trouble too.
    Now a slightly off-topic question. It looks like this project is on both TheV360, and 12ME21's github pages. Shouldn't you be working together on just one or the other? Ok, one more slightly off-topic question, does Love2D really have shader support? It looks like I havent' looked into that library in quite some time. I am not a Lawyer, and I don't even play one on TV, but still, I would recommend changing the API around a bit and sourcing your own graphics (https://opengameart.org/). Maybe a slight rename too. Good luck, it looks like a cool project.
    Posted
  • #16 ✎ 198 TheV360 Third Year My account is over 3 years old Website First Day Joined on the very first day of SmileBASIC Source Website Night Person I like the quiet night and sleep late. Express Yourself
    Good luck, it looks like a cool project.
    Yeah, maybe uploading a few Spriter's Resource pngs wasn't a good idea. Anyway, 12Me21 helped with two things (fonts and spdef) but most of it is my awful code. The project sort of ran out of steam over the past 3 days, mainly because I fear all the awful hacks and uncommented code. Still might be useful to newbies. Heck, I'm wondering if I should port this to MonoGame or Haxe or something. I'm trying to find something that isn't SmileBASIC and something I can comfortably program in. Also, yeah Love2D has shaders now. They're actually pretty useful.
    Posted