Looking for a little something to program

Discuss whatever you want here--both QB and non-QB related. Anything from the DEF INT command to the meaning of life!

Moderators: Pete, Mods

Post Reply
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Looking for a little something to program

Post 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!
Image
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post by Z!re »

Make a MMORPG
Start with a terrain engine, then gui, then [...]
I have left this dump.
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

0_o
o_0

I wish I could make an mmorpg! Yeah right!
Image
User avatar
Brandon
Coder
Posts: 47
Joined: Sat Nov 19, 2005 9:24 pm
Location: NY
Contact:

GUI

Post by Brandon »

Make a GUI!!
User avatar
Seb McClouth
Veteran
Posts: 342
Joined: Wed Nov 09, 2005 7:47 am
Location: Inside the Matrix...
Contact:

Post 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!!
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
User avatar
redcrab
Newbie
Posts: 4
Joined: Mon Jul 03, 2006 9:29 am
Location: France
Contact:

Post 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 !
Last edited by redcrab on Mon Jul 03, 2006 5:20 pm, edited 1 time in total.
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post 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.
I have left this dump.
moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Re: Looking for a little something to program

Post 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.

*****
User avatar
redcrab
Newbie
Posts: 4
Joined: Mon Jul 03, 2006 9:29 am
Location: France
Contact:

Post 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 !
Z!re
Veteran
Posts: 887
Joined: Wed Aug 04, 2004 11:15 am

Post 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.
I have left this dump.
holdtight
Newbie
Posts: 1
Joined: Sun Jul 16, 2006 8:49 pm

Post 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?
sid6.7
Veteran
Posts: 318
Joined: Tue Jun 21, 2005 8:51 am
Location: west USA
Contact:

Post 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...
Patz QuickBASIC Creations
Veteran
Posts: 399
Joined: Wed Mar 02, 2005 9:01 pm
Location: Nashville, Tennessee
Contact:

Re: Looking for a little something to program

Post 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 :)
User avatar
Robot2037
Newbie
Posts: 6
Joined: Mon Nov 07, 2005 10:18 am
Contact:

Post by Robot2037 »

i think some arcade would be better and easier than creating MMORPG...i love good arcade games :wink:
.Robot2037's website.
http://robot2037.mysteria.cz

Need a music (MOD, S3M, XM, IT) for your game? Feel free to contact me via ICQ or mail...you can also check music section at my web.
moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Re: Looking for a little something to program

Post 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
moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post 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
*****
If you are ahead of me, lead.
If you are behind me, follow.
If you are not doing anything,
Get out of the way.
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

Moneo,

I would, but I have me hands full with ScrollonaPixel.
Image
moneo
Veteran
Posts: 451
Joined: Tue Jun 28, 2005 7:00 pm
Location: Mexico City, Mexico

Post 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.

*****
If you are ahead of me, lead.
If you are behind me, follow.
If you are not doing anything,
Get out of the way.
User avatar
Seb McClouth
Veteran
Posts: 342
Joined: Wed Nov 09, 2005 7:47 am
Location: Inside the Matrix...
Contact:

Post 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?
QBinux is a Linux distribution with the aim of integrating the work of the vast community of free software developers at Pete's QBASIC Site in order to create a modern, performant, safe and easy to use system for system administrators and desktop users.
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

Moneo,

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