Page 1 of 1

Looking for a little something to program

Posted: Sun Jul 02, 2006 9:57 pm
by {Nathan}
I am NOT good at managing large programs, but I want a small program that I can add on to. I need an idea! Anything, stupid and useless or dreadfully useful. A game... anything. I need *something* to do this summer!

Posted: Mon Jul 03, 2006 7:44 am
by Z!re
Make a MMORPG
Start with a terrain engine, then gui, then [...]

Posted: Mon Jul 03, 2006 12:29 pm
by {Nathan}
0_o
o_0

I wish I could make an mmorpg! Yeah right!

GUI

Posted: Mon Jul 03, 2006 12:59 pm
by Brandon
Make a GUI!!

Posted: Mon Jul 03, 2006 2:33 pm
by Seb McClouth
Nathan,

Make a core which is stable enough like unix...
make it bootable... that'll keep you up till the end of this summer...

oh in QB ofcourse!!

Posted: Mon Jul 03, 2006 4:34 pm
by redcrab
Summer is long and short, all depends how prolix you are...
Keep in mind your target scope..
I mean what ever you do... Finish it (a complete program.. end to end) before end of summer

It's sad to see unfinished project (often called "DEMO" ;D )

When I've some time to spend to create proggies... I like to create short complete program with some utopic programming constraints see http://csgp.suret.net

You can do something in the same way ... Utopic Fun Short Cute and Complete Proggies !

That could be fun to see your result time to time during this summer.

... So you requested an idea ...
--- Why not a program that transform automaticaly any "only-one-page-QBExpress-issue" into multipage subsite. Very usefull for Qmmunity but may be not so fun for a summer...
--- Or a mini-edu-game to educate children to do elementary math, with a lot of color or cartoonist sprites, with an high level of ergornimy (for kids of course)
--- Or a minigame like a space ship that need to destroy asteroid around him before they come to colide it.
--- Or ... as you said, try to create a module usefull for a large project, so convince a project leader with arguments(???), that your workforce is usefull during this summer... I've never tried this kind of request :S ...

Hope you will get fun this summer !

Posted: Mon Jul 03, 2006 5:12 pm
by Z!re
Nathan1993 wrote:0_o
o_0

I wish I could make an mmorpg! Yeah right!
A MMORPG is:
A terrain engine (P*P scroller is enough)
Object handling (Linked list or dynamic optimized arrays)
GUI system
AI handling
Spell effects (You can let loose your imaginative side)
Network code
Player interaction (Via chat and perhaps PvP)
Ingame systems such as levelup algorithms, damage vs armor alorithms etc
Item creation
Character creation
Story creation
Script handler (And VM to execute the script)
Preferably an automatic patcher to keep the clients up to date

Make all those small parts,and you got an MMORPG

I know you possess the skills to make each individual part, and the things you dont know how to you, you're more than capable of learning.

Re: Looking for a little something to program

Posted: Mon Jul 03, 2006 5:23 pm
by moneo
Nathan1993 wrote:I am NOT good at managing large programs, but I want a small program that I can add on to. I need an idea! Anything, stupid and useless or dreadfully useful. A game... anything. I need *something* to do this summer!
I have an idea for some small stuff you could write --- handy functions or subs. You could write and test out some of these for later use in your programs. Some examples:
* Logic for proper generating of random numbers.
* Logic for sorting arrays.
* Logic for validating input numbers, with or without negative numbers, and with or without containing decimals.
* Logic for using DATE$ and TIME$ and re-formatting these values.
* Logic for validating input dates.
* Logic to search arrays, using a straight search or using a binary search.

I'm sure you could find other bits of logic that you often need in your programs. Why reinvent the wheel? Have your own set of these bits of logic ready to go, kinda like a library.

You should write little test programs to test out your routines. First get them working with normal input, and then try to make the routines fail by giving them all kinds of garbage. If your routines survive, then you have proven code that you don't ever need to worry about again.

Make the logic in your routines as straightforward as possible, and don't worry about speed. As Albert Einstein said: "Make things simple, but not simpler."

Tell me what you think about all this.

*****

Posted: Mon Jul 03, 2006 5:29 pm
by redcrab
Z!re wrote:
Nathan1993 wrote:0_o
o_0

I wish I could make an mmorpg! Yeah right!
A MMORPG is:
A terrain engine (P*P scroller is enough)
Object handling (Linked list or dynamic optimized arrays)
GUI system
AI handling
Spell effects (You can let loose your imaginative side)
Network code
Player interaction (Via chat and perhaps PvP)
Ingame systems such as levelup algorithms, damage vs armor alorithms etc
Item creation
Character creation
Story creation
Script handler (And VM to execute the script)
Preferably an automatic patcher to keep the clients up to date

Make all those small parts,and you got an MMORPG

I know you possess the skills to make each individual part, and the things you dont know how to you, you're more than capable of learning.

I love your sense of humor 8)

- I've time to create my bike
--- Good then create a space ship
- What is a space ship ?
--- Something like a bike but with few more small parts.



Cool & Fun !

Posted: Mon Jul 03, 2006 9:33 pm
by Z!re
redcrab wrote:
Z!re wrote:
Nathan1993 wrote:0_o
o_0

I wish I could make an mmorpg! Yeah right!
A MMORPG is:
A terrain engine (P*P scroller is enough)
Object handling (Linked list or dynamic optimized arrays)
GUI system
AI handling
Spell effects (You can let loose your imaginative side)
Network code
Player interaction (Via chat and perhaps PvP)
Ingame systems such as levelup algorithms, damage vs armor alorithms etc
Item creation
Character creation
Story creation
Script handler (And VM to execute the script)
Preferably an automatic patcher to keep the clients up to date

Make all those small parts,and you got an MMORPG

I know you possess the skills to make each individual part, and the things you dont know how to you, you're more than capable of learning.

I love your sense of humor 8)

- I've time to create my bike
--- Good then create a space ship
- What is a space ship ?
--- Something like a bike but with few more small parts.



Cool & Fun !
If you dissregard the cost of metal/electronics, then yes, you can learn and build a spacecraft.

Posted: Sun Jul 16, 2006 9:04 pm
by holdtight
i have another suggestion........ from a stranger!

how about a 2d platformer game?

where a character has more abilities rather than run, jump and shoot stuff?

Posted: Mon Jul 17, 2006 4:31 pm
by sid6.7
holdtight wrote:i have another suggestion........ from a stranger!

how about a 2d platformer game?

where a character has more abilities rather than run, jump and shoot stuff?

i like this idea....


OR

make just a simple game that uses just 4 keys(u pick)
PLUS
that we can look at the code and see how you made it
for us "graphically challanged" qb'rs...

in as plain of documentaion of code as you can do...

Re: Looking for a little something to program

Posted: Thu Jul 20, 2006 7:03 pm
by Patz QuickBASIC Creations
moneo wrote:I have an idea for some small stuff you could write --- handy functions or subs. You could write and test out some of these for later use in your programs. Some examples:
* Logic for proper generating of random numbers.
* Logic for sorting arrays.
* Logic for validating input numbers, with or without negative numbers, and with or without containing decimals.
* Logic for using DATE$ and TIME$ and re-formatting these values.
* Logic for validating input dates.
* Logic to search arrays, using a straight search or using a binary search.

I'm sure you could find other bits of logic that you often need in your programs. Why reinvent the wheel? Have your own set of these bits of logic ready to go, kinda like a library.

You should write little test programs to test out your routines. First get them working with normal input, and then try to make the routines fail by giving them all kinds of garbage. If your routines survive, then you have proven code that you don't ever need to worry about again.

Make the logic in your routines as straightforward as possible, and don't worry about speed. As Albert Einstein said: "Make things simple, but not simpler."

Tell me what you think about all this.

*****
You know what I think? All of these ideas are sooo simple. But simplicity does not define usefullness. I have worked on a few SUBs and FUNCTIONs for my TUI project.

A quick summary of what I have done thus far (as of useful SUBs and FUNCTIONs)

Special input routine
Syntax: StringToSaveTo$ = PInput$(YLocation, XLocation, Replace$, LimitOfCharacters)
YLocation and XLocation - Where to initally position on screen
Replace$ - What to replace typed in characters with. Useful for password prompts and things of the sort. If left blank, the characters are listed as the characters that were typed in.
LimitOfCharacters - Maximum amount of characters that are allowed to be stored.

Typewriter - Outputs characters to screen as if being typed by a typewriter
Syntax: Typewriter XPosition, YPosition. StringToOutput$

FiveByFive - Outputs all letters in the given string as blocks, measuring 5x5 spaces
Syntax: FiveByFive XPosition, YPosition, StringToOutput%

ConDate - Converts DATE$ to normal, everyday format.
Syntax - StringToStore$ = ConDate$(DATE$)
Ex. 05-01-1992 translates into May 1, 1992

ConTime - Converts TIME$ to 12 hour format.
Syntax - StringToStore=ConTime$(TIME$)
Ex. 17:55:42 translates into 5:55:42 P.M.


As for the "* Logic for validating input numbers, with or without negative numbers, and with or without containing decimals.", this could be easily attained.

Negative number test:

Code: Select all

Function NegativeTest(NumberToTest%)
IF ABS(NumberToTest%)=NumberToTest%
'Number is positive, return 0 to symbolize FALSE
NegativeTest=0
ELSE
'Number is not positive (therefore is negative), return -1 to symbolize TRUE
NegativeTest=-1
END IF
END FUNCTION
No decimal test:

Code: Select all

Function DecimalTest(NumberToTest%)
IF INT(NumberToTest%)=NumberToTest%
'Number has no decimals, return 0 to symbolize false.
DecimalTest=0
ELSE
'Number has decimals, return -1 to symbolize TRUE
DecimalTest=-1
END IF
END FUNCTION
Simple, but effective.


I'm also going to be on more often, since I have internet access for a while :)

Posted: Fri Jul 21, 2006 1:54 pm
by Robot2037
i think some arcade would be better and easier than creating MMORPG...i love good arcade games :wink:

Re: Looking for a little something to program

Posted: Fri Jul 21, 2006 6:45 pm
by moneo
Patz QuickBASIC Creations wrote: ......
You know what I think? All of these ideas are sooo simple.
They might be simple for you, but what about for Nathan1993?
ConDate - Converts DATE$ to normal, everyday format.
Syntax - StringToStore$ = ConDate$(DATE$)
Ex. 05-01-1992 translates into May 1, 1992
That's nice when you use the DATE$ statement,
but what if the date was input by a user, or came to you from within a file? You would need to validate the date before you used your ConDate$ function. How would you go about validating such a date?
ConTime - Converts TIME$ to 12 hour format.
Syntax - StringToStore=ConTime$(TIME$)
Ex. 17:55:42 translates into 5:55:42 P.M.
Just out of curiousity, what would the time 00:00:42 translate to using your ConTime$ function?
And, how would you validate the time if it were given to you by a user or from a file, so that your ConTime$ function wouldn't go nuts?
As for the "* Logic for validating input numbers, with or without negative numbers, and with or without containing decimals.", this could be easily attained.
Negative number test:

Code: Select all

Function NegativeTest(NumberToTest%)
IF ABS(NumberToTest%)=NumberToTest%
'Number is positive, return 0 to symbolize FALSE
NegativeTest=0
ELSE
'Number is not positive (therefore is negative), return -1 to symbolize TRUE
NegativeTest=-1
END IF
END FUNCTION
No decimal test:

Code: Select all

Function DecimalTest(NumberToTest%)
IF INT(NumberToTest%)=NumberToTest%
'Number has no decimals, return 0 to symbolize false.
DecimalTest=0
ELSE
'Number has decimals, return -1 to symbolize TRUE
DecimalTest=-1
END IF
END FUNCTION
Simple, but effective.
Yeah, too simple. What you're doing is testing or determining if the numbers are negative or if the numbers have any decimals. You're working with numbers that are already converted to an INTEGER. By the way, an integer (%) cannot have decimals, so that test doesn't make any sense. If the number was single (!) or double (#) it would then make sense.

But, that's not what I mean by VALIDATING. I mean getting a number keyed in by the user as a string and checking it to make sure that it it doesn't contain any non-numeric characters. In the case of validating numbers containing decimals, you have to:
* Make sure that it doesn't exceed a given number of decimal positions. That is, if you expect a number with 3 decimal places, 5 decimal places is an error.
* Make sure that there is only one decimal point, or none, in the entire number.
* Make sure that, other than the decimal point, that all the other characters are numeric.
* If 3 decimal places are allowed, then 2 or 1 or none are also valid.

