Main > Free Download Search >

Free barrier software for linux

barrier

Sponsored Links
Sponsored Links
Secleted [ 0 ] software to compare
Results 1 - 15 of about 32
libGarbageCollector 1.1

libGarbageCollector 1.1


libGarbageCollector is an incremental garbage collector with a tri-color, Baker treadmill, write-barrier implementation. more>>
libGarbageCollector is an incremental garbage collector with a tri-color, Baker treadmill, write-barrier implementation.

libGarbageCollector is built from the garbage collector code used in the Io programming language project.
<<less
Download (0.034MB)
Added: 2006-05-22 License: BSD License Price:
1252 downloads
MandrivaMove 2.0

MandrivaMove 2.0


MandrivaMove is a LiveCD distribution from the popular Mandriva Linux operating system. more>>
MandrivaMove is a LiveCD distribution from the popular Mandriva Linux operating system.
Have you always wanted to try out Linux but were afraid you werent up to the task? Heres Move, the easiest and safest way to test drive Linux.
Built on the Live-CD technology, Move enables you to run a full operating system from just one CD, anywhere, without the need for installation. Move is truly mobile. This is the only product of its kind to offer built-in handling of USB keys, allowing for automatic and seamless backup of configuration settings, as well as user data, up to 1.5 GB.
Move features the award-winning Mandriva Linux, widely recognized for its user-friendliness, together with a collection of applications equivalent to or compatible with Microsoft Windows software. So there are no more barriers to prevent you from taking off into the Linux world.
Main features:
Secure
- Move does not require an installation.
- Move does not modify anything on the host computer.
- Move cannot be damaged: everything is on the CD.
Anywhere, Anytime
- Move works on most computers.
- Using a USB* key, Move saves all your data and settings.
- Move also allows read access to documents on the host computer.
A great collection of applications
- The most recent Linux kernel: Kernel 2.6
- The most advanced desktop environment: KDE 3.2
Administration
- Configuration tools: Mandriva Linux Control Center
Office
- Microsoft Office compatible: OpenOffice.org
- Personal information manager (e-mail, contacts, agenda, etc.): Kontact
- Project manager: Planner
- Personal finance manager: GnuCash
Internet
- Web browser: Konqueror
- Instant messaging (ICQ, AIM, MSN, Yahoo! compatible): Kopete
- File transfer: KBear
- Web site editing: Mozilla Composer
Multimedia
- Media player: Totem
- Audio editor: Audacity
- Image manipulation: The GIMP
- Scanning: Kooka
- CD/DVD Burning: K3B
<<less
Download (660MB)
Added: 2005-08-12 License: GPL (GNU General Public License) Price:
1534 downloads
WAusers 0.1

WAusers 0.1


WAusers is one component of the WAhelper Web accessibility testing suite. more>>
WAusers application is one component of the WAhelper Web accessibility testing suite.

WAusers serves for managing Web accessibility testing sites where users can register, create their own Web accessibility testing projects, and log into all their projects using a single global password.

Web pages are often designed without handicapped users in mind. Despite there exist Web accessibility guidelines such as W3C Accessibility Guidelines or U.S. Section 508 law, many Web designers are not aware about problems they cause to handicapped visitors of their pages. And even when a Web designer tries to make Web pages accessible, he may not be aware about all the obstacles handicapped users can meet.

- Software tools can be helpful here. Several Web accessibility checking tools already exist, but they have various problems:
Most of them are non-free and you cant use them freely to evaluate accessibility of your website effectively. Making things accessible means removing barriers and it is important to make the barriers as low as possible.
- New tests usually cant be added easily. An easily extensible and freely modifiable tool is needed so that its features can be improved efficiently. A good and maintained tool can make the whole process of making Web pages accessible more effective.
- The tools often dont try to go beyond semi-automated tests. But there are many accessibility problems which cant be detected, diagnosed and reported without human assistance. A tool helping humans with the testing process is needed.
<<less
Download (0.024MB)
Added: 2006-01-12 License: GPL (GNU General Public License) Price:
1380 downloads
Parchive 0.1.alpha

