How do you organize your project(s) ?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
User avatar
Sulunia
Party member
Posts: 203
Joined: Tue Mar 22, 2016 1:10 pm
Location: SRS, Brazil

Re: How do you organize your project(s) ?

Post by Sulunia »

Linkpy wrote:Oh, quiet good you two !

Sulunia, for me I really don't like having .lua file in my main folder (except conf.lua and main.lua, of course). And I tried Beatfever and it's looks very good, but... What I see in you image, you have not so many files for what you done. I don't understand how you do :crazy:
This is because i tend to break a file into multiples whenever they start getting too big. From beatfever itself:

Code: Select all

-FileParser.lua //Interprets osu files and separates all information
|	--ObjectParsing.lua //Parses hitObjects in an osu beatmap
|	--GameObjects.lua // Holds object information 
Which means the Parser calls functions from ObjectParsing and GameObjects to do it's work. Most game screens are actually just structured calls to functions in subfiles. Which, again, is messy as hell.
Actually, if someone has a good idea on how to organize this i'll be pretty glad. :D

By the way, i have been reading your blog about osu!max. If you need help with parsing information or even the project itself, feel free to ask about. The osu file format is a bit tricky.
Don't check my github! It contains thousands of lines of spaghetti code in many different languages cool software! :neko:
https://github.com/Sulunia
User avatar
Linkpy
Party member
Posts: 102
Joined: Fri Aug 29, 2014 6:05 pm
Location: France
Contact:

Re: How do you organize your project(s) ?

Post by Linkpy »

Oh, for me a big file is like 300-400 lines o.o

Currently no, I won't use osu!'s beatmap file format, I'll use my own for better customization. The game will be fairly easy on the side of the gameplay, so I'll make it with many graphical FX. And this project is the first game I'll publish under my society name : "NeoShadow", so I want to do it by myself, but thanks for the proposition :)
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
marco.lizza
Citizen
Posts: 52
Joined: Wed Dec 23, 2015 4:03 pm

Re: How do you organize your project(s) ?

Post by marco.lizza »

It's somewhat odd that so may developers devised a similar project structure. I've also seen very badly unstructured projects that works perfectly, but an organized one put the mind at ease when working on it.

Personally I'm adopting something like the following structure

Code: Select all

+- root
+- assets
   +- data
      <generic assets such as maps, texts, etc...>
   +- fonts
      <TTFs and pixelfonts>
   +- images
      <static images>
   +- shaders
      <pixel shaders>
   +- sheets
      <animation sheets>
   +- sounds
      <sound files>
+- game
   +- entities
      <game entities scripts>
   +-- states
      <game-state scripts>
   <game scripts>
+- lib
   <support scripts>
+- conf.lua
+- main.lua
I'm not using OOP in the strict sense, but a mix-in base variant (for example to handle entities). However, almost every script file exposes it's functionalities in a "class-oriented" way (in order not to have global variables flying around).

Also, modules are very compact and they rarely exceed 300 lines (header and comments included).

Lastly, I'm not relying upon 3rd party external libraries. I create my own tailored version of the support libraries I need, since I don't want to overengineer and adopt I library only to use it at (let's say) 2% of its scope.
Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests