Newbie questions?
Posted: Wed Dec 04, 2013 11:36 pm
Been a while since I posted, and I'm not sure if my post belongs here, but for the last 6 months I've been learning lua and created a pure lua simulation of running a restaurant. Tis all numerical and the only user intervention is clamped to changing the data tables by hand before the simulation runs.
Anyone remember Pizza Tycoon or Restaurant empire? In about 300+ years, I expect my simulation to be very similar, except I'm focusing on re-playability, financial reality, and absolute micro-management. Note I didn't use the word 'game' at all.
Having said that, I'm trying (as a newbie) to roll my simulation into a game-like form using the love2d/lua combo. Unfortunately, I'm still having a tough time wrapping my head around some of the love2d concepts. To keep things brief, I'll just ask a few stupid questions:
1 - What are the rules when using someone elses code? Would giving credit where credit is due be good enough? I mention this cuz "randomlua.lua" is the CORE pseudo-random number generator in my sim. <-- Mostly cuz I've read RND generation within lua isn't exactly stable across platforms.
2 - Is there no way to snag/copy a piece of the on-screen data (Sorta like a screen snapshot) but within a defined rectangle? Leads into question 3.
3 - What is the preferred way to create vertical scrolling text? I want a small box on my display to constantly push data (String) upward on a regular basis. The first thought I had was to snag/copy a section of the screnn, and just copy it back minus about 12 pixels, then print out the new data. Love2d seemingly can't do that? I ended up having to create a table, shove the strings there, and use table.remove/table.insert to control what was drawn on the screen every frame. This seems very weird to me. Surely, there is a way to simulate what a simple console device does in love2d? Right?
4 - Does 'screenshot = love.graphics.newScreenshot( )' even work? For some reason, I'm not able to see any results. And yes, I followed the wiki page instructions to make raw data into a drawable image. No errors and no visual results. Have I missed something?
Any suggestions appreciated...
Thanks
Anyone remember Pizza Tycoon or Restaurant empire? In about 300+ years, I expect my simulation to be very similar, except I'm focusing on re-playability, financial reality, and absolute micro-management. Note I didn't use the word 'game' at all.
Having said that, I'm trying (as a newbie) to roll my simulation into a game-like form using the love2d/lua combo. Unfortunately, I'm still having a tough time wrapping my head around some of the love2d concepts. To keep things brief, I'll just ask a few stupid questions:
1 - What are the rules when using someone elses code? Would giving credit where credit is due be good enough? I mention this cuz "randomlua.lua" is the CORE pseudo-random number generator in my sim. <-- Mostly cuz I've read RND generation within lua isn't exactly stable across platforms.
2 - Is there no way to snag/copy a piece of the on-screen data (Sorta like a screen snapshot) but within a defined rectangle? Leads into question 3.
3 - What is the preferred way to create vertical scrolling text? I want a small box on my display to constantly push data (String) upward on a regular basis. The first thought I had was to snag/copy a section of the screnn, and just copy it back minus about 12 pixels, then print out the new data. Love2d seemingly can't do that? I ended up having to create a table, shove the strings there, and use table.remove/table.insert to control what was drawn on the screen every frame. This seems very weird to me. Surely, there is a way to simulate what a simple console device does in love2d? Right?
4 - Does 'screenshot = love.graphics.newScreenshot( )' even work? For some reason, I'm not able to see any results. And yes, I followed the wiki page instructions to make raw data into a drawable image. No errors and no visual results. Have I missed something?
Any suggestions appreciated...
Thanks