Advertisement

Results for "Author: robert rayment"

6_2008-2009 #199814
RRChess(Updated)

~RRChess~ by Robert Rayment. Program to solve checkmate problems and play chess games with another person or against the computer. The chess engine is not very strong, only operating at 4 or 5-ply, so you should be able to win fairly easily but it might surprise you at times. Making such a program bug-free I found quite difficult. So far as I can tell, all the legal moves, castling rules, en passant, promotion etc are OK. There are WAV sounds in the resource file for CHECK, CHECKMATE etc. Games and positions can be saved and loaded. See Help for more info. in particular the section on Starting a game. (Zip 500 KB). __________________________________________________ Update: to allow computer to play on, if is it's turn, when move list is double-clicked. Code cleaned up a bit from CodeFixer. __________________________________________________ Update2: added a couple of extra color schemes. These can be changed in Sub cmdColorSchemes. __________________________________________________ Update3: fixed bug on sound skipping. __________________________________________________ Update4: correction to playback when computer given odds - so many subtleties! __________________________________________________ Update5: some typos and menu re-arrangement.

6_2008-2009 #199815
BigNum Calculator(Correction 1 Jul 2007))

BigNum Calculator by Robert Rayment. Does calculations on, up to, 1024 bit numbers (~310 dec & 256 hex digits). Operations on single numbers include shift left/right, roll left/right, Not, Factorial, Squared & Cubed. On two numbers - And, Or, Xor, Eqv, Imp, Div/Mod, Mul, Sub & Add. The full results can be displayed and saved to the clipboard or a file. All calculations are for positive integers only. Make sure to compile the program, particularly for large numbers. Machine code is used for some conversions to speed things up by a few seconds since they take much longer than calculations, principally for 4 digit factorials. For small numbers this has some educational value but very large numbers are just a curiosity, though apparently there is some use in encryption. Zip 27 KB. __________________________________________________ Update: Added view clipboard. __________________________________________________ Update2: Added permutations & combination. Div correction. __________________________________________________ Update3: Minor re-arrangements. __________________________________________________ Update 1st July 2007: Correct FullIntDivision routine.

6_2008-2009 #199816
Wavettes(Update 31 May))

~Wavettes~ by Robert Rayment. Designer for short WAVs using some maths formulae and a range of settings. Screenshot shows the settings. There are 3 dozen Presets (from the millions) to show the idea. These can be added to, from the program, and are saved in Presets.txt in the same folder. So can be easily editted with Notepad or whatever. WAVs can be saved as 8 or 16 bit mono, though there is usually not much difference. Some code is adapted from Ulli's prog at (CodeId=64845) and a UC container from Eric Madison at (CodeId=40130) is used. Making noisy WAVs is not to everyones's taste but I found it quite amusing and perhaps some of you will too! Zip 164 KB. __________________________________________________ Update (4th May) Compiles now with no advanced optimization. Seems to avoid a crash when exitting the exe on at least one system. One report I've had suggests that 'buzz' on headphones might be due to a Windows setting for volume or audio properties. __________________________________________________ Update (10th may) Behaviour of Play button modified to act more like normal button & some typos. __________________________________________________ Update (29th May) Replaced Play button with normal button. __________________________________________________ (31st May) Carles spotted an article in vbaccelerator.com which explains the real reason for 'crashes at shutdown' for some PCs when using XP themes with VB6. The URL is rather long so go to vbaccelerator.com, select VB section and search 'crashes at shutdown'. I haven't modified this code but you can try it if you want to. Otherwise simply delete the manifest file. __________________________________________________ Update (31st May) VBAccelerator code (see above) now included.

6_2008-2009 #199817
mini-Image Processor (Update 13 Aug)

mini-Image Processor by Robert Rayment. Demo of one way to load a standard picture into an array using GetDIBits, where the picture box is just a viewport, with zooming (using StretchDIBits) and scrolling. Pictures can be saved as 24bpp BMP or JPEG, either from the viewport, the whole image from the array or a selection. To make it a bit more interesting I've added a few effects to play with. If the manifest file causes problems then just rename or delete it. Only tested on WinXP. Zip 29 KB. __________________________________________________ Update 3 Aug: Pictures with width or height < 15 pixels were disallowed, now changed to <= 2 pixels. Consequently a correction to FileOps, the Flute filter and scrZoom. __________________________________________________ Update 4 Aug: Added saving to JPEG using the Ron van Tilburg (John Korejwa) class at CodeId=50351. Zip 49 KB. __________________________________________________ Update 5 Aug: Minor correction to vertical scrollbar position when zooming in with the horizontal cross-wire at the bottom of the picture. Also turn Select OFF when a scrollbar switches off. __________________________________________________ Update 10 Aug: LoadPicture Function simplified a bit. __________________________________________________ Update 11 Aug: Moved vertical scroll bar to normal position on the right of the viewport. Also New pictures now open at top-left instead of at bottom-left. Correction to edging for SmoothSharp effect. Option to change filter effects to continuous or stepped. Plus some minor tidying up. Zip 51 KB. __________________________________________________ Update 12 Aug: Buttons above the filter scrollbars will now act on the scrollbar value without having to press the scrollbars, in continuous or stepped mode. __________________________________________________ Update 13 Aug: Added routine to cJpeg.cls to save jpeg from data array, with Ron van Tilburg's help. Plus a few minor adjustments. Forgot to put manifest file in.

