• Best of luck to the class of 2024 for their HSC exams. You got this!
    Let us know your thoughts on the HSC exams here
  • YOU can help the next generation of students in the community!
    Share your trial papers and notes on our Notes & Resources page
MedVision ad

Major Project - what are you doing? (2 Viewers)

What are you doing?

  • Game

    Votes: 23 50.0%
  • Database kind of thing

    Votes: 14 30.4%
  • Something that is not a game and does not contain a databse

    Votes: 15 32.6%

  • Total voters
    46

chris42

Member
Joined
Oct 4, 2003
Messages
649
Location
Sydney
Gender
Male
HSC
2004
Thanks, yeah the file was purposely meant to be obvious, remebering this was my SDD project, incase the teacher accidentally used the game so many times it expired, i wanted an easy way for them to get the program running again.

By the way it's mean't to stop you going the the wrong way, for example if its player's 1 turn, it won't let them go backwards unless there a king checker. Well that was the idea anyways.. Still a few little bugs to fix up in it, but 99% ok. But i do admit those error messages can get annoying
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Originally posted by chris42
Thanks, yeah the file was purposely meant to be obvious, remebering this was my SDD project, incase the teacher accidentally used the game so many times it expired, i wanted an easy way for them to get the program running again.

By the way it's mean't to stop you going the the wrong way, for example if its player's 1 turn, it won't let them go backwards unless there a king checker. Well that was the idea anyways.. Still a few little bugs to fix up in it, but 99% ok. But i do admit those error messages can get annoying
You should of stored the expiration date in the registry
then made a boolean stored in the registry to see if the user unlocked it, and for unlocking you could of wrote something simple like for the unlock code

you can just check if the entered number

When added 1 to it and divided by 7 or something and - 1 is equal to a specific number, if it is then change the boolean in the registry and on load up the whole program is a 100 % registered copy :)

just some advice on future projects for educational purposes.
 

chris42

Member
Joined
Oct 4, 2003
Messages
649
Location
Sydney
Gender
Male
HSC
2004
Thanks, You wouldn't happen to know VB code on writing the registery, I have never done it out of fear I'd screw up the operating system.
 

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Originally posted by chris42
Thanks, You wouldn't happen to know VB code on writing the registery, I have never done it out of fear I'd screw up the operating system.

for the basic registry saving code in VB where you DON'T get to choose where the key is stored, but the key is stored in a default location ok let's do a test

Make a new project, stick a button on the form

i don't have VB in my face right now so here goes.

SaveSetting"MyTestApp","Options","ThisIsASetting","ThisIsTheValueOfTheKey"

MsgBox("Setting Saved!")

i just remembered stupid VB6 Syntax, coded edited it should work now


just copy and paste that in the button's click event
 
Last edited:

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
One more thing to verify if the key is saved

Start> Run

Type in regedit

click OK

navigate to

\HKEY_CURRENT_USER\Software\VB adn VBA Program Settings\MyTestApp
 

Fosweb

I could be your Doctor...
Joined
Jun 20, 2003
Messages
594
Location
UNSW. Still.
Gender
Male
HSC
2003
You wont screw the OS if you don't change anything 'critical' to it...

If you installed VB6 on your comp, then you should also have a program installed, which you can access from the start menu called: "API Text Viewer" (For me: Start--> All Programs--> Microsoft Visual Basic 6--> Microsoft Visual Basic 6.0 Tools--> API Text Viewer)
Open it, and Load the text file: "WIN32API.TXT" into it, and search for anything called RegXXXXXXXX. This will give you the API calls for editing the registry.

Just type one of them into google to find out 'how' to use them...

Also check this one out: http://www.vbaccelerator.com/home/V...Control/VB6_Registry_Editor_Demonstration.asp
 

chris42

Member
Joined
Oct 4, 2003
Messages
649
Location
Sydney
Gender
Male
HSC
2004
Cool, Thanks for that. I'm still learning, but thats why we have people to ask :)
 

chris42

Member
Joined
Oct 4, 2003
Messages
649
Location
Sydney
Gender
Male
HSC
2004
Just out of interest how useful was the media player in the program, and any particular colour schemes for checkers that weren't there ?
 

Fosweb

I could be your Doctor...
Joined
Jun 20, 2003
Messages
594
Location
UNSW. Still.
Gender
Male
HSC
2003
Also another thing: Which is off the topic from your major project:
If you are ever trying to conceal a link from someone on your website, like the one to download the program, don't have that link in the form's action......
If you know any php/cgi stuff, you can easily whip up a little program to do that stuff.
 

chris42

