Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modular Programming - please explain
#1
I'm creating a huge game and came to the subject modular programming.

I've read Nathan's article (Pushing the limits of Qb) and Typosoft Tutorial about Modular programming but still it's not clear to me.

What's so positive about modular programming. And how do I use it?

I'm working on an RPG, imagine I wan't a Pixel*Pixel-scrolling Module and a Enmemy-battle module how do I start?

I hope someone can help me and my post is clear to everyone (my englisch is bad)
Reply
#2
modular programming = using functions, subs, or external file
this divides your program into manageable parts. it also allows you to create your own commands

i.e. LoadImage "this.jpg", 1, 1

you won't find commands like that in ordinary QB. by using subs, functions or libraries, greater customization of the language can be acquired.

you can create a new sub/function by using the Edit menu in QB. I think the help file DOES tell you how to use them decently
ammit potato!
Reply
#3
I'll offer my own definition:

Modular programming is the idea that programs can be divided into manageable and to a certain degree independent parts that can be put together like... a hamburger.
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply
#4
Quote:I'll offer my own definition:

Modular programming is the idea that programs can be divided into manageable and to a certain degree independent parts that can be put together like... a hamburger.

lol. And one of the reasons modular programming is good, is that it's easy to use the same bit of code (subs) multiple times to do common things. Like adding a pickel, for example.
Reply
#5
I believe Nathan's article explains it cery well. What exactly do you not understand in the article?

Do you want to split your code into 2 or more modules?
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#6
Rel,
Is this the article you mentioned?

http://faq.qbasicnews.com/?blast=ModularizeIt

It is the only one I found in a quick search of the FAQ.
hrist Jesus came into the world to save sinners, of whom I am first.(I Timothy 1:15)

For God so loved the world, that He gave His only begotten Son,
that whoever believes in Him should not perish, but have eternal life.(John 3:16)
Reply
#7
No, its in the articles section, front page of this site ;*)
y smiley is 24 bit.
[Image: anya2.jpg]

Genso's Junkyard:
http://rel.betterwebber.com/
Reply
#8
http://www.qbasicnews.com/articles.php?id=30
Here it is Wink
Reply
#9
I managed to solve the problem myself.

I figured out that ther was something wrong with my arrays, After 2 hours changing REDIM's in to DIM's and DIM's in to REDIM's and making DIM's and REDIM's $STATIC or $DYNAMIC, my program did what is was programmed for to do.

Thank you all anyway for your help.
Reply
#10
If you're still planning on that HUGE game, I suggest you go with modular progging anyway. It will make things easier for you in the long run, plus you can't be serious about using gosub/gotos. That's all there is without subs -- you might as well use tsr-basic.
ammit potato!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)