Parchive 0.1.alpha


Parchive is a tool that helps data recovery of multi-part archives on Usenet. more>>
Parchive project is a tool that helps data recovery of multi-part archives on Usenet.

The original idea behind this project was to provide a tool to apply the data-recovery capability concepts of RAID-like systems to the posting and recovery of multi-part archives on Usenet. We accomplished that goal. Our new goal with version 2.0 of the specification is to improve.

It extends the idea of version 1.0 and takes the recovery process beyond the file-level barrier. This allows for more effective protection with less recovery data, and removes some previous limitations on the number of recoverable parts. See Par1 compared to Par2 for a more detailed view of the differences.

Because this new approach doesnt benefit from like sized files, it drastically extends the potiental applications of PAR. Files such as video, music, and other data can remain in a usable format and still have recovery data associated with them.

The technology is based on a Reed-Solomon Code implementation that allows for recovery of any X real data-blocks for X parity data-blocks present. (Data-blocks referring to files OR much smaller virtual slices of files).

The key to this mission is a clean file format specification which provides all the necessary capabilities for programs to easily verify and regenerate single missing parts out of a set of data-blocks.
<<less
Download (0.029MB)
Added: 2007-01-18 License: GPL (GNU General Public License) Price:
1022 downloads
AdaControl 1.6r8

AdaControl 1.6r8