Member
Joined
Oct 4, 2003
Messages
649
Location
Sydney
Gender
Male
HSC
2004
Yeah.. Something I want to get into after the HSC.. PHP I'm looking forward too, 6 months to learn as much as possible before uni :)
 

Glide

Member
Joined
Oct 13, 2003
Messages
103
Hey guys...

I was im the same class as chris and cube3 :)
Chris - for writing to the registry, simply use the 'getsetting' and 'savesetting' functions built into VB. Its not 'true' registry editing, but its sooooo much easier than using API calls... I used it for both games I made, power naughts (even used it to store high scores - I hate databases :) and freespace.

There are heaps of encrypt and decrypt functions of planetsourcecode, which you can use to encode registry strings and decode them again :)

Steve is making a 3D version of a game similar to freespace now... hes completed the menu interface and optimised networking.. and it looks real good.. once the HSC is over i'll probibly lend him a hand, not that I know much about DirectX :\
Hes bought heaps of books to do it in anyway :)

Would have been nice if all 3 of us actually recieved some credit for our games.. come on they all rocked, we spent ages making them... but the D&T projects took all the credit :(

Oh well no chance of that now.. the school wants to charge me and steve $200 each because we told them about a huge security hole in their network *sigh*
Mr Linfoot has some serious issues... after all he did tell steve that showing somebody how to use text-2-speech was like 'giving somebody a loaded gun'.

Anyway, back to the studying.. :)

Heres a screenshot of my 99% game if anyone is interested :)
Its multi-player only (via network)

http://dandre.customer.netspace.net.au/freespace.jpg
 

Fosweb

I could be your Doctor...
Joined
Jun 20, 2003
Messages
594
Location
UNSW. Still.
Gender
Male
HSC
2003
Quote Your site:
"You have no business here fool!
-Mr T"

I'm interested. Do you have a link so I can play?
 

Glide

Member
Joined
Oct 13, 2003
Messages
103
Its a tad on the large side, about 80mb (w/o music).. So I dont where to upload it :S
 

-X-

Member
Joined
Aug 10, 2003
Messages
481
Gender
Undisclosed
HSC
N/A
Thats too big for a game with no music dude. What language did you code it in? What ever language its in, 80mb is still too big. lol

Are you using large images for the graphics?
 
Last edited:

Winston

Active Member
Joined
Aug 30, 2002
Messages
6,128
Gender
Undisclosed
HSC
2003
Originally posted by -X-
Thats too big for a game with no music dude. What language did you code it in? What ever language its in, 80mb is still too big. lol

Are you using large images for the graphics?
Yeah perhaps his using BMP's... hmmmm it is quite large... lol
 

Glide

Member
Joined
Oct 13, 2003
Messages
103
I managed to compress it down via RAR to ~20mb (SFX archive)

Yes, the maps are BMP's which means they are huge, and of course you need one for the mask, and another file for the collision map since GetPixel is so damn slow...
(its coded in Visual Basic)
All the gfx were done by myself, except the ships and rocket (and some of the map planet gfx :)

I've managed to compress it down to 20mb with 2 mp3's (one being for the small intro & menu music)

Run the install ocx batch file to setup the OCX's... I hope it works, visual basic has issues with friggin external components.

Download it from:
http://earth.prohosting.com/glide09/freespace.html
 
Last edited:

-X-

Member
Joined
Aug 10, 2003
Messages
481
Gender
Undisclosed
HSC
N/A
looks good but why did u use that method for rotating? i.e. Load a different pic for the ship every time you press direction keys? You could have just rotated the actual object rather than loading one with a different angle. That just makes it bigger and slower.

BTW: How are you detecting collisions?
 

Glide

Member
Joined
Oct 13, 2003
Messages
103
At first I did rotate the object using BitBlt, but the function is way too slow, which resulted in a fps drop and sluggish performance over-all... So I went for the method of using picture angles.

A friend helped me write the collision system.. because the GetPixel function of bitblt is so slow, when you first load a map it creates a collision map (you can test it out by deleting the .dat file for the map) from the mask, black parts you cant move in, white parts you can. It makes a binary file of 0's and 1's (0 = can move - 1 = cant move) and checks the file with the co-ordinates of your ship, basically. Cheated a bit with the collisions, it only checks on 4 points of the ship (middle points), rather than every pixel in the image :)
 

Glide

Member
Joined
Oct 13, 2003
Messages
103
Im not sure if I was using the wrong API call, or a 16bit version or something, but it was slow :|

The radial collision detection looks great, im not a maths expert (I do general :\) thats why mine was primative :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Top