6_2008-2009 #199818
Paper Trace (Update 17 Aug)

Paper Trace by Robert Rayment. This consists of an image sheet (Loaded image), a translucent tracing sheet(Faded image to draw on) and a white paper sheet (The actual tracing that can be saved as a 2 color(B/W) BMP). The screenshot explains more. To show the method I've kept it simple in that large pictures are scaled down, avoiding scrollng code. Zip 36 KB. __________________________________________________ Update 10 Aug: LoadPicture Function simplified a bit. __________________________________________________ Update 14 Aug: Removed XOR wipeout in finished drawing by saving draw coords. Corrected a FreeDraw error. __________________________________________________ Update 17 Aug: Varying transparency does not now lose the drawing.

6_2008-2009 #199819
Plasma Play

Plasma Play by Robert Rayment. Just playing with plasmas & palettes, if you like that kind of thing. Only tested on WinXP, should be OK elsewhere. If you have trouble with the manifest file then rename or delete it. Zip 60KB.

6_2008-2009 #199820
Color Selector(Final 15 July)

Color Selector by Robert Rayment. Select a color from a list of 140 named colors or from an RGB gradient display. Color info to clipboard. Form location in ini file. Color names from www.learningwebdesign.com/colornames.html. Addition 12 July: Added, by request, spectrally sorted colors (empirical).... Change 13 July: Better Darker/Brighter action.... Additions 15 July: Added system color dialog & closest web-safe colors. Apart from any mistakes this is surely now finished! See Form1 for all updates. Zip 18 KB.

6_2008-2009 #199821
Linear Transforms 2 (Update 25 Jan 08)

Linear Transforms by Robert Rayment... Shows mapping a rectangular image onto a quadrilateral, circle, cylinder, cone and a sphere... This is re-worked from an old program of mine to speed it up and make more re-useable... Note that for the cylinder, cone and the sphere the image is only partly wrapped around... Five images are included... Only tested on Win XP... (Update 23 Jan 08)... Some redundant maths lines removed...(Update 25 Jan 08)... Simplified CommonDialog info and indicated where color bytes could be manipulated...Zip 185 KB.

6_2008-2009 #199822
Tiny GFX32 (Update 25JUL2012)

TinyGFX32 by Robert Rayment. (Update 25Jul2012.. 1. Avoid rare RTE for miss-match when Extracting some non-standard icons...2. Added new shade Tool. See TinyGFXUpdate.txt for other changes)....Program to make small bitmaps, icons and cursors - 1 x 1 to 64 x 64.... NOTE if the tinygfx.chm help file doesn't work with the program, open it on it's own, uncheck the security button and open.

6_2008-2009 #199823
Demo of 32bpp bitmap

Demo of 32bpp bitmap by Robert Rayment. Simple demonstration of manipulating a 32bpp BMP file. Zip 83 KB.

6_2008-2009 #199824
Particle Effects Demo(Update 10Jun08)

Particle Effects Demo by Robert Rayment (Update 10Jun08). Demonstration of a particle engine with various effects. Note that the green and white particle emitter can be moved around with the mouse. Also any pictures opened are auto-sized to a fixed display size... Update 10 Jun: Minor update to Sound ON/OFF caption which was reversed. Zip 135 Kb.

6_2008-2009 #199825
EarthWaterFireAirLight

Elemental NASM.(UPDATE Now works on Win2000 and Probably WinNT) The zip file is ~ 26KB

6_2008-2009 #199826
A386 machine code collection

A386 machine code collection by Robert Rayment. 1. Simple examples 2. Fractals. 3. PicBox1 4. PicBox2. All using the A386 assembler. Win 98, Zip 173 KB

6_2008-2009 #199827
Creating & Testing DLL with NASM

Creating & testing an assembler DLL using NASM, a freeware assembler. The demonstration DLL does Bit testing, shifting, rotating, clearing & setting.

6_2008-2009 #199828
FindWords

Finds words starting with, containing, ending with, >

6_2008-2009 #199829
RRPencil

