First draw "Hello World!" on screen. I've use code editor Geany on Raspberry Pi, i've download through RPi > Preferences > Add / Remove Software then search Geany liked below image.
Then checked below package and click Apply.
- fast and lightweight IDE
- fast and lightweight IDE - common files
- Lua scripting plugin for Geany
- set of plugins for Geany (translations)
From previous thread we've introduce installation LÖVE Engine and running Demo, now we've to start own game step by step. For me, i've use Downloads folder as mainly workspace (you can decide by your own), then create folder named "game". Open Geany IDE and then choose File > New, you'll get a new untitle file for coding. After that place below code into your file. And saved this file into game folder as named "main.lua".
function love.draw()
love.graphics.print("Hello World!", 400, 300)
end
Open terminal and locate to Downloads then type "love game" and hit enter, you'll see your first white text "Hello World!" on black screen and "Untitled" named top of window border. Just click [x] on the right-corner to close this window. Now your main.lua is work!
Configuration, the simple explain of Conf is Config Files that preload and setting before your game launch, this can help you decided for default setting of your game in proper way of standard or recommend setting. On Geany IDE, choose File > New, now you've a new untitled file. Open this url: https://love2d.org/wiki/Config_Files , At the top-right drop down menu choose "Version 0.10.2: Super Toast".
After that scroll to section "Here is a full list of options and their default values for LÖVE 0.10.1 and 0.10.2:". this is very important!, LÖVE Engine each version may have difference API that caused of your stuff may or may not work properly then we've use LÖVE Engine 0.10.2 on Raspberry Pi, just focus this version only. Copy all code on this section and paste to new untitled file on Geany IDE recently. Then saved this file as named "conf.lua" into game folder same as main.lua file existed.
After that scroll to section "Here is a full list of options and their default values for LÖVE 0.10.1 and 0.10.2:". this is very important!, LÖVE Engine each version may have difference API that caused of your stuff may or may not work properly then we've use LÖVE Engine 0.10.2 on Raspberry Pi, just focus this version only. Copy all code on this section and paste to new untitled file on Geany IDE recently. Then saved this file as named "conf.lua" into game folder same as main.lua file existed.
Update Configuration
t.window.title, this title is the top bar named that default is "Untitled", try change this to other word, i've change "Untitled" to "Get Berry".
t.window.icon, find some free png image proper at square size for example 256x256 pixels, this icon is path to image that locate from this conf.lua entry point then i've create folder "icon" under "game" then put an icon into it liked this "game/icon/image.png"
t.window.width and t.window.height is default size of screen, try to change t.window.width to 320 and t.window.height to 480
Saved conf.lua then back to terminal locate to Downloads folder and type command "love game" and hit enter to run it again, you'll see small portrait screen and not seeing "Hello World!" because it's display on x=400, y=300 but our new screen width=320 height=480. At the task bar you'll see new image icon on task bar and named "Get Berry" display both top bar of windows and on task bar.
Challenge...!?
t.window.borderless, try to change value "false" to "true" and t.window.resizable from "false" to "true" then save conf.lua and re-run "love game" gain, let's see what happen when mouse drag on windows' border?. The conf.lua had a lot of things depends on what you want in your game setting that i can't imagine on you. So you can do more challenge to learn more this kind of thing.
From previous thread, we're excited that awesome game is not alway rely on hi-end development machine or development tools, it's coming from your idea. Then based on your idea, budget and time. Let's start something and keep update little by little because game development is very fucking hard but doesn't mean impossible for you, if you have enjoy to do that.
Next time i will show you more graphics display on screen and keyboard control to update graphics position. Hope you enjoy game making, stay home, stay safe.
t.window.icon, find some free png image proper at square size for example 256x256 pixels, this icon is path to image that locate from this conf.lua entry point then i've create folder "icon" under "game" then put an icon into it liked this "game/icon/image.png"
t.window.width and t.window.height is default size of screen, try to change t.window.width to 320 and t.window.height to 480
Saved conf.lua then back to terminal locate to Downloads folder and type command "love game" and hit enter to run it again, you'll see small portrait screen and not seeing "Hello World!" because it's display on x=400, y=300 but our new screen width=320 height=480. At the task bar you'll see new image icon on task bar and named "Get Berry" display both top bar of windows and on task bar.
Challenge...!?
t.window.borderless, try to change value "false" to "true" and t.window.resizable from "false" to "true" then save conf.lua and re-run "love game" gain, let's see what happen when mouse drag on windows' border?. The conf.lua had a lot of things depends on what you want in your game setting that i can't imagine on you. So you can do more challenge to learn more this kind of thing.
From previous thread, we're excited that awesome game is not alway rely on hi-end development machine or development tools, it's coming from your idea. Then based on your idea, budget and time. Let's start something and keep update little by little because game development is very fucking hard but doesn't mean impossible for you, if you have enjoy to do that.
Next time i will show you more graphics display on screen and keyboard control to update graphics position. Hope you enjoy game making, stay home, stay safe.
Thank you so much for visit this blog. See U next thread. :)
No Like, No Thumbs Up, No Bell, Please support me by click ads, thank you...






Comments
Post a Comment