AdaControl is a free tool that detects the use of various kinds of constructs in Ada programs. more>>
AdaControl is a free (GMGPL) tool that detects the use of various kinds of constructs in Ada programs. AdaControls first goal is to control proper usage of style or programming rules, but it can also be used as a powerful tool to search for use (or non-use) of various forms of programming styles or design patterns. Searched elements range from very simple, like the occurrence of certaine entities, declarations, or statements, to very sophisticated, like verifying that certain programming patterns are being obeyed..
Which elements or constructs are searched is defined by a set of rules; the following table gives a short summary of rules currently checked by AdaControl. The number in parentheses after the rule name gives the number of subrules, if any. Considering all possible rules and subrules, this makes 216 tests that can be performed currently by AdaControl!
- Abnormal_Function_Return Controls a design pattern that ensures that a function always returns a result .
- Allocators Controls ocurrences of allocators, either all of them, or those targeting specified types.
- Array_Declarations (x2) Controls several metrics in array declarations.
- Barrier_Expressions Controls elements allowed in the expression of protected entries barriers
- Case_Statement (x4) Controls several metrics in case statements.
- Control_Characters Controls occurrences of control characters (like tabs) in the source.
- Declarations (x75) Controls occurrences of certain Ada declarations.
- Default_Parameter Controls subprogram calls and generic instantiations that use (or not) the default value for a given parameter.
- Directly_Accessed_Globals Controls a design pattern that ensures that all global variables are accessed only through dedicated subprograms.
- Entities Controls occurrences of any Ada entity.
- Entity_Inside_Exception Controls occurrences of entities inside exception handlers.
- Exception_Propagation (x4) Controls that certain subprograms (or tasks) cannot propagate exceptions, or that no elaboration can propagate exceptions.
- Expressions (x9) Controls usage of certain forms of expressions
- Global_References Controls unsynchronized accesses to global variables.
- Header_Comments (x2) Controls the presence of comments at the start of each module.
- If_For_Case Controls if statements that could be replaced by case statements.
- Instantiations Controls generic instantiations, either all of them, or those that use specified entities.
- Insufficient_Parameters Controls the use of positional parameters in calls where the value does not provide sufficient information.
- Local_Hiding Controls occurrences of local identifiers that hide an identical outer one.
- Local_Instantiation Controls instantiations in local scopes.
- Max_Blank_Lines Controls the occurrence of more than a specified number of consecutive empty lines.
- Max_Call_Depth Controls the maximum depth of subprogram calls.
- Max_Line_Length Controls maximal length of source lines.
- Max_Nesting Controls scopes nested more deeply than a given limit.
- Max_Parameters (x6) Controls the maximum numbers of parameters in callable entities (procedures, functions and entries)
- Max_Statement_Nesting (x5) Controls composite statements nested more deeply than a given limit.
- Movable_Accept_Statements Controls statements that could be moved outside an accept statement.
- Naming_Convention Controls the form of allowed (or forbidden) names in declarations.
- No_Safe_Initialization Controls a design pattern that ensures that any variable is initialized before being used.
- Non_Static (x3) Controls non static expressions in index or discriminant constraints, or in instantiations.
- Not_Elaboration_Calls Controls subprogram calls performed from places outside package elaboration code.
- Other_Dependencies Controls semantic dependencies to other units than those indicated
- Parameter_Aliasing Controls subprograms and entry calls where a variable is provided to more than one [in] out parameter.
- Potentially_Blocking_Operations Controls the use of potentially blocking operations from within protected operations.
- Pragmas Controls the use of specific pragmas.
- Real_Operators Controls occurrences of = or /= operators on real types.
- Reduceable_Scope Controls declarations that could be move to more deeply nested scopes.
- Representation_Clauses Controls occurrences of representation clauses.
- Return_Type Controls the use of certain kinds of types as return types of functions.
- Side_Effect_Parameters Controls subprogram calls and generic instantiations that call functions with side effect, thus creating a dependance to the order of evaluation.
- Silent_Exceptions Controls exception handlers that do not reraise exceptions nor call indicated subprograms.
- Simplifiable_Expressions (x4) Controls occurrences of various forms of expressions that could be simplified.
- Special_Comments Controls the presence of certain string patterns in comments.
- Statements (x42) Controls occurrences of Ada statements.
- Style (x12) Controls various forms of constructs generally recommended in style rules.
- Terminating_Tasks Controls a design pattern that ensures that tasks never terminate.
- Uncheckable (x3) Controls constructs that are not statically checkable by other rules
- Unnecessary_Use_Clause Controls use clauses on packages, where no element of the package is referred to within the scope of the use clause.
- Unsafe_Paired_Calls Controls a design pattern that ensures that certain calls are allways paired (like P/V procedures).
- Unsafe_Unchecked_Conversion Controls instantiations of Unchecked_Conversion between types of different or unspecified sizes.
- Usage (x5) Controls usage of objects under certain conditions (in package specifications, read, written modified...).
- Use_Clauses Controls occurrences of use clauses, except for indicated packages.
- With_Clauses (x3) Controls proper usage of with clauses.
Enhancements:
- This release adds rules to check that header comments match a given pattern.
- It has indication of possible false positives and false negatives due to non-statically analyzable constructs.
- There is a fine definition of constructs allowed in entry barriers (including the one of the Ravenscar profile).
- There is better integration into GPS, and much more.
<<less
Download (1.0MB)
Added: 2006-12-08 License: GMGPL (GNAT Modified GPL) Price:
1050 downloads
Cursed MIDI Sequencer 0.5

Cursed MIDI Sequencer 0.5


Cursed MIDI Sequencer is a MIDI-Sequencer which targets both terminal purists and visually impaired people. more>>
Purely character-based applications are sometimes referred to as cursed applications (originating for the library ncurses which is also used for this sequencer).

They can be run in any terminal. Furthermore, they are particularly suited for being operated over the network as terminal applications generate only little traffic. Sometimes, repositioning the mouse as required by graphical user-interfaces may not be desired, especially if the user has to switch between the PC and other equipment, frequently.

But particularly for visually impaired people, graphical user interfaces can be a barrier hard to overcome. Screen readers can help to read the text and so-called braille-displays can be used to make alphanumerical output by an application become tangible by the finger tips. However, these tools are valuable only, if the application does not make too much use of graphical symbols and different kinds of interaction with the mouse.

Cursed MIDI Sequencer is a MIDI-Sequencer which targets both terminal purists and visually impaired people. The purely character- based interface provides the kind of information needed by braille-displays and screen-readers.

