Architecture

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
mello
Prole
Posts: 1
Joined: Sun Aug 13, 2023 10:26 am

Architecture

Post by mello »

Hi.
I'm wanna try create my own game in lua, but doesn't have experience with non-typed languages.
What architecture of project do you recommend?
Where I can read about that?

Code: Select all

-- My suggestion
main.lua
src/enitity.lua
src/game_window.lua
src/level_loader.lua
User avatar
dusoft
Party member
Posts: 510
Joined: Fri Nov 08, 2013 12:07 am
Location: Europe usually
Contact:

Re: Architecture

Post by dusoft »

Have you searched the forum before posting? There have been multiple threads about this, e.g.
viewtopic.php?p=246142

How does non-typed and typed language affect your architecture btw, it is independent AFAIK?
Rigachupe
Citizen
Posts: 83
Joined: Fri Jun 18, 2021 11:21 am

Re: Architecture

Post by Rigachupe »

mello wrote: Sun Aug 13, 2023 10:32 am Hi.
I'm wanna try create my own game in lua, but doesn't have experience with non-typed languages.
What architecture of project do you recommend?
Where I can read about that?

Code: Select all

-- My suggestion
main.lua
src/enitity.lua
src/game_window.lua
src/level_loader.lua
I would add a data folder with images, sounds, musics, levels folders to complete the setting. It will work whatewer you name you folder so either you look at github of people who put a love2d game in it to copy the style or create your own.
User avatar
GVovkiv
Party member
Posts: 670
Joined: Fri Jan 15, 2021 7:29 am

Re: Architecture

Post by GVovkiv »

Rigachupe wrote: Tue Aug 15, 2023 5:39 am
I would add a data folder with images, sounds, musics, levels folders to complete the setting. It will work whatewer you name you folder so either you look at github of people who put a love2d game in it to copy the style or create your own.
So... how typed or non-typed language difference would affect this?
duaner
Prole
Posts: 41
Joined: Thu May 07, 2020 6:43 pm
Contact:

Re: Architecture

Post by duaner »

mello wrote: Sun Aug 13, 2023 10:32 amI'm wanna try create my own game in lua, but doesn't have experience with non-typed languages.
Did you mean interpreted languages (vs. compiled)?
User avatar
Azzla
Prole
Posts: 38
Joined: Sun Mar 29, 2020 2:23 am

Re: Architecture

Post by Azzla »

duaner wrote: Tue Aug 15, 2023 12:04 pm
mello wrote: Sun Aug 13, 2023 10:32 amI'm wanna try create my own game in lua, but doesn't have experience with non-typed languages.
Did you mean interpreted languages (vs. compiled)?
I think we're just confusing semantics, I've always referred to them as static/dynamically-typed or strong/weak languages.

Anyway, that has very little to do with how you structure your game. I'm a bit OCD but here's how I typically do it:
Image

Your mileage may vary. Everything is pretty self-explanatory, I'll just add that 'dicts' is for dictionaries of large amounts of information. Enemy types, different weapon types, level information, whatever you have "a lot of variations" of.
libraries: Stalkpile
electronic music stuff: https://soundcloud.com/azzlamusic
User avatar
Bobble68
Party member
Posts: 160
Joined: Wed Nov 30, 2022 9:16 pm
Contact:

Re: Architecture

Post by Bobble68 »

mello wrote: Sun Aug 13, 2023 10:32 am Hi.
I'm wanna try create my own game in lua, but doesn't have experience with non-typed languages.
What architecture of project do you recommend?
Where I can read about that?

Code: Select all

-- My suggestion
main.lua
src/enitity.lua
src/game_window.lua
src/level_loader.lua
I just do whatever I want, which is probably not a good idea, since it makes my projects look like this:
Untitled.png
Untitled.png (19.3 KiB) Viewed 9707 times
Please ignore the fact I have polygon, levelpolygon, flowlevelpolygon and special polygon
Dragon
User avatar
Azzla
Prole
Posts: 38
Joined: Sun Mar 29, 2020 2:23 am

Re: Architecture

Post by Azzla »

Bobble68 wrote: Tue Aug 15, 2023 7:12 pm
I just do whatever I want, which is probably not a good idea, since it makes my projects look like this:

Untitled.png

Please ignore the fact I have polygon, levelpolygon, flowlevelpolygon and special polygon
LOL, this is totally reminding me of my first "big" project where my scope just creeped into insanity and nothing made any sense. Also, high-five of solidarity for Zerobrane. :nyu:
libraries: Stalkpile
electronic music stuff: https://soundcloud.com/azzlamusic
Post Reply

Who is online

Users browsing this forum: No registered users and 65 guests