Oh my lord.

Well for those who care I made a post a little while ago about my Science GCSE exams.

Anyway, recently my official grades were returned, after travelling the world to be marked and travelling back I was decently surprised by my grades, now as I stated for each segment of Science (Biology, Chemistry, Physics), I had got separate grades which overall averaged out to a certain mark scheme.

So what did I get?

Well for Physics I got 100%, I know!, Unbelievable, I was extremely surprised, that gave me an A*.

For Chemistry I also got 100%, I know!, Even less believable, I was shocked when my grades returned to me, I doubted myself assuming I unconsciously cheating through out the test, but that couldn't have happened, the desks were way to far apart. So Chemistry was also an A*.

For Biology however, I did not do so well, I got 72.5%, which is a B but it ruined my grade-set. So overall I got an A* as my grades put together were high enough to beat the average A* of an average UK student, basically, I topped it!

Wahoo, my parents are so proud of me :D

Posted by Haywire on Friday, May 01, 2009 12:42PM - 21 comments / Members say: yea +1, nay -1

INI files

Lately I've been messing quite a bit with INI files with C++ and I want to share what I've learnt so far,

I've written many programs that use INI files, for example I have this one program which creates a window using the winAPI and then as soon as you close it, it saves the window width and height into an INI file. After they run the program again if an INI file exists, it reads the INI file and sets the width and height to the value read from the INI file. Allowing them to have the same sized window as they had when they last used it.

Now that was a basic use of an INI file and there are other things you can do, but understanding the concept comes first.

An INI file is a file which configures a program set to read from it. They have a special format, a bit like a programming language but a lot easier to learn as it requires less than 5 minutes to understand. An INI file is a simple text file and is based on Windows, it's also used on other platforms but on Windows it is now deprecated, instead Data is stored into the registry. An INI file commonly exists with the .ini extension but you may find it in ".cfg", ".config" and even the rare ".txt".

Each INI file contains a section, a section is like the parent of the variables that are later going to be read. Everything starts with a section and you can have as many sections as you want. This may be a bad analogy but think of a section as a book's chapter name, the chapter contains much text, being the story - or - imagine a box, all the boxes are the same size and too differentiate between them you need to name them, and possible write a label which sticks on to them, that is a bit like the section in this case.

So a section would be shown like this:
[Section1]
[Section2]
[MyOwnNamedSection]


Now, you want to give each "box" (section) something to put inside of it? How about a variable index with a toggle value of 1 and 0 with the parameter name toggleVal in a section named ToggleValue:
[ToggleValue]
toggleVal=1

Note: All sections can have as many variable indexes/parameters as you want, and an INI file can have as many sections as you want.

Now as all good programmers should comment their work, the same concept applies here just with a different trigger, in DM and other selected languages, the comment trigger would be "//" (2 forward slashes), but with INI files it's ";" (semi-colon). So for those who haven't really worked with many programming languages.

Here is the example shown earlier with comments:
[ToggleValue]
toggleVal=1 ;This value can be either 1 and 0, 1 being true and 0 being false.


Now here is a larger example:
;Last updated June 13th 1994
[WindowConfig]
width=456 ;Width of window
height=345 ;Height of window
bgcolour=#4523CF ;Window background colour
fgcolour=#FFFFFF ;Window forground colour
title="INI with Windows" ;Title of my window
allow_resize=1 ;Toggle 1 and 0 to allow/disallow window resizing
allow_minimise=1 ;Toggle 1 and 0 to allow/disallow window minimising
allow_maximise=0 ;Toggle 1 and 0 to allow/disallow window maximising
[OtherParemeters]
call_it=3453543
[Messages]
on_enter="Welcome to INI with Windows"
on_close="Bye, I hope you had a great time"


As you may notice I've assigned text as well as numbers to some parameters, which is perfectly fine, I've wrapped the text with (")'s, that's because most API's that read the parameters need the (")'s to help them read the variable, it's usually used to differentiate numbers and integers.

I hope you've understood the basics, read more about INI files here.

To read INI files use this library named "INI reader" written by Audeuro.

Haywire

Posted by Haywire on Saturday, April 25, 2009 08:01AM - 0 comments / Members say: yea +1, nay -2

How fast is your internet?

Well recently everyone on Chatters was having an internet speed contest and I thought I'd check my internet speed; only to find horrific results:

Haywire's ultra-crap internet

Also, no, I am not on DSL. In the coming future I will most-possible changing my ISP, I'll hope to get around 8mb download, or atleast 4+.

So how fast is your internet? Use speedtest.net to check.

On a side-note, I'm going to play some Crossfire for the first time and I've just completed writing my .bmp reader in C++ without using windows.h's stuctures (I wrote my own structures). For notes on the .bmp format structure click here.

Anyway, I hope you're all having fun in Spring Break,

Haywire

Posted by Haywire on Friday, April 10, 2009 01:23PM - 21 comments / Members say: yea +0, nay -1

Amazing video and new library.

Okay, first I'll warn everyone to back off (in a kind manner). I have just whipped a short, new library, as you may have noticed, named "H_DirectorySearch". It's basically me using a Dynamic Link Library (dll - a precompiled library used later to save ram usage) to look through a directory specified.

Now you must be thinking: "hold on, that's useless, DM already contains the flist() procedure" - yes, that's correct but I only realised that a couple of minutes after I had completed the library, so now the purpose of the library changes, now it could be used as a directory searcher (not recommened - use flist() instead) but better yet you could use it to enhance your knowledge of knowing how to use a .dll in a DM program.

One more thing, BYOND has a safety "thing" for external program calls with things such as call() and shell(), I won't bother explaining, you could research it on your time but yeah, my library will probably ask for an agreement to run the dll when running the DM program.

Anyway, now back to the video. After randomly scrambling through Youtube I found this amazing video about Mind Control and Computer Communication - this might later enhance gaming experience by a ton. Look at this video, a demonstration is also shown at around 10:35 and some of the audience comments are quite entertaining.

Click here to see the video.

Anyway, I'm off, It's spring break and I must do something active, hope you are having fun in spring break.

P.S. If you really want to see the DLL's inner workings then leave a comment and I'll put it up.

Haywire

Posted by Haywire on Wednesday, April 08, 2009 10:58AM - 2 comments / Members say: yea +0, nay -1

Audio Formats!

Poll: Which is the most "universal/widely used" audio format?

.mp3 69% (46)
.ogg 7% (5)
.wav 7% (5)
.midi 6% (4)
.wma 4% (3)
.m4a 0% (0)
.mpg 4% (3)

Login to vote.

Well okay, recently I've been wondering which is the most "universal/widely used" audio format to convert all my audio files to and I'm just not sure, I've been googling a bit but it'd help my research a bit more if I got a poll of results from a decent sized community. So I've whipped up a poll, please comment with anymore suggestions. I want to convert all my audio files to a suitable format that has a high chance of running on any modern device.

Right now, I personally assume that .mp3 is most popular, but I'm not entirely sure, so I need your support.

Thank you,

Haywire

Posted by Haywire on Sunday, April 05, 2009 04:54AM - 11 comments / Members say: yea +1, nay -1

Haywire

Joined: Aug 24, 08

Email

Blog Calendar

September 2009
Su Mo Tu We Th Fr Sa
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      
 
«Jun  

My demos