But CuSE can also enable normally sighted people to run the sequencer over a network or on a low-end embedded device.
<<less
Download (0.32MB)
Added: 2007-04-11 License: GPL (GNU General Public License) Price:
928 downloads
wipe 2.2.0

wipe 2.2.0


Wipe is a file and block device wiping utility. more>>
Wipe is a file and block device wiping utility. It is based on work by Peter Gutmann.
There are some low level issues that must be taken into consideration. One of these is that there must be some sort of write barrier between passes. Wipe uses fdatasync(2)
(or fsync(2)) as a write barrier, or if fsync(2) isnt available, the file is opened with the O_DSYNC or O_SYNC flag.
For wipe to be effective, each pass must be completely written. To ensure this, the drive must support some form of a write barrier, write cache flush, or write cache disabling. SCSI supports ordered command tags, has a force
media access bit for commands, and write cache can be disable on mode page 8. IDE/ATA drives support write cache flushes and write cache disabling.
Unfortunetly, not all drives actually disable write cache when yjhis is set up.Those drives are broken. Write caching should always be disabled, unless your system is battery backed and always powers down cleanly.
Enhancements:
- typo in Makefile.in (Ricardo Branco)
<<less
Download (0.068MB)
Added: 2006-07-13 License: GPL (GNU General Public License) Price:
1947 downloads
Class.Jabber.PHP 0.4

Class.Jabber.PHP 0.4


Class.Jabber.PHP provides a medium-level API to interact with the Jabber network. more>>
Class.Jabber.PHP provides a medium-level API to interact with the Jabber network.

Class.Jabber.PHP is a class which you can use to connect to the Jabber network. It allows you to easily connect to a server and interact with it. It supports all packet types (message, iq, and presence), is very flexible, and offers both high-level methods (registration, message sending, etc.) and low-level methods (packet sending, etc.).

The problem with current IM solutions is that they are all proprietary and cannot talk to each other. Jabber seeks to get rid of those barriers by allowing a Jabber client to talk with an AOL user, or an IRC chat room, or any number of other programs.

Class.Jabber.PHP a PHP class that provides a PHP Developer access to the Jabber protocol. Using this OOP class, I provide a clean interface to writing anything from a full client to a simple protocol tester.

<<less
Download (0.016MB)
Added: 2007-02-27 License: GPL (GNU General Public License) Price:
976 downloads
Net::Chat::Jabber 0.1

Net::Chat::Jabber 0.1


Net::Chat::Jabber is a Jabber protocol adapter for Net::Chat::Daemon. more>>
Net::Chat::Jabber is a Jabber protocol adapter for Net::Chat::Daemon.

API

new()

class - the name of the class were creating
jid - a string giving the JID, or a JID object
%options
password - the password to provide during authentication. TODO: if
this is not provided but a password is needed, some sort of
authCallback is needed.
loglevel - logs with level higher than this are not displayed.
Defaults to 0.
connect()

Connect to the server, attempting to register if the specified user is not yet registered.
reconnect()

Reestablish a broken connection.
subscribe($jid)

Subscribe to messages coming from $jid.
post($to,$message,options...)

Send the message text $message to $to. Available options:
subject: set the subject of the message (rarely used)
thread: mark the message as a reply in the given thread
attachments: an array of attachments, where each attachment
is either a chunk of text, or an XML tree.
send_request(to,message,options...)

Send out a request, but do not wait for the reply.
request(to,message,options...)

Make a synchronous request. Returns the body of the reply message.
start_transaction($transaction_id, $onReply)

Start a transaction. A transaction is identified by the given id, and... blah blah blah this is very important but I dont remember what I did here.
end_transaction($transaction_id)

Normally called automatically. Terminates a transaction and erases the transaction callback.
count_transactions($transaction_id)

Return the number of active karfloomer hangers for the given transaction. The method name is awful; this is counting karfloomer hangers for a given transaction, not the number of transactions. FIXME when I figure this all out.
barrier()

Wait until no more active transactions are outstanding.
poll()