Try above validation routine on for size.

Regards..... Moneo

Posted: Tue Jul 25, 2006 8:30 pm
by moneo
This is for Nathan1993 and Patz.

The code that folows is a little program to validate dates in a YYYYMMDD format. That's all it does, but it does the validation in a way that I call "bulletproof", that is, no invalid date will be accepted.

I have been using this date validation logic successfully for about 18 years in hundreds of programs.

Nathan, as "something to do", you might study the code to learn how date validation is done. Also, do some testing of this program. If you have any questions, I'll be glad to answer them.

Code: Select all

DEFINT A-Z

DECLARE FUNCTION   NumStrict    (z$)
DECLARE FUNCTION   IsLeapYear%  (z) 

rem Setup days-per-month table.
DIM zmo(1 to 12)
DATA 31,28,31,30,31,30,31,31,30,31,30,31
FOR x=1 TO 12:READ zmo(x):NEXT x

REM ***********************************************************************

input "Enter date to be validated as YYYYMMDD ",z$
gosub date.check
if date.ok=0 then print "Invalid Date" else print "Date ok"
SYSTEM

REM ****************  DATE.CHECK SUBROUTINE  **************************
REM *
REM *** VALIDATE A DATE IN YYYYMMDD FORMAT.
REM *
REM *  INPUT: Z$       = Given date in format YYYYMMDD.
REM *
REM * OUTPUT: DATE.OK = -1 if input date is VALID.   (true)
REM *                    0 if input date is INVALID. (false)                   
REM *
date.check:
  date.ok = 0                           'preset to false
  IF LEN(z$)<>8 then RETURN 
  IF NOT NumStrict(z$) then RETURN
  zdd=VAL(RIGHT$(z$,2))                 'Set day               
  zmm=VAL(MID$(z$,5,2))                 'Set month.
  zyy=VAL(LEFT$(z$,4))                  'Set year.
  IF zmm<1 OR zmm>12 OR zdd<1 OR zdd>31 then RETURN
  zleapinc=-(zmm=2 AND IsLeapYear(zyy)) '= 1 if Feb and leapyear, else 0.
  IF zmo(zmm)+zleapinc < zdd then RETURN
  date.ok = -1                          '-1=valid (true)
RETURN     

END

' ====================== ISLEAPYEAR ==========================
'         Determines if a year is a leap year or not.
' ============================================================
'
FUNCTION IsLeapYear (z) STATIC
   ' If the year is evenly divisible by 4 and not divisible
   ' by 100, or if the year is evenly divisible by 400, then
   ' it's a leap year:
   IsLeapYear = (z MOD 4 = 0 AND z MOD 100 <> 0) OR (z MOD 400 = 0)
END FUNCTION

' =================================================================

FUNCTION NumStrict (Z$)
  '
  ' *** CHECK FOR STRICTLY NUMERIC (NO NULL, NO NEGATIVE, NO DECIMAL)
  '
  NumStrict=0         'Init to False (not strictly numeric)

  IF z$="" then EXIT FUNCTION

  FOR x = 1 TO LEN(z$)
      a=ASC(MID$(z$,x,1))
      IF a<48 OR a>57 then EXIT FUNCTION
  NEXT x

  NumStrict = -1      'True

END FUNCTION
*****

Posted: Tue Jul 25, 2006 9:47 pm
by {Nathan}
Moneo,

I would, but I have me hands full with ScrollonaPixel.

Posted: Wed Jul 26, 2006 9:20 pm
by moneo
Nathan1993,

I know that you're just a kid, but you were "stroking" us here trying to find things for you to do this summer. Remember that you started this thread asking for stuff. If you now have other things to do, then you should have said so earlier.

Next time no one will pay attention to you. It's kinda like the story about the kid that was crying "wolf" all the time.

*****

Posted: Thu Jul 27, 2006 9:39 am
by Seb McClouth
moneo wrote:Nathan1993,
It's kinda like the story about the kid that was crying "wolf" all the time.
What wolf? Where? Here? Not a werewolf?

Posted: Thu Jul 27, 2006 12:07 pm
by {Nathan}
Moneo,

I started scrollonapixel in response to Z!re's post. So this thread served it's purpose.