Baron_Fel
Apr 6th, 2000, 03:16 AM
I'm making a small canyon-flying game and the game engine/core of the game is in a module. Do you think I should put it all into the form or should I leave it in the module?
Thanks in advance...
Leave it in a module and name the module, "engine.bas".. why? if you ask, the reason is because it's cleaner, you can for example just put that Bas file in another project and you got a working engine, later on if you decide to share the engine with other people, just upload the bas file and some documentation and newbie VB coders will prey you (I think.. :) well the main reason is that it's compact, and your code will be a lot more cleaner if split into modules, rather than having the form have ALL the code, that would make the form code too disturbing on human mind... so it's better to have the engine.bas, or hell here's what you can do, split the funtions into modules like, control.bas, sound.bas, drawing.bas, sprite.bas etc.. and then just put them into your project and it'll be EVEN MORE COMPACT and EASY TO UNDERSTAND..... also say if you don't want sound in your game, you can just NOT ADD sound.bas and there won't be sound in your game... or say you decide to use directdraw instead of your drawing functions, you can just use directdraw and not include drawing.bas... see so many possiblities.. :)
Baron_Fel
Apr 6th, 2000, 07:59 AM
Thanks! Thats what I thought...The more you break it down into the smaller parts the less confusing it is and easier to modify for other games.