Check whether any messages are available.
wait([$timeout])

Wait $timeout seconds for more messages to come in. If $timeout is not given or undefined, block until a message is received.
Return value: 1 = data received, 0 = ok but no data received, undef = error

<<less
Download (0.013MB)
Added: 2006-07-27 License: Perl Artistic License Price:
1186 downloads
fistgen 0.1.1

fistgen 0.1.1


fistgen is a stackable file system templates and language. more>>
File System development is very difficult and time consuming. Even small changes to existing file systems require deep understanding of kernel internals, making the barrier to entry for new developers high.

Moreover, porting file system code from one operating system to another is almost as difficult as the first port. Past proposals to provide extensible (stackable) file system interfaces would have simplified the development of new file systems.

These proposals, however, advocated massive changes to existing operating system interfaces and existing file systems; operating system vendors and maintainers resist making any large changes to their kernels because of stability and performance concerns. As a result, file system development is still a difficult, long, and non-portable process.

The FiST (File System Translator) system combines two methods to solve the above problems in a novel way: a set of stackable file system templates for each operating system, and a high-level language that can describe stackable file systems in a cross-platform portable fashion.

Using FiST, stackable file systems need only be described once. FiSTs code generation tool, fistgen, compiles a single file system description into loadable kernel modules for several operating systems (currently Solaris, Linux, and FreeBSD).

The project demonstrates that with FiST, code size and development time are reduced significantly, while imposing a small performance overhead of only 1-2%. These benefits are achieved, as well as portability, without changing existing operating systems or file system.
<<less
Download (0.63MB)
Added: 2005-04-08 License: GPL (GNU General Public License) Price:
1659 downloads
RTEMS 4.7.99.1

RTEMS 4.7.99.1


RTEMS is the Real-Time Operating System for Multiprocessor Systems. more>>
RTEMS (Real-Time Executive for Multiprocessor Systems) is a commercial grade real-time operating system designed for deeply embedded systems. The project is a free (as in beer and speech) open-source solution that supports multi-processor systems.
RTEMS is designed to support applications with the most stringent real-time requirements while being compatable with open standards such as POSIX. Its been ported to over ten processor architectures including ARM, PowerPC, i386, M68K, Coldfire, MIPS, SPARC, SH, H8, and C3x/C4x DSPs.
Using the GNU tools for cross development, you can use any number of systems as development hosts including both Unix and Windows platforms.
Main features:
- realtime system design
- semantics of BSP building and maintenance
- driver development for clock, timer and RTC drivers
- console drivers for raw and termios mode
- network drivers
- BSP structure
- handling of target depenencies
- Classic API
- POSIX API
Enhancements:
- This is the first snapshot from the CVS head since the 4.7 release branch was made.
- It adds POSIX barriers, spinlocks, rwlocks, and Classic API Barriers.
- It adds a new port to the Altera NIOS II.
- There is also the usual assortment of cleanup and name changes to increase adherance to coding conventions.
<<less
Download (9.6MB)
Added: 2007-03-16 License: GMGPL (GNAT Modified GPL) Price:
959 downloads
Streamline 1.7.2

Streamline 1.7.2