I love pencil drawing and there's nothing to beat pencil and paper. On the computer the mouse never moves as easily as a pencil but mathematics does allow some types of drawing to be carried out much more quickly than would be possible by hand. This is a pencil drawing programme with 256 shades of grey. It has 21 drawing tools and a host of sub-tools all easily selected from on-screen toolbars. Many shaded shapes such as curved lines, tubes, cones etc can be drawn. All the standard picture formats can be loaded or added and re-positioned. Saving is either as a BMP or a JPG file. Any rectangular part of the picture can be saved. JPG saving and printing is accomplished by using a single exe, free-standing, freeware conversion program that takes a command line and is hence easily used in VB. The source and credits for this are included in the .zip file In addition to the tools there is a zoom facility, whole-picture scrolling, +, X & perspective hair-lines, settable brick & tile sizes, text with any font, size or angle, undo and two canvas sizes suitable for A4 paper. All the source files, including button bitmaps, are included. The .zip file is just over 1MB and the program is written for an 800x600 screen.

6_2008-2009 #199830
RR3D

RR3D: Displays a rotatable and scaleable wire frame of any 3D mathematical function. This can be made up from the normal VB maths plus inverse and hyperbolic functions. Functions can be created and saved as wanted. Image vertices can also be saved for use elsewhere. The MS ScriptControl Eval function simplifies calculations enormously and its use is demonstrated. Also shown are MoveToEx, LineTo which are much faster than the VB equivalents and very easy to use. Included are a set of string handling subroutines such as count characters, squeeze out spaces, replace sub-strings etc. Commented throughout including the 3D maths and perspective methods. All the files are visible and the program is written for an 800x600 screen.

6_2008-2009 #199831
Sixteen million colors DLL

16 Million Colors DLL. Example of a straightforward DLL, written with NASM, to cycle through all possible colors quickly. For 24-bit color only. All source code included. Zip file 8.5KB.

6_2008-2009 #199832
VB, Assembler & Resource files

VB, Assembler & Resource files by Robert Rayment (see small update below) Only those interested in this topic should download these files. If you have been following some of the VB+assembler progs I've been putting on PSC you may have noticed that the assembly part is either in a bin file (com in earlier examples) or in a DLL. The disadvantage of both these is that they need to be in the same folder as the prog. This is OK for testing but is a nuisance for an EXE. Also we're usually talking about small bits of assembler to beef up parts of VB (Heineken approach). The DLL may be specific and so is not appropriate to register. Assembled snippets are often much faster than VB. Also, once you've got over the red-tape and peculiarities of the particular assembler, its often _easier_ (this may be a secret so don't tell anyone) A DLL has a minimum size of 16KB and a bin file 4KB (cluster size). What this submission shows is how to put your assembler code into a resource file which gets incorporated into an EXE freeing it from associations and only taking a few more bytes than the bin file size. A 32-bit Hex/Long integer/Binary converter is developed to demonstrate these techniques. The zip file is ~11KB. UPDATE: it is possible to simplify the load from res by InCode = LoadResData(101, "CUSTOM") lpMCode = VarPtr(InCode(0)) avoiding the save to disc. Make sure to delete the line lpMCode = VarPtr(InCode(1))

6_2008-2009 #199833
VTrack

VTrack2 by Robert Rayment This program uses floor ray-casting from the eye onto a color-height byte array (ie for simplicity avoiding separate height & color maps). The color-heights are then projected back to a front surface byte array which blitted to the screen using the API StretchDIBits. The program can be run with or without machine code and it runs for any screen size or color setting There is an automatic mode which goes round a track once with timing. In the VB environment this takes about 300 secs, VB EXE takes between 35 and 65 secs depending on Voxel heights and machine code bewteen 12 and 24 secs on my 400 MHz computer. Controls are the cursor keys to move forward, backward, turn to the left and turn to the right. With Shift the up & down arrows change the height of objects and Ctrl with the up & down arrows moves the viewer up & down. The SPACE bar brings the motion to an immediate halt. With the Pyramids a wall forms a boundary around the surface but with Plasmas the surface rolls over giving continuous motion. There is also collision detection based on the eye coords and the Voxel height in the vicinity on the floor surface. Different palettes can be selected and they take effect immediately. Changing the motion control or surface type requires the START button to be pressed. The casting routine is modified from that of D Brebner's of Unlimited Realities. In particular a spherical correction is applied and the scanning is from -ve to +ve angles placing the viewer in the middle of the screen. The FloorCASTER routine is commented in detail - the effects are very subtle. The machine code routines are in a bin file for use with CallWindowsProc but could easily be converted to a DLL. See also the recent prog from NLS, on PSC, which shows an alternative method for Voxels with 24-bit color. The ZIP file is 40 KB. (ADDITIONS Switch smoothing, plateau surface, collision flash, no collision in clouds).

Languages
Top Categories
Global Discovery