Streamline is a high-speed networking subsystem for commodity operating systems. more>>
Streamline is a high-speed networking subsystem for commodity operating systems. It increases performance by moving processing tasks to the fastest location. Streamline supports in-kernel execution, but also dedicated hardware (NICs) and even remote machines. An implementation of Streamline for Linux 2.6.13 and higher is made publicly available.
The goal of Streamline is to make fast network processing viable for common tasks. Many advanced processing schemes so far fail to make it into OSes, because they are difficult to combine with the socket(..) API or only applicable in a few situations. Our goal is to integrate known as well as develop new methods that replace sockets(..). without burdening application developers and end-users. Streamline achieves this by constructing a tailored dataplane for each application at runtime from an extensible set of functions.
Applications request information streams by specifying a series of abstract functions that need to be performed on incoming data (e.g., select tcp packets for port 80, reassemble into a stream, filter out known attacks). At runtime, streamline searches for implementations of these functions. These can be found in the kernel, in the application library, or in dedicated hardware such as programmable network cards or asymmetric multicores. When all functions are found, interconnecting datapaths are setup. Paths may need to cross the PCI bus, userspace/kernelspace barrier or even LANs. Optimisation of these paths is one of the factors that contributes to Streamlines performance.
The base system comes bundled with functions for pattern matching (Aho Corasick, RegEx), accounting, filtering (among others BPF), stream reassembly, rewriting, inspection, and more. Obvious uses are intrusion detection, network address translation, media streaming and realtime (pre)processing of scientific data.
Enhancements:
- This is mostly a stabilization release, which adds support for Linux kernels up to 2.6.22 and Fedora Core installations.
- The only truly new feature is a virtual filesystem interface (like sysfs) to streamline.
- With this "netmonfs" you can inspect live datastreams as if youre reading local files.
- Setting up streams and filters is easily accomplished through mkdir, open, and other well-known tools.
- Note that netmonfs is still beta quality software.
<<less
Download (0.82MB)
Added: 2007-08-23 License: LGPL (GNU Lesser General Public License) Price:
809 downloads
Common Lisp Kanji Drill 0.1.1

Common Lisp Kanji Drill 0.1.1


Common Lisp Kanji Drill is a program for learning the meanings of Chinese/Japanese characters (kanji). more>>
Common Lisp Kanji Drill, or CLKD in short, is a newly-released program for learning the meanings of Chinese/Japanese characters (kanji) by means of repeated tests. The project is developed using CLISP, and runs on GNU/Linux and on MS Windows under Cygwin. CLKD uses a web browser as its interface. (These work best: Firefox 1.0.4 or newer; or Internet Explorer 7 or newer),. Japanese fonts are required.

CLKD is not intended for complete beginners in Japanese or Chinese to just start learning characters by rote. Its best to learn something about the structure of these characters by reading a few good books about them. It helps to know how to write them, how to count strokes, and how to look up characters in dictionaries which classify them by radical and components.

But all these resources still leave a big task: the raw memorization of hundreds and hundreds of characters. That is where a tool like CLKD becomes valuable.

CLKD is ideally suited to someone who has already broken through the unfamiliarity barrier: the student who can already recognize familiar components in an unfamiliar character and mentally form a mnemonic to which he or she can anchor the meanings of that character, and who is ready to begin internalizing a large number of characters.

<<less
Download (1.0MB)
Added: 2007-03-20 License: Other/Proprietary License with Source Price:
950 downloads
Circus Linux! 1.0.3

Circus Linux! 1.0.3


Circus Linux! is a clone of the Atari 2600 game Circus Atari. more>>
"Circus Linux!" is a clone of the Atari 2600 game "Circus Atari," produced by Atari, Inc. (which is itself a clone of an earlier arcade game named, simply "Circus").
The object is to move a teeter-totter back and forth across the screen to bounce clowns up into the air. When they reach the top, they pop rows of balloons and then fall back down.
(The gameplay is similar to the classics "Breakout" and "Arkanoid.")
Main features:
Game Modes:
- One- and two-players
- Two-player cooperative
- Barriers mode
- Bouncy balloons mode
- Clear-all mode
Graphics:
- Colorful, cartoon-like images
- Animated objects and background
- Nearly 70 objects on screen at once
- Fullscreen mode
- Random circus acts in the background
Sound:
- Upbeat circus-style music
- Many cartoonish sound effects
- Sound and music volume controls
Controls:
- Mouse
- Keyboard
- Joystick
- Real Atari 2600 Paddle controllers!
<<less
Download (1.2MB)
Added: 2005-09-06 License: GPL (GNU General Public License) Price:
1509 downloads
Games::Lineofsight 1.0

Games::Lineofsight 1.0


Games::Lineofsight is a Perl module. more>>
Games::Lineofsight is a Perl module.

Many games (Ultima, Nethack) use two-dimensional maps that consists of the squares of the same size in a grid. Line-of-sight means that some of the squares may represent the items that block the vision of the player from seeing squares behind them. With this module you can add that behaviour to your games.

SYNOPSIS

use Games::Lineofsight qw(lineofsight);

# The map has to be a two-dimensional array. Each member (or "cell") of the array represents one
# square in the map. In this example each cell contains only one character but you can put strings
# to the cells also - practical with the graphical games.

my @map=(
[split //,"..:..::........."], # this is the map
[split //,".......:..X....:"], # . and : represents the ground
[split //,"...X.....:...:.."], # X is the barrier for the sight
[split //,".:...:....:....."],
[split //,"..X....:..X....."],
[split //,"..X..:........:."],
);

my($width)=scalar(@{@map[0]}); # the width of the map
my($height)=scalar(@map); # the height of the map
my($barrier_str)="X"; # string that represents the barrier
my($hidden_str)="*"; # string that represents a cell behind a barrier
my($man_str)="@"; # string that represents the viewer
my($man_x,$man_y)=(7,3); # view point coordinates - the player is here

# recreate the map with line-of-sight

@map=lineofsight(@map,$man_x,$man_y,$barrier_str,$hidden_str);

# draw the map

for(my $i=0;$i < $height;$i++){
for(my $j=0;$j < $width;$j++){
print $man_x == $j && $man_y == $i ? $man_str : $map[$i][$j];
}
print "n";
}
or
# The lineofsight() calls get_barriers() and analyze_map() each time its called. If the viewer
# moves around the map a lot, its much faster to read in the barriers once and call only
# analyze_map() each time before drawing it.

use Games::Lineofsight qw(get_barriers analyze_map);

# The map has to be a two-dimensional array. Each member (or "cell") of the array represents one
# square in the map. In this example each cell contains only one character but you can put strings
# to the cells also - practical with the graphical games.

my @map=(
[split //,"..:..::........."], # this is the map
[split //,".......:..X....:"], # . and : represents the ground
[split //,"...X.....:...:.."], # X is the barrier for the sight
[split //,".:...:....:....."],
[split //,"..X....:..X....."],
[split //,"..X..:........:."],
);

my($width)=scalar(@{@map[0]}); # the width of the map
my($height)=scalar(@map); # the height of the map
my($barrier_str)="X"; # string that represents the barrier
my($hidden_str)="*"; # string that represents a cell behind a barrier
my($man_str)="@"; # string that represents the viewer
my($man_x,$man_y)=(7,3); # view point coordinates - the player is here

# get_barriers() returns a hash with the information about barriers in the map. In this example we
# declare the "X"-character as a barrier. As well you can declare it to be a string in the graphical
# games; for example "barrier.jpg".

my %barrier=get_barriers($width,$height,@map,$barrier_str);

# analyze_map() returns an array containing the original map looked from the view point. The cells
# behind the barriers are replaced with given strings. The barriers should be told to the subroutine
# calling first get_barriers()-subroutine as we already did.

my @map2=analyze_map($width,$height,@map,%barrier,$man_x,$man_y,$hidden_str);

#draw the map with the lineofsight

print "nOriginal map:n";

draw($width,$height,$man_x,$man_y,@map2,$man_str);

# move the viewer two squares right

$man_x+=2;

# refresh the map

my @map2=analyze_map($width,$height,@map,%barrier,$man_x,$man_y,$hidden_str);

#draw the map again

print "nViewer has moved:n";

draw($width,$height,$man_x,$man_y,@map2,$man_str);

sub draw{
my($width,$height,$man_x,$man_y,$map,$man_str)=@_;
for(my $i=0;$i < $height;$i++){
for(my $j=0;$j < $width;$j++){
print $man_x == $j && $man_y == $i ? $man_str : $$map[$i][$j];
}
print "n";
}

}

<<less
Download (0.004MB)
Added: 2007-01-03 License: Perl Artistic License Price:
1029 downloads
Secleted [ 0 ] software to compare
  • Page: 1 of 3
  • 1
  • 2
  • 3