Merge lp:hopper into lp:hopper/future

Proposed by Daniel Bell
Status: Merged
Approved by: Daniel Bell
Approved revision: 37
Merged at revision: 20
Proposed branch: lp:hopper
Merge into: lp:hopper/future
Diff against target: 3070 lines (+1730/-1233)
14 files modified
Frogger/CHANGES (+0/-19)
Frogger/COPYING (+674/-0)
Frogger/ChangeLog (+34/-0)
Frogger/INSTALL (+5/-0)
Frogger/LICENCE (+0/-674)
Frogger/README (+63/-43)
Frogger/data/frog-game.desktop (+10/-0)
Frogger/data/icons/scalable/frog-game.svg (+68/-0)
Frogger/frogger (+561/-0)
Frogger/frogger.py (+0/-356)
Frogger/lib/engine.py (+69/-0)
Frogger/lib/sprites.py (+136/-0)
Frogger/setup.py (+110/-0)
Frogger/sprites.py (+0/-141)
To merge this branch: bzr merge lp:hopper

Commit message

Updating from Legacy release 0.2.

Description of the change

This updates future to version 0.2 + a few other changes from upcoming 0.3 version.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed file 'Frogger/CHANGES'
2--- Frogger/CHANGES 2010-01-29 23:57:26 +0000
3+++ Frogger/CHANGES 1970-01-01 00:00:00 +0000
4@@ -1,19 +0,0 @@
5-Frog Game (0.1)
6-
7- * Moved Game to Python, instead of C#.
8- * Support for Linux and Mac OS X in addition to Windows.
9- * Fixed issues with CPU usage.
10- * Difficulty increases every level now instead of every 5: Still basic difficulty (speed increase only).
11- * Log size reduced to remove ability to slide from log to log on same level.
12- * Balancing on log removed. Currently a single pixel on log will be enough to prevent you from landing in water. (LP #514564)
13- * New Menu/Exit Screen.
14- * New Font: Blooming Grove released under Public Domain by Jonadab the Unsightly One (http://openfontlibrary.org/media/files/jonadab/414)
15-
16- -- Daniel Bell <daniel.bell@saraclan.com> Fri, 29 Jan 2010.
17-
18-Frog Game (prototype)
19-
20- * Initial prototype to test the game concepts.
21-
22- -- Daniel Bell <daniel.bell@saraclan.com> Sat, 12 Dec 2009.
23-
24
25=== added file 'Frogger/COPYING'
26--- Frogger/COPYING 1970-01-01 00:00:00 +0000
27+++ Frogger/COPYING 2010-03-12 10:44:17 +0000
28@@ -0,0 +1,674 @@
29+ GNU GENERAL PUBLIC LICENSE
30+ Version 3, 29 June 2007
31+
32+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
33+ Everyone is permitted to copy and distribute verbatim copies
34+ of this license document, but changing it is not allowed.
35+
36+ Preamble
37+
38+ The GNU General Public License is a free, copyleft license for
39+software and other kinds of works.
40+
41+ The licenses for most software and other practical works are designed
42+to take away your freedom to share and change the works. By contrast,
43+the GNU General Public License is intended to guarantee your freedom to
44+share and change all versions of a program--to make sure it remains free
45+software for all its users. We, the Free Software Foundation, use the
46+GNU General Public License for most of our software; it applies also to
47+any other work released this way by its authors. You can apply it to
48+your programs, too.
49+
50+ When we speak of free software, we are referring to freedom, not
51+price. Our General Public Licenses are designed to make sure that you
52+have the freedom to distribute copies of free software (and charge for
53+them if you wish), that you receive source code or can get it if you
54+want it, that you can change the software or use pieces of it in new
55+free programs, and that you know you can do these things.
56+
57+ To protect your rights, we need to prevent others from denying you
58+these rights or asking you to surrender the rights. Therefore, you have
59+certain responsibilities if you distribute copies of the software, or if
60+you modify it: responsibilities to respect the freedom of others.
61+
62+ For example, if you distribute copies of such a program, whether
63+gratis or for a fee, you must pass on to the recipients the same
64+freedoms that you received. You must make sure that they, too, receive
65+or can get the source code. And you must show them these terms so they
66+know their rights.
67+
68+ Developers that use the GNU GPL protect your rights with two steps:
69+(1) assert copyright on the software, and (2) offer you this License
70+giving you legal permission to copy, distribute and/or modify it.
71+
72+ For the developers' and authors' protection, the GPL clearly explains
73+that there is no warranty for this free software. For both users' and
74+authors' sake, the GPL requires that modified versions be marked as
75+changed, so that their problems will not be attributed erroneously to
76+authors of previous versions.
77+
78+ Some devices are designed to deny users access to install or run
79+modified versions of the software inside them, although the manufacturer
80+can do so. This is fundamentally incompatible with the aim of
81+protecting users' freedom to change the software. The systematic
82+pattern of such abuse occurs in the area of products for individuals to
83+use, which is precisely where it is most unacceptable. Therefore, we
84+have designed this version of the GPL to prohibit the practice for those
85+products. If such problems arise substantially in other domains, we
86+stand ready to extend this provision to those domains in future versions
87+of the GPL, as needed to protect the freedom of users.
88+
89+ Finally, every program is threatened constantly by software patents.
90+States should not allow patents to restrict development and use of
91+software on general-purpose computers, but in those that do, we wish to
92+avoid the special danger that patents applied to a free program could
93+make it effectively proprietary. To prevent this, the GPL assures that
94+patents cannot be used to render the program non-free.
95+
96+ The precise terms and conditions for copying, distribution and
97+modification follow.
98+
99+ TERMS AND CONDITIONS
100+
101+ 0. Definitions.
102+
103+ "This License" refers to version 3 of the GNU General Public License.
104+
105+ "Copyright" also means copyright-like laws that apply to other kinds of
106+works, such as semiconductor masks.
107+
108+ "The Program" refers to any copyrightable work licensed under this
109+License. Each licensee is addressed as "you". "Licensees" and
110+"recipients" may be individuals or organizations.
111+
112+ To "modify" a work means to copy from or adapt all or part of the work
113+in a fashion requiring copyright permission, other than the making of an
114+exact copy. The resulting work is called a "modified version" of the
115+earlier work or a work "based on" the earlier work.
116+
117+ A "covered work" means either the unmodified Program or a work based
118+on the Program.
119+
120+ To "propagate" a work means to do anything with it that, without
121+permission, would make you directly or secondarily liable for
122+infringement under applicable copyright law, except executing it on a
123+computer or modifying a private copy. Propagation includes copying,
124+distribution (with or without modification), making available to the
125+public, and in some countries other activities as well.
126+
127+ To "convey" a work means any kind of propagation that enables other
128+parties to make or receive copies. Mere interaction with a user through
129+a computer network, with no transfer of a copy, is not conveying.
130+
131+ An interactive user interface displays "Appropriate Legal Notices"
132+to the extent that it includes a convenient and prominently visible
133+feature that (1) displays an appropriate copyright notice, and (2)
134+tells the user that there is no warranty for the work (except to the
135+extent that warranties are provided), that licensees may convey the
136+work under this License, and how to view a copy of this License. If
137+the interface presents a list of user commands or options, such as a
138+menu, a prominent item in the list meets this criterion.
139+
140+ 1. Source Code.
141+
142+ The "source code" for a work means the preferred form of the work
143+for making modifications to it. "Object code" means any non-source
144+form of a work.
145+
146+ A "Standard Interface" means an interface that either is an official
147+standard defined by a recognized standards body, or, in the case of
148+interfaces specified for a particular programming language, one that
149+is widely used among developers working in that language.
150+
151+ The "System Libraries" of an executable work include anything, other
152+than the work as a whole, that (a) is included in the normal form of
153+packaging a Major Component, but which is not part of that Major
154+Component, and (b) serves only to enable use of the work with that
155+Major Component, or to implement a Standard Interface for which an
156+implementation is available to the public in source code form. A
157+"Major Component", in this context, means a major essential component
158+(kernel, window system, and so on) of the specific operating system
159+(if any) on which the executable work runs, or a compiler used to
160+produce the work, or an object code interpreter used to run it.
161+
162+ The "Corresponding Source" for a work in object code form means all
163+the source code needed to generate, install, and (for an executable
164+work) run the object code and to modify the work, including scripts to
165+control those activities. However, it does not include the work's
166+System Libraries, or general-purpose tools or generally available free
167+programs which are used unmodified in performing those activities but
168+which are not part of the work. For example, Corresponding Source
169+includes interface definition files associated with source files for
170+the work, and the source code for shared libraries and dynamically
171+linked subprograms that the work is specifically designed to require,
172+such as by intimate data communication or control flow between those
173+subprograms and other parts of the work.
174+
175+ The Corresponding Source need not include anything that users
176+can regenerate automatically from other parts of the Corresponding
177+Source.
178+
179+ The Corresponding Source for a work in source code form is that
180+same work.
181+
182+ 2. Basic Permissions.
183+
184+ All rights granted under this License are granted for the term of
185+copyright on the Program, and are irrevocable provided the stated
186+conditions are met. This License explicitly affirms your unlimited
187+permission to run the unmodified Program. The output from running a
188+covered work is covered by this License only if the output, given its
189+content, constitutes a covered work. This License acknowledges your
190+rights of fair use or other equivalent, as provided by copyright law.
191+
192+ You may make, run and propagate covered works that you do not
193+convey, without conditions so long as your license otherwise remains
194+in force. You may convey covered works to others for the sole purpose
195+of having them make modifications exclusively for you, or provide you
196+with facilities for running those works, provided that you comply with
197+the terms of this License in conveying all material for which you do
198+not control copyright. Those thus making or running the covered works
199+for you must do so exclusively on your behalf, under your direction
200+and control, on terms that prohibit them from making any copies of
201+your copyrighted material outside their relationship with you.
202+
203+ Conveying under any other circumstances is permitted solely under
204+the conditions stated below. Sublicensing is not allowed; section 10
205+makes it unnecessary.
206+
207+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
208+
209+ No covered work shall be deemed part of an effective technological
210+measure under any applicable law fulfilling obligations under article
211+11 of the WIPO copyright treaty adopted on 20 December 1996, or
212+similar laws prohibiting or restricting circumvention of such
213+measures.
214+
215+ When you convey a covered work, you waive any legal power to forbid
216+circumvention of technological measures to the extent such circumvention
217+is effected by exercising rights under this License with respect to
218+the covered work, and you disclaim any intention to limit operation or
219+modification of the work as a means of enforcing, against the work's
220+users, your or third parties' legal rights to forbid circumvention of
221+technological measures.
222+
223+ 4. Conveying Verbatim Copies.
224+
225+ You may convey verbatim copies of the Program's source code as you
226+receive it, in any medium, provided that you conspicuously and
227+appropriately publish on each copy an appropriate copyright notice;
228+keep intact all notices stating that this License and any
229+non-permissive terms added in accord with section 7 apply to the code;
230+keep intact all notices of the absence of any warranty; and give all
231+recipients a copy of this License along with the Program.
232+
233+ You may charge any price or no price for each copy that you convey,
234+and you may offer support or warranty protection for a fee.
235+
236+ 5. Conveying Modified Source Versions.
237+
238+ You may convey a work based on the Program, or the modifications to
239+produce it from the Program, in the form of source code under the
240+terms of section 4, provided that you also meet all of these conditions:
241+
242+ a) The work must carry prominent notices stating that you modified
243+ it, and giving a relevant date.
244+
245+ b) The work must carry prominent notices stating that it is
246+ released under this License and any conditions added under section
247+ 7. This requirement modifies the requirement in section 4 to
248+ "keep intact all notices".
249+
250+ c) You must license the entire work, as a whole, under this
251+ License to anyone who comes into possession of a copy. This
252+ License will therefore apply, along with any applicable section 7
253+ additional terms, to the whole of the work, and all its parts,
254+ regardless of how they are packaged. This License gives no
255+ permission to license the work in any other way, but it does not
256+ invalidate such permission if you have separately received it.
257+
258+ d) If the work has interactive user interfaces, each must display
259+ Appropriate Legal Notices; however, if the Program has interactive
260+ interfaces that do not display Appropriate Legal Notices, your
261+ work need not make them do so.
262+
263+ A compilation of a covered work with other separate and independent
264+works, which are not by their nature extensions of the covered work,
265+and which are not combined with it such as to form a larger program,
266+in or on a volume of a storage or distribution medium, is called an
267+"aggregate" if the compilation and its resulting copyright are not
268+used to limit the access or legal rights of the compilation's users
269+beyond what the individual works permit. Inclusion of a covered work
270+in an aggregate does not cause this License to apply to the other
271+parts of the aggregate.
272+
273+ 6. Conveying Non-Source Forms.
274+
275+ You may convey a covered work in object code form under the terms
276+of sections 4 and 5, provided that you also convey the
277+machine-readable Corresponding Source under the terms of this License,
278+in one of these ways:
279+
280+ a) Convey the object code in, or embodied in, a physical product
281+ (including a physical distribution medium), accompanied by the
282+ Corresponding Source fixed on a durable physical medium
283+ customarily used for software interchange.
284+
285+ b) Convey the object code in, or embodied in, a physical product
286+ (including a physical distribution medium), accompanied by a
287+ written offer, valid for at least three years and valid for as
288+ long as you offer spare parts or customer support for that product
289+ model, to give anyone who possesses the object code either (1) a
290+ copy of the Corresponding Source for all the software in the
291+ product that is covered by this License, on a durable physical
292+ medium customarily used for software interchange, for a price no
293+ more than your reasonable cost of physically performing this
294+ conveying of source, or (2) access to copy the
295+ Corresponding Source from a network server at no charge.
296+
297+ c) Convey individual copies of the object code with a copy of the
298+ written offer to provide the Corresponding Source. This
299+ alternative is allowed only occasionally and noncommercially, and
300+ only if you received the object code with such an offer, in accord
301+ with subsection 6b.
302+
303+ d) Convey the object code by offering access from a designated
304+ place (gratis or for a charge), and offer equivalent access to the
305+ Corresponding Source in the same way through the same place at no
306+ further charge. You need not require recipients to copy the
307+ Corresponding Source along with the object code. If the place to
308+ copy the object code is a network server, the Corresponding Source
309+ may be on a different server (operated by you or a third party)
310+ that supports equivalent copying facilities, provided you maintain
311+ clear directions next to the object code saying where to find the
312+ Corresponding Source. Regardless of what server hosts the
313+ Corresponding Source, you remain obligated to ensure that it is
314+ available for as long as needed to satisfy these requirements.
315+
316+ e) Convey the object code using peer-to-peer transmission, provided
317+ you inform other peers where the object code and Corresponding
318+ Source of the work are being offered to the general public at no
319+ charge under subsection 6d.
320+
321+ A separable portion of the object code, whose source code is excluded
322+from the Corresponding Source as a System Library, need not be
323+included in conveying the object code work.
324+
325+ A "User Product" is either (1) a "consumer product", which means any
326+tangible personal property which is normally used for personal, family,
327+or household purposes, or (2) anything designed or sold for incorporation
328+into a dwelling. In determining whether a product is a consumer product,
329+doubtful cases shall be resolved in favor of coverage. For a particular
330+product received by a particular user, "normally used" refers to a
331+typical or common use of that class of product, regardless of the status
332+of the particular user or of the way in which the particular user
333+actually uses, or expects or is expected to use, the product. A product
334+is a consumer product regardless of whether the product has substantial
335+commercial, industrial or non-consumer uses, unless such uses represent
336+the only significant mode of use of the product.
337+
338+ "Installation Information" for a User Product means any methods,
339+procedures, authorization keys, or other information required to install
340+and execute modified versions of a covered work in that User Product from
341+a modified version of its Corresponding Source. The information must
342+suffice to ensure that the continued functioning of the modified object
343+code is in no case prevented or interfered with solely because
344+modification has been made.
345+
346+ If you convey an object code work under this section in, or with, or
347+specifically for use in, a User Product, and the conveying occurs as
348+part of a transaction in which the right of possession and use of the
349+User Product is transferred to the recipient in perpetuity or for a
350+fixed term (regardless of how the transaction is characterized), the
351+Corresponding Source conveyed under this section must be accompanied
352+by the Installation Information. But this requirement does not apply
353+if neither you nor any third party retains the ability to install
354+modified object code on the User Product (for example, the work has
355+been installed in ROM).
356+
357+ The requirement to provide Installation Information does not include a
358+requirement to continue to provide support service, warranty, or updates
359+for a work that has been modified or installed by the recipient, or for
360+the User Product in which it has been modified or installed. Access to a
361+network may be denied when the modification itself materially and
362+adversely affects the operation of the network or violates the rules and
363+protocols for communication across the network.
364+
365+ Corresponding Source conveyed, and Installation Information provided,
366+in accord with this section must be in a format that is publicly
367+documented (and with an implementation available to the public in
368+source code form), and must require no special password or key for
369+unpacking, reading or copying.
370+
371+ 7. Additional Terms.
372+
373+ "Additional permissions" are terms that supplement the terms of this
374+License by making exceptions from one or more of its conditions.
375+Additional permissions that are applicable to the entire Program shall
376+be treated as though they were included in this License, to the extent
377+that they are valid under applicable law. If additional permissions
378+apply only to part of the Program, that part may be used separately
379+under those permissions, but the entire Program remains governed by
380+this License without regard to the additional permissions.
381+
382+ When you convey a copy of a covered work, you may at your option
383+remove any additional permissions from that copy, or from any part of
384+it. (Additional permissions may be written to require their own
385+removal in certain cases when you modify the work.) You may place
386+additional permissions on material, added by you to a covered work,
387+for which you have or can give appropriate copyright permission.
388+
389+ Notwithstanding any other provision of this License, for material you
390+add to a covered work, you may (if authorized by the copyright holders of
391+that material) supplement the terms of this License with terms:
392+
393+ a) Disclaiming warranty or limiting liability differently from the
394+ terms of sections 15 and 16 of this License; or
395+
396+ b) Requiring preservation of specified reasonable legal notices or
397+ author attributions in that material or in the Appropriate Legal
398+ Notices displayed by works containing it; or
399+
400+ c) Prohibiting misrepresentation of the origin of that material, or
401+ requiring that modified versions of such material be marked in
402+ reasonable ways as different from the original version; or
403+
404+ d) Limiting the use for publicity purposes of names of licensors or
405+ authors of the material; or
406+
407+ e) Declining to grant rights under trademark law for use of some
408+ trade names, trademarks, or service marks; or
409+
410+ f) Requiring indemnification of licensors and authors of that
411+ material by anyone who conveys the material (or modified versions of
412+ it) with contractual assumptions of liability to the recipient, for
413+ any liability that these contractual assumptions directly impose on
414+ those licensors and authors.
415+
416+ All other non-permissive additional terms are considered "further
417+restrictions" within the meaning of section 10. If the Program as you
418+received it, or any part of it, contains a notice stating that it is
419+governed by this License along with a term that is a further
420+restriction, you may remove that term. If a license document contains
421+a further restriction but permits relicensing or conveying under this
422+License, you may add to a covered work material governed by the terms
423+of that license document, provided that the further restriction does
424+not survive such relicensing or conveying.
425+
426+ If you add terms to a covered work in accord with this section, you
427+must place, in the relevant source files, a statement of the
428+additional terms that apply to those files, or a notice indicating
429+where to find the applicable terms.
430+
431+ Additional terms, permissive or non-permissive, may be stated in the
432+form of a separately written license, or stated as exceptions;
433+the above requirements apply either way.
434+
435+ 8. Termination.
436+
437+ You may not propagate or modify a covered work except as expressly
438+provided under this License. Any attempt otherwise to propagate or
439+modify it is void, and will automatically terminate your rights under
440+this License (including any patent licenses granted under the third
441+paragraph of section 11).
442+
443+ However, if you cease all violation of this License, then your
444+license from a particular copyright holder is reinstated (a)
445+provisionally, unless and until the copyright holder explicitly and
446+finally terminates your license, and (b) permanently, if the copyright
447+holder fails to notify you of the violation by some reasonable means
448+prior to 60 days after the cessation.
449+
450+ Moreover, your license from a particular copyright holder is
451+reinstated permanently if the copyright holder notifies you of the
452+violation by some reasonable means, this is the first time you have
453+received notice of violation of this License (for any work) from that
454+copyright holder, and you cure the violation prior to 30 days after
455+your receipt of the notice.
456+
457+ Termination of your rights under this section does not terminate the
458+licenses of parties who have received copies or rights from you under
459+this License. If your rights have been terminated and not permanently
460+reinstated, you do not qualify to receive new licenses for the same
461+material under section 10.
462+
463+ 9. Acceptance Not Required for Having Copies.
464+
465+ You are not required to accept this License in order to receive or
466+run a copy of the Program. Ancillary propagation of a covered work
467+occurring solely as a consequence of using peer-to-peer transmission
468+to receive a copy likewise does not require acceptance. However,
469+nothing other than this License grants you permission to propagate or
470+modify any covered work. These actions infringe copyright if you do
471+not accept this License. Therefore, by modifying or propagating a
472+covered work, you indicate your acceptance of this License to do so.
473+
474+ 10. Automatic Licensing of Downstream Recipients.
475+
476+ Each time you convey a covered work, the recipient automatically
477+receives a license from the original licensors, to run, modify and
478+propagate that work, subject to this License. You are not responsible
479+for enforcing compliance by third parties with this License.
480+
481+ An "entity transaction" is a transaction transferring control of an
482+organization, or substantially all assets of one, or subdividing an
483+organization, or merging organizations. If propagation of a covered
484+work results from an entity transaction, each party to that
485+transaction who receives a copy of the work also receives whatever
486+licenses to the work the party's predecessor in interest had or could
487+give under the previous paragraph, plus a right to possession of the
488+Corresponding Source of the work from the predecessor in interest, if
489+the predecessor has it or can get it with reasonable efforts.
490+
491+ You may not impose any further restrictions on the exercise of the
492+rights granted or affirmed under this License. For example, you may
493+not impose a license fee, royalty, or other charge for exercise of
494+rights granted under this License, and you may not initiate litigation
495+(including a cross-claim or counterclaim in a lawsuit) alleging that
496+any patent claim is infringed by making, using, selling, offering for
497+sale, or importing the Program or any portion of it.
498+
499+ 11. Patents.
500+
501+ A "contributor" is a copyright holder who authorizes use under this
502+License of the Program or a work on which the Program is based. The
503+work thus licensed is called the contributor's "contributor version".
504+
505+ A contributor's "essential patent claims" are all patent claims
506+owned or controlled by the contributor, whether already acquired or
507+hereafter acquired, that would be infringed by some manner, permitted
508+by this License, of making, using, or selling its contributor version,
509+but do not include claims that would be infringed only as a
510+consequence of further modification of the contributor version. For
511+purposes of this definition, "control" includes the right to grant
512+patent sublicenses in a manner consistent with the requirements of
513+this License.
514+
515+ Each contributor grants you a non-exclusive, worldwide, royalty-free
516+patent license under the contributor's essential patent claims, to
517+make, use, sell, offer for sale, import and otherwise run, modify and
518+propagate the contents of its contributor version.
519+
520+ In the following three paragraphs, a "patent license" is any express
521+agreement or commitment, however denominated, not to enforce a patent
522+(such as an express permission to practice a patent or covenant not to
523+sue for patent infringement). To "grant" such a patent license to a
524+party means to make such an agreement or commitment not to enforce a
525+patent against the party.
526+
527+ If you convey a covered work, knowingly relying on a patent license,
528+and the Corresponding Source of the work is not available for anyone
529+to copy, free of charge and under the terms of this License, through a
530+publicly available network server or other readily accessible means,
531+then you must either (1) cause the Corresponding Source to be so
532+available, or (2) arrange to deprive yourself of the benefit of the
533+patent license for this particular work, or (3) arrange, in a manner
534+consistent with the requirements of this License, to extend the patent
535+license to downstream recipients. "Knowingly relying" means you have
536+actual knowledge that, but for the patent license, your conveying the
537+covered work in a country, or your recipient's use of the covered work
538+in a country, would infringe one or more identifiable patents in that
539+country that you have reason to believe are valid.
540+
541+ If, pursuant to or in connection with a single transaction or
542+arrangement, you convey, or propagate by procuring conveyance of, a
543+covered work, and grant a patent license to some of the parties
544+receiving the covered work authorizing them to use, propagate, modify
545+or convey a specific copy of the covered work, then the patent license
546+you grant is automatically extended to all recipients of the covered
547+work and works based on it.
548+
549+ A patent license is "discriminatory" if it does not include within
550+the scope of its coverage, prohibits the exercise of, or is
551+conditioned on the non-exercise of one or more of the rights that are
552+specifically granted under this License. You may not convey a covered
553+work if you are a party to an arrangement with a third party that is
554+in the business of distributing software, under which you make payment
555+to the third party based on the extent of your activity of conveying
556+the work, and under which the third party grants, to any of the
557+parties who would receive the covered work from you, a discriminatory
558+patent license (a) in connection with copies of the covered work
559+conveyed by you (or copies made from those copies), or (b) primarily
560+for and in connection with specific products or compilations that
561+contain the covered work, unless you entered into that arrangement,
562+or that patent license was granted, prior to 28 March 2007.
563+
564+ Nothing in this License shall be construed as excluding or limiting
565+any implied license or other defenses to infringement that may
566+otherwise be available to you under applicable patent law.
567+
568+ 12. No Surrender of Others' Freedom.
569+
570+ If conditions are imposed on you (whether by court order, agreement or
571+otherwise) that contradict the conditions of this License, they do not
572+excuse you from the conditions of this License. If you cannot convey a
573+covered work so as to satisfy simultaneously your obligations under this
574+License and any other pertinent obligations, then as a consequence you may
575+not convey it at all. For example, if you agree to terms that obligate you
576+to collect a royalty for further conveying from those to whom you convey
577+the Program, the only way you could satisfy both those terms and this
578+License would be to refrain entirely from conveying the Program.
579+
580+ 13. Use with the GNU Affero General Public License.
581+
582+ Notwithstanding any other provision of this License, you have
583+permission to link or combine any covered work with a work licensed
584+under version 3 of the GNU Affero General Public License into a single
585+combined work, and to convey the resulting work. The terms of this
586+License will continue to apply to the part which is the covered work,
587+but the special requirements of the GNU Affero General Public License,
588+section 13, concerning interaction through a network will apply to the
589+combination as such.
590+
591+ 14. Revised Versions of this License.
592+
593+ The Free Software Foundation may publish revised and/or new versions of
594+the GNU General Public License from time to time. Such new versions will
595+be similar in spirit to the present version, but may differ in detail to
596+address new problems or concerns.
597+
598+ Each version is given a distinguishing version number. If the
599+Program specifies that a certain numbered version of the GNU General
600+Public License "or any later version" applies to it, you have the
601+option of following the terms and conditions either of that numbered
602+version or of any later version published by the Free Software
603+Foundation. If the Program does not specify a version number of the
604+GNU General Public License, you may choose any version ever published
605+by the Free Software Foundation.
606+
607+ If the Program specifies that a proxy can decide which future
608+versions of the GNU General Public License can be used, that proxy's
609+public statement of acceptance of a version permanently authorizes you
610+to choose that version for the Program.
611+
612+ Later license versions may give you additional or different
613+permissions. However, no additional obligations are imposed on any
614+author or copyright holder as a result of your choosing to follow a
615+later version.
616+
617+ 15. Disclaimer of Warranty.
618+
619+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
620+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
621+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
622+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
623+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
624+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
625+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
626+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
627+
628+ 16. Limitation of Liability.
629+
630+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
631+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
632+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
633+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
634+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
635+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
636+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
637+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
638+SUCH DAMAGES.
639+
640+ 17. Interpretation of Sections 15 and 16.
641+
642+ If the disclaimer of warranty and limitation of liability provided
643+above cannot be given local legal effect according to their terms,
644+reviewing courts shall apply local law that most closely approximates
645+an absolute waiver of all civil liability in connection with the
646+Program, unless a warranty or assumption of liability accompanies a
647+copy of the Program in return for a fee.
648+
649+ END OF TERMS AND CONDITIONS
650+
651+ How to Apply These Terms to Your New Programs
652+
653+ If you develop a new program, and you want it to be of the greatest
654+possible use to the public, the best way to achieve this is to make it
655+free software which everyone can redistribute and change under these terms.
656+
657+ To do so, attach the following notices to the program. It is safest
658+to attach them to the start of each source file to most effectively
659+state the exclusion of warranty; and each file should have at least
660+the "copyright" line and a pointer to where the full notice is found.
661+
662+ <one line to give the program's name and a brief idea of what it does.>
663+ Copyright (C) <year> <name of author>
664+
665+ This program is free software: you can redistribute it and/or modify
666+ it under the terms of the GNU General Public License as published by
667+ the Free Software Foundation, either version 3 of the License, or
668+ (at your option) any later version.
669+
670+ This program is distributed in the hope that it will be useful,
671+ but WITHOUT ANY WARRANTY; without even the implied warranty of
672+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
673+ GNU General Public License for more details.
674+
675+ You should have received a copy of the GNU General Public License
676+ along with this program. If not, see <http://www.gnu.org/licenses/>.
677+
678+Also add information on how to contact you by electronic and paper mail.
679+
680+ If the program does terminal interaction, make it output a short
681+notice like this when it starts in an interactive mode:
682+
683+ <program> Copyright (C) <year> <name of author>
684+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
685+ This is free software, and you are welcome to redistribute it
686+ under certain conditions; type `show c' for details.
687+
688+The hypothetical commands `show w' and `show c' should show the appropriate
689+parts of the General Public License. Of course, your program's commands
690+might be different; for a GUI interface, you would use an "about box".
691+
692+ You should also get your employer (if you work as a programmer) or school,
693+if any, to sign a "copyright disclaimer" for the program, if necessary.
694+For more information on this, and how to apply and follow the GNU GPL, see
695+<http://www.gnu.org/licenses/>.
696+
697+ The GNU General Public License does not permit incorporating your program
698+into proprietary programs. If your program is a subroutine library, you
699+may consider it more useful to permit linking proprietary applications with
700+the library. If this is what you want to do, use the GNU Lesser General
701+Public License instead of this License. But first, please read
702+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
703
704=== added file 'Frogger/ChangeLog'
705--- Frogger/ChangeLog 1970-01-01 00:00:00 +0000
706+++ Frogger/ChangeLog 2010-03-12 10:44:17 +0000
707@@ -0,0 +1,34 @@
708+Frog Game 0.3:
709+ * Renamed CHANGES to ChangeLog.
710+ * Renamed LICENSE to COPYING.
711+ * Added INSTALL file (to instruct on how to install on Linux).
712+ * Removed setup-win.py and setup-mac.py and created a single setup.py file.
713+ * Added Package 'lib' to handle shared logic.
714+ * Added frog.game.desktop file.
715+ * Changed color of "safe" spots on background.png
716+
717+Frog Game 0.2:
718+ * Changed the objectives of the game to make the game more original.
719+ * Changed game resolution to 800x600 instead of 600x800.
720+ * Removed DOUBLEBUF and colour depth flags from display.
721+ * Some general clean up and optimization of Frog Game.
722+ * Fixed issues with font rendering (LP: #514236)
723+ * You can now hold to move the Frog.
724+
725+Frog Game 0.1:
726+ * Moved Game to Python, instead of C#.
727+ * Support for Linux and Mac OS X in addition to Windows.
728+ * Fixed issues with CPU usage.
729+ * Difficulty increases every level now instead of every 5:
730+ Still basic difficulty (speed increase only).
731+ * Log size reduced to remove ability to slide from log to log on
732+ same level.
733+ * Balancing on log removed. Currently a single pixel on log will
734+ be enough to prevent you from landing in water. (LP: #514564)
735+ * New Menu/Exit Screen.
736+ * New Font: Blooming Grove released under Public Domain by Jonadab
737+ the Unsightly One (http://openfontlibrary.org/media/files/jonadab/414)
738+
739+Frog Game prototype:
740+ * Initial prototype to test the game concepts.
741+
742
743=== added file 'Frogger/INSTALL'
744--- Frogger/INSTALL 1970-01-01 00:00:00 +0000
745+++ Frogger/INSTALL 2010-03-12 10:44:17 +0000
746@@ -0,0 +1,5 @@
747+install python pygame library ("python-pygame" on Debian/ubuntu) and run:
748+
749+ ./setup.py install
750+
751+Note that this is not as complete as a package install at the moment - e.g. GNOME menu integration will not happen and there is no uninstall option.
752
753=== removed file 'Frogger/LICENCE'
754--- Frogger/LICENCE 2010-01-29 23:57:26 +0000
755+++ Frogger/LICENCE 1970-01-01 00:00:00 +0000
756@@ -1,674 +0,0 @@
757- GNU GENERAL PUBLIC LICENSE
758- Version 3, 29 June 2007
759-
760- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
761- Everyone is permitted to copy and distribute verbatim copies
762- of this license document, but changing it is not allowed.
763-
764- Preamble
765-
766- The GNU General Public License is a free, copyleft license for
767-software and other kinds of works.
768-
769- The licenses for most software and other practical works are designed
770-to take away your freedom to share and change the works. By contrast,
771-the GNU General Public License is intended to guarantee your freedom to
772-share and change all versions of a program--to make sure it remains free
773-software for all its users. We, the Free Software Foundation, use the
774-GNU General Public License for most of our software; it applies also to
775-any other work released this way by its authors. You can apply it to
776-your programs, too.
777-
778- When we speak of free software, we are referring to freedom, not
779-price. Our General Public Licenses are designed to make sure that you
780-have the freedom to distribute copies of free software (and charge for
781-them if you wish), that you receive source code or can get it if you
782-want it, that you can change the software or use pieces of it in new
783-free programs, and that you know you can do these things.
784-
785- To protect your rights, we need to prevent others from denying you
786-these rights or asking you to surrender the rights. Therefore, you have
787-certain responsibilities if you distribute copies of the software, or if
788-you modify it: responsibilities to respect the freedom of others.
789-
790- For example, if you distribute copies of such a program, whether
791-gratis or for a fee, you must pass on to the recipients the same
792-freedoms that you received. You must make sure that they, too, receive
793-or can get the source code. And you must show them these terms so they
794-know their rights.
795-
796- Developers that use the GNU GPL protect your rights with two steps:
797-(1) assert copyright on the software, and (2) offer you this License
798-giving you legal permission to copy, distribute and/or modify it.
799-
800- For the developers' and authors' protection, the GPL clearly explains
801-that there is no warranty for this free software. For both users' and
802-authors' sake, the GPL requires that modified versions be marked as
803-changed, so that their problems will not be attributed erroneously to
804-authors of previous versions.
805-
806- Some devices are designed to deny users access to install or run
807-modified versions of the software inside them, although the manufacturer
808-can do so. This is fundamentally incompatible with the aim of
809-protecting users' freedom to change the software. The systematic
810-pattern of such abuse occurs in the area of products for individuals to
811-use, which is precisely where it is most unacceptable. Therefore, we
812-have designed this version of the GPL to prohibit the practice for those
813-products. If such problems arise substantially in other domains, we
814-stand ready to extend this provision to those domains in future versions
815-of the GPL, as needed to protect the freedom of users.
816-
817- Finally, every program is threatened constantly by software patents.
818-States should not allow patents to restrict development and use of
819-software on general-purpose computers, but in those that do, we wish to
820-avoid the special danger that patents applied to a free program could
821-make it effectively proprietary. To prevent this, the GPL assures that
822-patents cannot be used to render the program non-free.
823-
824- The precise terms and conditions for copying, distribution and
825-modification follow.
826-
827- TERMS AND CONDITIONS
828-
829- 0. Definitions.
830-
831- "This License" refers to version 3 of the GNU General Public License.
832-
833- "Copyright" also means copyright-like laws that apply to other kinds of
834-works, such as semiconductor masks.
835-
836- "The Program" refers to any copyrightable work licensed under this
837-License. Each licensee is addressed as "you". "Licensees" and
838-"recipients" may be individuals or organizations.
839-
840- To "modify" a work means to copy from or adapt all or part of the work
841-in a fashion requiring copyright permission, other than the making of an
842-exact copy. The resulting work is called a "modified version" of the
843-earlier work or a work "based on" the earlier work.
844-
845- A "covered work" means either the unmodified Program or a work based
846-on the Program.
847-
848- To "propagate" a work means to do anything with it that, without
849-permission, would make you directly or secondarily liable for
850-infringement under applicable copyright law, except executing it on a
851-computer or modifying a private copy. Propagation includes copying,
852-distribution (with or without modification), making available to the
853-public, and in some countries other activities as well.
854-
855- To "convey" a work means any kind of propagation that enables other
856-parties to make or receive copies. Mere interaction with a user through
857-a computer network, with no transfer of a copy, is not conveying.
858-
859- An interactive user interface displays "Appropriate Legal Notices"
860-to the extent that it includes a convenient and prominently visible
861-feature that (1) displays an appropriate copyright notice, and (2)
862-tells the user that there is no warranty for the work (except to the
863-extent that warranties are provided), that licensees may convey the
864-work under this License, and how to view a copy of this License. If
865-the interface presents a list of user commands or options, such as a
866-menu, a prominent item in the list meets this criterion.
867-
868- 1. Source Code.
869-
870- The "source code" for a work means the preferred form of the work
871-for making modifications to it. "Object code" means any non-source
872-form of a work.
873-
874- A "Standard Interface" means an interface that either is an official
875-standard defined by a recognized standards body, or, in the case of
876-interfaces specified for a particular programming language, one that
877-is widely used among developers working in that language.
878-
879- The "System Libraries" of an executable work include anything, other
880-than the work as a whole, that (a) is included in the normal form of
881-packaging a Major Component, but which is not part of that Major
882-Component, and (b) serves only to enable use of the work with that
883-Major Component, or to implement a Standard Interface for which an
884-implementation is available to the public in source code form. A
885-"Major Component", in this context, means a major essential component
886-(kernel, window system, and so on) of the specific operating system
887-(if any) on which the executable work runs, or a compiler used to
888-produce the work, or an object code interpreter used to run it.
889-
890- The "Corresponding Source" for a work in object code form means all
891-the source code needed to generate, install, and (for an executable
892-work) run the object code and to modify the work, including scripts to
893-control those activities. However, it does not include the work's
894-System Libraries, or general-purpose tools or generally available free
895-programs which are used unmodified in performing those activities but
896-which are not part of the work. For example, Corresponding Source
897-includes interface definition files associated with source files for
898-the work, and the source code for shared libraries and dynamically
899-linked subprograms that the work is specifically designed to require,
900-such as by intimate data communication or control flow between those
901-subprograms and other parts of the work.
902-
903- The Corresponding Source need not include anything that users
904-can regenerate automatically from other parts of the Corresponding
905-Source.
906-
907- The Corresponding Source for a work in source code form is that
908-same work.
909-
910- 2. Basic Permissions.
911-
912- All rights granted under this License are granted for the term of
913-copyright on the Program, and are irrevocable provided the stated
914-conditions are met. This License explicitly affirms your unlimited
915-permission to run the unmodified Program. The output from running a
916-covered work is covered by this License only if the output, given its
917-content, constitutes a covered work. This License acknowledges your
918-rights of fair use or other equivalent, as provided by copyright law.
919-
920- You may make, run and propagate covered works that you do not
921-convey, without conditions so long as your license otherwise remains
922-in force. You may convey covered works to others for the sole purpose
923-of having them make modifications exclusively for you, or provide you
924-with facilities for running those works, provided that you comply with
925-the terms of this License in conveying all material for which you do
926-not control copyright. Those thus making or running the covered works
927-for you must do so exclusively on your behalf, under your direction
928-and control, on terms that prohibit them from making any copies of
929-your copyrighted material outside their relationship with you.
930-
931- Conveying under any other circumstances is permitted solely under
932-the conditions stated below. Sublicensing is not allowed; section 10
933-makes it unnecessary.
934-
935- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
936-
937- No covered work shall be deemed part of an effective technological
938-measure under any applicable law fulfilling obligations under article
939-11 of the WIPO copyright treaty adopted on 20 December 1996, or
940-similar laws prohibiting or restricting circumvention of such
941-measures.
942-
943- When you convey a covered work, you waive any legal power to forbid
944-circumvention of technological measures to the extent such circumvention
945-is effected by exercising rights under this License with respect to
946-the covered work, and you disclaim any intention to limit operation or
947-modification of the work as a means of enforcing, against the work's
948-users, your or third parties' legal rights to forbid circumvention of
949-technological measures.
950-
951- 4. Conveying Verbatim Copies.
952-
953- You may convey verbatim copies of the Program's source code as you
954-receive it, in any medium, provided that you conspicuously and
955-appropriately publish on each copy an appropriate copyright notice;
956-keep intact all notices stating that this License and any
957-non-permissive terms added in accord with section 7 apply to the code;
958-keep intact all notices of the absence of any warranty; and give all
959-recipients a copy of this License along with the Program.
960-
961- You may charge any price or no price for each copy that you convey,
962-and you may offer support or warranty protection for a fee.
963-
964- 5. Conveying Modified Source Versions.
965-
966- You may convey a work based on the Program, or the modifications to
967-produce it from the Program, in the form of source code under the
968-terms of section 4, provided that you also meet all of these conditions:
969-
970- a) The work must carry prominent notices stating that you modified
971- it, and giving a relevant date.
972-
973- b) The work must carry prominent notices stating that it is
974- released under this License and any conditions added under section
975- 7. This requirement modifies the requirement in section 4 to
976- "keep intact all notices".
977-
978- c) You must license the entire work, as a whole, under this
979- License to anyone who comes into possession of a copy. This
980- License will therefore apply, along with any applicable section 7
981- additional terms, to the whole of the work, and all its parts,
982- regardless of how they are packaged. This License gives no
983- permission to license the work in any other way, but it does not
984- invalidate such permission if you have separately received it.
985-
986- d) If the work has interactive user interfaces, each must display
987- Appropriate Legal Notices; however, if the Program has interactive
988- interfaces that do not display Appropriate Legal Notices, your
989- work need not make them do so.
990-
991- A compilation of a covered work with other separate and independent
992-works, which are not by their nature extensions of the covered work,
993-and which are not combined with it such as to form a larger program,
994-in or on a volume of a storage or distribution medium, is called an
995-"aggregate" if the compilation and its resulting copyright are not
996-used to limit the access or legal rights of the compilation's users
997-beyond what the individual works permit. Inclusion of a covered work
998-in an aggregate does not cause this License to apply to the other
999-parts of the aggregate.
1000-
1001- 6. Conveying Non-Source Forms.
1002-
1003- You may convey a covered work in object code form under the terms
1004-of sections 4 and 5, provided that you also convey the
1005-machine-readable Corresponding Source under the terms of this License,
1006-in one of these ways:
1007-
1008- a) Convey the object code in, or embodied in, a physical product
1009- (including a physical distribution medium), accompanied by the
1010- Corresponding Source fixed on a durable physical medium
1011- customarily used for software interchange.
1012-
1013- b) Convey the object code in, or embodied in, a physical product
1014- (including a physical distribution medium), accompanied by a
1015- written offer, valid for at least three years and valid for as
1016- long as you offer spare parts or customer support for that product
1017- model, to give anyone who possesses the object code either (1) a
1018- copy of the Corresponding Source for all the software in the
1019- product that is covered by this License, on a durable physical
1020- medium customarily used for software interchange, for a price no
1021- more than your reasonable cost of physically performing this
1022- conveying of source, or (2) access to copy the
1023- Corresponding Source from a network server at no charge.
1024-
1025- c) Convey individual copies of the object code with a copy of the
1026- written offer to provide the Corresponding Source. This
1027- alternative is allowed only occasionally and noncommercially, and
1028- only if you received the object code with such an offer, in accord
1029- with subsection 6b.
1030-
1031- d) Convey the object code by offering access from a designated
1032- place (gratis or for a charge), and offer equivalent access to the
1033- Corresponding Source in the same way through the same place at no
1034- further charge. You need not require recipients to copy the
1035- Corresponding Source along with the object code. If the place to
1036- copy the object code is a network server, the Corresponding Source
1037- may be on a different server (operated by you or a third party)
1038- that supports equivalent copying facilities, provided you maintain
1039- clear directions next to the object code saying where to find the
1040- Corresponding Source. Regardless of what server hosts the
1041- Corresponding Source, you remain obligated to ensure that it is
1042- available for as long as needed to satisfy these requirements.
1043-
1044- e) Convey the object code using peer-to-peer transmission, provided
1045- you inform other peers where the object code and Corresponding
1046- Source of the work are being offered to the general public at no
1047- charge under subsection 6d.
1048-
1049- A separable portion of the object code, whose source code is excluded
1050-from the Corresponding Source as a System Library, need not be
1051-included in conveying the object code work.
1052-
1053- A "User Product" is either (1) a "consumer product", which means any
1054-tangible personal property which is normally used for personal, family,
1055-or household purposes, or (2) anything designed or sold for incorporation
1056-into a dwelling. In determining whether a product is a consumer product,
1057-doubtful cases shall be resolved in favor of coverage. For a particular
1058-product received by a particular user, "normally used" refers to a
1059-typical or common use of that class of product, regardless of the status
1060-of the particular user or of the way in which the particular user
1061-actually uses, or expects or is expected to use, the product. A product
1062-is a consumer product regardless of whether the product has substantial
1063-commercial, industrial or non-consumer uses, unless such uses represent
1064-the only significant mode of use of the product.
1065-
1066- "Installation Information" for a User Product means any methods,
1067-procedures, authorization keys, or other information required to install
1068-and execute modified versions of a covered work in that User Product from
1069-a modified version of its Corresponding Source. The information must
1070-suffice to ensure that the continued functioning of the modified object
1071-code is in no case prevented or interfered with solely because
1072-modification has been made.
1073-
1074- If you convey an object code work under this section in, or with, or
1075-specifically for use in, a User Product, and the conveying occurs as
1076-part of a transaction in which the right of possession and use of the
1077-User Product is transferred to the recipient in perpetuity or for a
1078-fixed term (regardless of how the transaction is characterized), the
1079-Corresponding Source conveyed under this section must be accompanied
1080-by the Installation Information. But this requirement does not apply
1081-if neither you nor any third party retains the ability to install
1082-modified object code on the User Product (for example, the work has
1083-been installed in ROM).
1084-
1085- The requirement to provide Installation Information does not include a
1086-requirement to continue to provide support service, warranty, or updates
1087-for a work that has been modified or installed by the recipient, or for
1088-the User Product in which it has been modified or installed. Access to a
1089-network may be denied when the modification itself materially and
1090-adversely affects the operation of the network or violates the rules and
1091-protocols for communication across the network.
1092-
1093- Corresponding Source conveyed, and Installation Information provided,
1094-in accord with this section must be in a format that is publicly
1095-documented (and with an implementation available to the public in
1096-source code form), and must require no special password or key for
1097-unpacking, reading or copying.
1098-
1099- 7. Additional Terms.
1100-
1101- "Additional permissions" are terms that supplement the terms of this
1102-License by making exceptions from one or more of its conditions.
1103-Additional permissions that are applicable to the entire Program shall
1104-be treated as though they were included in this License, to the extent
1105-that they are valid under applicable law. If additional permissions
1106-apply only to part of the Program, that part may be used separately
1107-under those permissions, but the entire Program remains governed by
1108-this License without regard to the additional permissions.
1109-
1110- When you convey a copy of a covered work, you may at your option
1111-remove any additional permissions from that copy, or from any part of
1112-it. (Additional permissions may be written to require their own
1113-removal in certain cases when you modify the work.) You may place
1114-additional permissions on material, added by you to a covered work,
1115-for which you have or can give appropriate copyright permission.
1116-
1117- Notwithstanding any other provision of this License, for material you
1118-add to a covered work, you may (if authorized by the copyright holders of
1119-that material) supplement the terms of this License with terms:
1120-
1121- a) Disclaiming warranty or limiting liability differently from the
1122- terms of sections 15 and 16 of this License; or
1123-
1124- b) Requiring preservation of specified reasonable legal notices or
1125- author attributions in that material or in the Appropriate Legal
1126- Notices displayed by works containing it; or
1127-
1128- c) Prohibiting misrepresentation of the origin of that material, or
1129- requiring that modified versions of such material be marked in
1130- reasonable ways as different from the original version; or
1131-
1132- d) Limiting the use for publicity purposes of names of licensors or
1133- authors of the material; or
1134-
1135- e) Declining to grant rights under trademark law for use of some
1136- trade names, trademarks, or service marks; or
1137-
1138- f) Requiring indemnification of licensors and authors of that
1139- material by anyone who conveys the material (or modified versions of
1140- it) with contractual assumptions of liability to the recipient, for
1141- any liability that these contractual assumptions directly impose on
1142- those licensors and authors.
1143-
1144- All other non-permissive additional terms are considered "further
1145-restrictions" within the meaning of section 10. If the Program as you
1146-received it, or any part of it, contains a notice stating that it is
1147-governed by this License along with a term that is a further
1148-restriction, you may remove that term. If a license document contains
1149-a further restriction but permits relicensing or conveying under this
1150-License, you may add to a covered work material governed by the terms
1151-of that license document, provided that the further restriction does
1152-not survive such relicensing or conveying.
1153-
1154- If you add terms to a covered work in accord with this section, you
1155-must place, in the relevant source files, a statement of the
1156-additional terms that apply to those files, or a notice indicating
1157-where to find the applicable terms.
1158-
1159- Additional terms, permissive or non-permissive, may be stated in the
1160-form of a separately written license, or stated as exceptions;
1161-the above requirements apply either way.
1162-
1163- 8. Termination.
1164-
1165- You may not propagate or modify a covered work except as expressly
1166-provided under this License. Any attempt otherwise to propagate or
1167-modify it is void, and will automatically terminate your rights under
1168-this License (including any patent licenses granted under the third
1169-paragraph of section 11).
1170-
1171- However, if you cease all violation of this License, then your
1172-license from a particular copyright holder is reinstated (a)
1173-provisionally, unless and until the copyright holder explicitly and
1174-finally terminates your license, and (b) permanently, if the copyright
1175-holder fails to notify you of the violation by some reasonable means
1176-prior to 60 days after the cessation.
1177-
1178- Moreover, your license from a particular copyright holder is
1179-reinstated permanently if the copyright holder notifies you of the
1180-violation by some reasonable means, this is the first time you have
1181-received notice of violation of this License (for any work) from that
1182-copyright holder, and you cure the violation prior to 30 days after
1183-your receipt of the notice.
1184-
1185- Termination of your rights under this section does not terminate the
1186-licenses of parties who have received copies or rights from you under
1187-this License. If your rights have been terminated and not permanently
1188-reinstated, you do not qualify to receive new licenses for the same
1189-material under section 10.
1190-
1191- 9. Acceptance Not Required for Having Copies.
1192-
1193- You are not required to accept this License in order to receive or
1194-run a copy of the Program. Ancillary propagation of a covered work
1195-occurring solely as a consequence of using peer-to-peer transmission
1196-to receive a copy likewise does not require acceptance. However,
1197-nothing other than this License grants you permission to propagate or
1198-modify any covered work. These actions infringe copyright if you do
1199-not accept this License. Therefore, by modifying or propagating a
1200-covered work, you indicate your acceptance of this License to do so.
1201-
1202- 10. Automatic Licensing of Downstream Recipients.
1203-
1204- Each time you convey a covered work, the recipient automatically
1205-receives a license from the original licensors, to run, modify and
1206-propagate that work, subject to this License. You are not responsible
1207-for enforcing compliance by third parties with this License.
1208-
1209- An "entity transaction" is a transaction transferring control of an
1210-organization, or substantially all assets of one, or subdividing an
1211-organization, or merging organizations. If propagation of a covered
1212-work results from an entity transaction, each party to that
1213-transaction who receives a copy of the work also receives whatever
1214-licenses to the work the party's predecessor in interest had or could
1215-give under the previous paragraph, plus a right to possession of the
1216-Corresponding Source of the work from the predecessor in interest, if
1217-the predecessor has it or can get it with reasonable efforts.
1218-
1219- You may not impose any further restrictions on the exercise of the
1220-rights granted or affirmed under this License. For example, you may
1221-not impose a license fee, royalty, or other charge for exercise of
1222-rights granted under this License, and you may not initiate litigation
1223-(including a cross-claim or counterclaim in a lawsuit) alleging that
1224-any patent claim is infringed by making, using, selling, offering for
1225-sale, or importing the Program or any portion of it.
1226-
1227- 11. Patents.
1228-
1229- A "contributor" is a copyright holder who authorizes use under this
1230-License of the Program or a work on which the Program is based. The
1231-work thus licensed is called the contributor's "contributor version".
1232-
1233- A contributor's "essential patent claims" are all patent claims
1234-owned or controlled by the contributor, whether already acquired or
1235-hereafter acquired, that would be infringed by some manner, permitted
1236-by this License, of making, using, or selling its contributor version,
1237-but do not include claims that would be infringed only as a
1238-consequence of further modification of the contributor version. For
1239-purposes of this definition, "control" includes the right to grant
1240-patent sublicenses in a manner consistent with the requirements of
1241-this License.
1242-
1243- Each contributor grants you a non-exclusive, worldwide, royalty-free
1244-patent license under the contributor's essential patent claims, to
1245-make, use, sell, offer for sale, import and otherwise run, modify and
1246-propagate the contents of its contributor version.
1247-
1248- In the following three paragraphs, a "patent license" is any express
1249-agreement or commitment, however denominated, not to enforce a patent
1250-(such as an express permission to practice a patent or covenant not to
1251-sue for patent infringement). To "grant" such a patent license to a
1252-party means to make such an agreement or commitment not to enforce a
1253-patent against the party.
1254-
1255- If you convey a covered work, knowingly relying on a patent license,
1256-and the Corresponding Source of the work is not available for anyone
1257-to copy, free of charge and under the terms of this License, through a
1258-publicly available network server or other readily accessible means,
1259-then you must either (1) cause the Corresponding Source to be so
1260-available, or (2) arrange to deprive yourself of the benefit of the
1261-patent license for this particular work, or (3) arrange, in a manner
1262-consistent with the requirements of this License, to extend the patent
1263-license to downstream recipients. "Knowingly relying" means you have
1264-actual knowledge that, but for the patent license, your conveying the
1265-covered work in a country, or your recipient's use of the covered work
1266-in a country, would infringe one or more identifiable patents in that
1267-country that you have reason to believe are valid.
1268-
1269- If, pursuant to or in connection with a single transaction or
1270-arrangement, you convey, or propagate by procuring conveyance of, a
1271-covered work, and grant a patent license to some of the parties
1272-receiving the covered work authorizing them to use, propagate, modify
1273-or convey a specific copy of the covered work, then the patent license
1274-you grant is automatically extended to all recipients of the covered
1275-work and works based on it.
1276-
1277- A patent license is "discriminatory" if it does not include within
1278-the scope of its coverage, prohibits the exercise of, or is
1279-conditioned on the non-exercise of one or more of the rights that are
1280-specifically granted under this License. You may not convey a covered
1281-work if you are a party to an arrangement with a third party that is
1282-in the business of distributing software, under which you make payment
1283-to the third party based on the extent of your activity of conveying
1284-the work, and under which the third party grants, to any of the
1285-parties who would receive the covered work from you, a discriminatory
1286-patent license (a) in connection with copies of the covered work
1287-conveyed by you (or copies made from those copies), or (b) primarily
1288-for and in connection with specific products or compilations that
1289-contain the covered work, unless you entered into that arrangement,
1290-or that patent license was granted, prior to 28 March 2007.
1291-
1292- Nothing in this License shall be construed as excluding or limiting
1293-any implied license or other defenses to infringement that may
1294-otherwise be available to you under applicable patent law.
1295-
1296- 12. No Surrender of Others' Freedom.
1297-
1298- If conditions are imposed on you (whether by court order, agreement or
1299-otherwise) that contradict the conditions of this License, they do not
1300-excuse you from the conditions of this License. If you cannot convey a
1301-covered work so as to satisfy simultaneously your obligations under this
1302-License and any other pertinent obligations, then as a consequence you may
1303-not convey it at all. For example, if you agree to terms that obligate you
1304-to collect a royalty for further conveying from those to whom you convey
1305-the Program, the only way you could satisfy both those terms and this
1306-License would be to refrain entirely from conveying the Program.
1307-
1308- 13. Use with the GNU Affero General Public License.
1309-
1310- Notwithstanding any other provision of this License, you have
1311-permission to link or combine any covered work with a work licensed
1312-under version 3 of the GNU Affero General Public License into a single
1313-combined work, and to convey the resulting work. The terms of this
1314-License will continue to apply to the part which is the covered work,
1315-but the special requirements of the GNU Affero General Public License,
1316-section 13, concerning interaction through a network will apply to the
1317-combination as such.
1318-
1319- 14. Revised Versions of this License.
1320-
1321- The Free Software Foundation may publish revised and/or new versions of
1322-the GNU General Public License from time to time. Such new versions will
1323-be similar in spirit to the present version, but may differ in detail to
1324-address new problems or concerns.
1325-
1326- Each version is given a distinguishing version number. If the
1327-Program specifies that a certain numbered version of the GNU General
1328-Public License "or any later version" applies to it, you have the
1329-option of following the terms and conditions either of that numbered
1330-version or of any later version published by the Free Software
1331-Foundation. If the Program does not specify a version number of the
1332-GNU General Public License, you may choose any version ever published
1333-by the Free Software Foundation.
1334-
1335- If the Program specifies that a proxy can decide which future
1336-versions of the GNU General Public License can be used, that proxy's
1337-public statement of acceptance of a version permanently authorizes you
1338-to choose that version for the Program.
1339-
1340- Later license versions may give you additional or different
1341-permissions. However, no additional obligations are imposed on any
1342-author or copyright holder as a result of your choosing to follow a
1343-later version.
1344-
1345- 15. Disclaimer of Warranty.
1346-
1347- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
1348-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
1349-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
1350-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
1351-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1352-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
1353-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
1354-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
1355-
1356- 16. Limitation of Liability.
1357-
1358- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
1359-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
1360-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
1361-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
1362-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
1363-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
1364-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
1365-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
1366-SUCH DAMAGES.
1367-
1368- 17. Interpretation of Sections 15 and 16.
1369-
1370- If the disclaimer of warranty and limitation of liability provided
1371-above cannot be given local legal effect according to their terms,
1372-reviewing courts shall apply local law that most closely approximates
1373-an absolute waiver of all civil liability in connection with the
1374-Program, unless a warranty or assumption of liability accompanies a
1375-copy of the Program in return for a fee.
1376-
1377- END OF TERMS AND CONDITIONS
1378-
1379- How to Apply These Terms to Your New Programs
1380-
1381- If you develop a new program, and you want it to be of the greatest
1382-possible use to the public, the best way to achieve this is to make it
1383-free software which everyone can redistribute and change under these terms.
1384-
1385- To do so, attach the following notices to the program. It is safest
1386-to attach them to the start of each source file to most effectively
1387-state the exclusion of warranty; and each file should have at least
1388-the "copyright" line and a pointer to where the full notice is found.
1389-
1390- <one line to give the program's name and a brief idea of what it does.>
1391- Copyright (C) <year> <name of author>
1392-
1393- This program is free software: you can redistribute it and/or modify
1394- it under the terms of the GNU General Public License as published by
1395- the Free Software Foundation, either version 3 of the License, or
1396- (at your option) any later version.
1397-
1398- This program is distributed in the hope that it will be useful,
1399- but WITHOUT ANY WARRANTY; without even the implied warranty of
1400- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1401- GNU General Public License for more details.
1402-
1403- You should have received a copy of the GNU General Public License
1404- along with this program. If not, see <http://www.gnu.org/licenses/>.
1405-
1406-Also add information on how to contact you by electronic and paper mail.
1407-
1408- If the program does terminal interaction, make it output a short
1409-notice like this when it starts in an interactive mode:
1410-
1411- <program> Copyright (C) <year> <name of author>
1412- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
1413- This is free software, and you are welcome to redistribute it
1414- under certain conditions; type `show c' for details.
1415-
1416-The hypothetical commands `show w' and `show c' should show the appropriate
1417-parts of the General Public License. Of course, your program's commands
1418-might be different; for a GUI interface, you would use an "about box".
1419-
1420- You should also get your employer (if you work as a programmer) or school,
1421-if any, to sign a "copyright disclaimer" for the program, if necessary.
1422-For more information on this, and how to apply and follow the GNU GPL, see
1423-<http://www.gnu.org/licenses/>.
1424-
1425- The GNU General Public License does not permit incorporating your program
1426-into proprietary programs. If your program is a subroutine library, you
1427-may consider it more useful to permit linking proprietary applications with
1428-the library. If this is what you want to do, use the GNU Lesser General
1429-Public License instead of this License. But first, please read
1430-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
1431
1432=== modified file 'Frogger/README'
1433--- Frogger/README 2010-01-29 23:57:26 +0000
1434+++ Frogger/README 2010-03-12 10:44:17 +0000
1435@@ -1,49 +1,69 @@
1436-Frog Game is (C) Daniel Bell <daniel.bell@saraclan.com>, 2009-2010.
1437-
1438-About:
1439-
1440-Frog Game is a fun survival game based upon the awesome arcade game: Frogger.
1441-This game was originally created by Daniel Bell as a University project for a first year module in 2009.
1442+Copyright (C) 2009, 2010 Daniel Bell <daniel.bell@saraclan.com>
1443+
1444+BACKGROUND:
1445+Frog Game is a fun survival/rescue game loosely based upon the awesome arcade game: Frogger.
1446+
1447+This game was originally created by as a University project for a module in the first year.
1448 It was created using Visual Studio 2008 and the objective was to create a prototype game,
1449-after the module I decided that I actually wanted to convert the prototype into an actual game
1450-that people can run on all platforms (Linux, Mac OSX and Windows).
1451+to demonstrate the game concepts of the design to the class. After completing the module
1452+I decided that I actually wanted to play this game on my system. (Visual Studio creates
1453+windows applications, and since I use Linux and Mac OSX the version created by Visual
1454+Studio was not suitable). Frog Game is now using Python as its platform and uses the
1455+pygame library (http://pygame.org). As a result Frog Game now has support on Windows,
1456+Linux and Mac OSX - and any other operating system where python and pygame are supported).
1457
1458-You can find more information about the prototype version of Frog Game:
1459- * http://saraclan.com/portfolio/project/Frogger
1460- * http://git.saraclan.com/index.php?p=frogger.git
1461+The following links have more information about the prototype version of Frog Game:
1462+ * http://saraclan.com/portfolio/project/Frogger (My Portfolio - holding details of the project)
1463+ * http://git.saraclan.com/index.php?p=frogger.git (GIT repository of the prototype)
1464
1465 Information about the current project can be found here:
1466 * https://launchpad.net/frogger
1467
1468-Artwork:
1469-
1470-The artwork of frog game was created by Daniel Bell (C) 2009-2010.
1471-
1472-Game Code:
1473-
1474-The game code for Frog Game was written by Daniel Bell (C) 2009-2010.
1475-Frog Game is a python application and utilises the pygame library (http://pygame.org) - LGPLv2 licenced.
1476-Frog Game has been tested using Python 2.5.x and 2.6.x on Windows, 2.6.x on Linux and 2.5 and 2.6 on Mac OS X.
1477-
1478-Running the game:
1479-
1480-To run this game, you require a version of Python (http://python.org) of at least 2.5 or 2.6 (other versions may work,
1481-but are not supported.) and pygame (http://pygame.org) of 1.9.0 (older versions such as 1.7.1 or 1.8.0 may be work, but
1482-cannot be supported.)
1483-
1484-You can run this game via the command-line by running the following command: python frogger.py
1485-You can also right click the frogger.py script and open it with the Python Interpreter.
1486-
1487-There are intallers and binaries available at http://launchpad.net/frogger
1488-
1489-Game Licence:
1490-
1491-Frog Game is licenced under the GNU General Public Licence v3. More details can be found in the LICENCE file
1492-if you did not recieve a LICENCE file, you can find more information at the Free Software Foundations website:
1493-http://www.gnu.org/licenses/gpl-3.0.txt
1494-
1495-Game Dependencies:
1496-
1497-As mentioned above, the dependancies for Frog Game are: Python 2.5 or greater, and Pygame 1.9.1.
1498-Python can be found at: http://python.org
1499-Pygame can be found at: http://pygame.org
1500+GAME OBJECTIVES:
1501+The objectives of Frog Game are to rescue the lost baby frogs and to get them home safe!
1502+
1503+As a player you control the Big Frog and it is your job to collect the frogs one at a time
1504+and bring them back to the start. Avoiding the obstacles and hazards on the way is essential
1505+for maximum point scoring as when you die the frog you were rescuing dies also.
1506+
1507+The scoring system takes into account how fast it took you to rescue the baby frog and
1508+your past deaths (if any).
1509+
1510+A new level begins when there are no baby frogs left to save and you have at least 1 life still
1511+remaining.
1512+
1513+ARTWORK:
1514+The artwork of frog game was created by Daniel Bell Copyright (C) 2009, 2010.
1515+
1516+RUNNING FROM SOURCE:
1517+Frog Game has the following dependencies:
1518+ * Python - 2.5+ (Tested it on 2.5 and 2.6 - lower versions may be supported)
1519+ * Pygame library - 1.9+ (Tested it on 1.9.1 - lower versions may be supported)
1520+
1521+On Windows:
1522+ Right click frogger.py and select "open with Python Interpreter".
1523+ Double clicking may automatically run the game code.
1524+On Mac:
1525+ Right click and in the Open With menu select Python Launcher
1526+On Linux:
1527+ Using the terminal navigate to the folder containing the source code and run
1528+ this command: "python frogger.py"
1529+
1530+There are installers and binaries available at http://launchpad.net/frogger
1531+
1532+LICENSE:
1533+Frog Game is licensed under the GNU General Public License v3. More details can be found
1534+in the LICENSE file. If you did not receive a LICENSE file, you can find more information
1535+at the Free Software Foundations website: http://www.gnu.org/licenses/gpl-3.0.txt
1536+
1537+CONTRIBUTING:
1538+You can help the project in many ways through either submitting art, feature requests, fixing bugs
1539+and so on. Please see our launchpad project page: https://launchpad.net/frogger and contact
1540+daniel.bell@saraclan.com
1541+
1542+SUPPORT:
1543+If you come across any issues or abnormalities with Frog Game support is available on our
1544+launchpad page: https://launchpad.net/frogger on our launchpad page you can file bugs and
1545+ask questions.
1546+
1547+Please don't hesitate to report bugs or ask questions on even the most trivial of issues.
1548
1549=== removed file 'Frogger/data/fonts/bgrovealtb.ttf'
1550Binary files Frogger/data/fonts/bgrovealtb.ttf 2010-01-25 14:59:15 +0000 and Frogger/data/fonts/bgrovealtb.ttf 1970-01-01 00:00:00 +0000 differ
1551=== added file 'Frogger/data/fonts/nibby.ttf'
1552Binary files Frogger/data/fonts/nibby.ttf 1970-01-01 00:00:00 +0000 and Frogger/data/fonts/nibby.ttf 2010-03-12 10:44:17 +0000 differ
1553=== added file 'Frogger/data/frog-game.desktop'
1554--- Frogger/data/frog-game.desktop 1970-01-01 00:00:00 +0000
1555+++ Frogger/data/frog-game.desktop 2010-03-12 10:44:17 +0000
1556@@ -0,0 +1,10 @@
1557+#!/usr/bin/env xdg-open
1558+
1559+[Desktop Entry]
1560+Name=Frog Game
1561+Comment=Fun survival/rescue game!
1562+Exec=frogger
1563+Icon=frog-game
1564+Terminal=false
1565+Type=Application
1566+Categories=Game;ArcadeGame;
1567
1568=== added directory 'Frogger/data/icons'
1569=== added directory 'Frogger/data/icons/16x16'
1570=== added file 'Frogger/data/icons/16x16/frog-game.png'
1571Binary files Frogger/data/icons/16x16/frog-game.png 1970-01-01 00:00:00 +0000 and Frogger/data/icons/16x16/frog-game.png 2010-03-12 10:44:17 +0000 differ
1572=== added directory 'Frogger/data/icons/22x22'
1573=== added file 'Frogger/data/icons/22x22/frog-game.png'
1574Binary files Frogger/data/icons/22x22/frog-game.png 1970-01-01 00:00:00 +0000 and Frogger/data/icons/22x22/frog-game.png 2010-03-12 10:44:17 +0000 differ
1575=== added directory 'Frogger/data/icons/24x24'
1576=== added file 'Frogger/data/icons/24x24/frog-game.png'
1577Binary files Frogger/data/icons/24x24/frog-game.png 1970-01-01 00:00:00 +0000 and Frogger/data/icons/24x24/frog-game.png 2010-03-12 10:44:17 +0000 differ
1578=== added directory 'Frogger/data/icons/48x48'
1579=== added file 'Frogger/data/icons/48x48/frog-game.png'
1580Binary files Frogger/data/icons/48x48/frog-game.png 1970-01-01 00:00:00 +0000 and Frogger/data/icons/48x48/frog-game.png 2010-03-12 10:44:17 +0000 differ
1581=== added file 'Frogger/data/icons/frog-game.icns'
1582Binary files Frogger/data/icons/frog-game.icns 1970-01-01 00:00:00 +0000 and Frogger/data/icons/frog-game.icns 2010-03-12 10:44:17 +0000 differ
1583=== added file 'Frogger/data/icons/frog-game.ico'
1584Binary files Frogger/data/icons/frog-game.ico 1970-01-01 00:00:00 +0000 and Frogger/data/icons/frog-game.ico 2010-03-12 10:44:17 +0000 differ
1585=== added directory 'Frogger/data/icons/scalable'
1586=== added file 'Frogger/data/icons/scalable/frog-game.svg'
1587--- Frogger/data/icons/scalable/frog-game.svg 1970-01-01 00:00:00 +0000
1588+++ Frogger/data/icons/scalable/frog-game.svg 2010-03-12 10:44:17 +0000
1589@@ -0,0 +1,68 @@
1590+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
1591+<!-- Created with Inkscape (http://www.inkscape.org/) -->
1592+
1593+<svg
1594+ xmlns:dc="http://purl.org/dc/elements/1.1/"
1595+ xmlns:cc="http://creativecommons.org/ns#"
1596+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
1597+ xmlns:svg="http://www.w3.org/2000/svg"
1598+ xmlns="http://www.w3.org/2000/svg"
1599+ xmlns:xlink="http://www.w3.org/1999/xlink"
1600+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
1601+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
1602+ id="svg2"
1603+ version="1.1"
1604+ inkscape:version="0.47 r22583"
1605+ width="20"
1606+ height="17"
1607+ sodipodi:docname="life.gif">
1608+ <metadata
1609+ id="metadata8">
1610+ <rdf:RDF>
1611+ <cc:Work
1612+ rdf:about="">
1613+ <dc:format>image/svg+xml</dc:format>
1614+ <dc:type
1615+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
1616+ <dc:title></dc:title>
1617+ </cc:Work>
1618+ </rdf:RDF>
1619+ </metadata>
1620+ <defs
1621+ id="defs6">
1622+ <inkscape:perspective
1623+ sodipodi:type="inkscape:persp3d"
1624+ inkscape:vp_x="0 : 0.5 : 1"
1625+ inkscape:vp_y="0 : 1000 : 0"
1626+ inkscape:vp_z="1 : 0.5 : 1"
1627+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
1628+ id="perspective10" />
1629+ </defs>
1630+ <sodipodi:namedview
1631+ pagecolor="#ffffff"
1632+ bordercolor="#666666"
1633+ borderopacity="1"
1634+ objecttolerance="10"
1635+ gridtolerance="10"
1636+ guidetolerance="10"
1637+ inkscape:pageopacity="0"
1638+ inkscape:pageshadow="2"
1639+ inkscape:window-width="640"
1640+ inkscape:window-height="487"
1641+ id="namedview4"
1642+ showgrid="false"
1643+ inkscape:zoom="13.882353"
1644+ inkscape:cx="10"
1645+ inkscape:cy="8.5"
1646+ inkscape:window-x="0"
1647+ inkscape:window-y="25"
1648+ inkscape:window-maximized="0"
1649+ inkscape:current-layer="svg2" />
1650+ <image
1651+ xlink:href="file:///home/dbell/Documents/frog-game-0.2.0/life.gif"
1652+ width="20"
1653+ height="17"
1654+ id="image12"
1655+ x="0"
1656+ y="0" />
1657+</svg>
1658
1659=== modified file 'Frogger/data/images/background.png' (properties changed: +x to -x)
1660Binary files Frogger/data/images/background.png 2010-01-27 18:36:42 +0000 and Frogger/data/images/background.png 2010-03-12 10:44:17 +0000 differ
1661=== modified file 'Frogger/data/images/betterfrog.gif'
1662Binary files Frogger/data/images/betterfrog.gif 2010-01-28 16:09:09 +0000 and Frogger/data/images/betterfrog.gif 2010-03-12 10:44:17 +0000 differ
1663=== added file 'Frogger/data/images/frogcarry.gif'
1664Binary files Frogger/data/images/frogcarry.gif 1970-01-01 00:00:00 +0000 and Frogger/data/images/frogcarry.gif 2010-03-12 10:44:17 +0000 differ
1665=== modified file 'Frogger/data/images/log.gif'
1666Binary files Frogger/data/images/log.gif 2010-01-28 16:09:09 +0000 and Frogger/data/images/log.gif 2010-03-12 10:44:17 +0000 differ
1667=== added file 'Frogger/frogger'
1668--- Frogger/frogger 1970-01-01 00:00:00 +0000
1669+++ Frogger/frogger 2010-03-12 10:44:17 +0000
1670@@ -0,0 +1,561 @@
1671+#!/usr/bin/env python
1672+
1673+###BEGIN LICENSE
1674+# Copyright (C) 2010 Daniel Bell <daniel.bell@saraclan.com>
1675+#
1676+#This program is free software: you can redistribute it and/or modify it
1677+#under the terms of the GNU General Public License version 3, as published
1678+#by the Free Software Foundation.
1679+#
1680+#This program is distributed in the hope that it will be useful, but
1681+#WITHOUT ANY WARRANTY; without even the implied warranties of
1682+#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
1683+#PURPOSE. See the GNU General Public License for more details.
1684+#
1685+#You should have received a copy of the GNU General Public License along
1686+#with this program. If not, see <http://www.gnu.org/licenses/>.
1687+### END LICENSE
1688+
1689+import os
1690+import pygame
1691+from pygame.locals import *
1692+import sys
1693+import time
1694+
1695+from lib.sprites import (Leftcar, Rightcar, Homefrog, Log, Life, Frog)
1696+from lib.engine import *
1697+
1698+#Declare global variables:
1699+global screen
1700+global resolution #,display_flag, color_depth
1701+global caption, logo
1702+global clock
1703+global level, speed
1704+global font
1705+
1706+resolution = (800,600)
1707+#display_flag = DOUBLEBUF
1708+#color_depth = 32
1709+caption = "Frog Game"
1710+logo = "data/images/life.gif"
1711+
1712+clock = pygame.time.Clock()
1713+
1714+level = 1
1715+
1716+#Travel speed - logs and cars.
1717+#Unit is pixels? Remember game runs at 30 fps, so each second unit travels speed*30
1718+speed = 4
1719+
1720+#Initialize pygame, and setup the screen, captions and logo.
1721+#TODO: Find out if logo actually works in binaries.
1722+pygame.init()
1723+pygame.display.set_caption(caption)
1724+pygame.display.set_icon(pygame.image.load(logo))
1725+#No longer specifying flag and depth, not required
1726+#and could restrict the portability of the game by limiting devices.
1727+screen = pygame.display.set_mode(resolution)
1728+
1729+def main():
1730+ """Main function - handles logic to act out the game.
1731+ Calls menu() to display the game menu
1732+ """
1733+ #Call menu() to display menu to allow game to be played.
1734+ menu()
1735+
1736+def instructions():
1737+ """ Instruction Screen: call this when you want to display how to play the game
1738+ """
1739+ screen = pygame.display.set_mode(resolution)
1740+
1741+ #Print text to the screen.
1742+ font_write("INSTRUCTIONS", 72, True, (0, 0, 255), 0, (150, 100), screen)
1743+
1744+ font_write("The objectives of Frog Game are to rescue the lost baby frogs and to get them home safe!", 14, True, (0, 0, 255), 0, (80, 180), screen)
1745+
1746+ font_write("As a player you control the Big Frog and it is your job to collect", 18, True, (0, 0, 255), 0, (110, 220), screen)
1747+ font_write("the frogs one at a time and bring them back to the start. Avoiding", 18, True, (0, 0, 255), 0, (110, 240), screen)
1748+ font_write("the obstacles and hazards on the way is essential for maximum point", 18, True, (0, 0, 255), 0, (110, 260), screen)
1749+ font_write("scoring as when you die the frog you were rescuing dies also.", 18, True, (0, 0, 255), 0, (110, 280), screen)
1750+
1751+ font_write("The scoring system takes into account how fast it took you to", 18, True, (0, 0, 255), 0, (110, 320), screen)
1752+ font_write("rescue the baby frog and your past deaths (if any).", 18, True, (0, 0, 255), 0, (110, 340), screen)
1753+
1754+ font_write("A new level begins when there are no baby frogs left to save", 18, True, (0, 0, 255), 0, (110, 380), screen)
1755+ font_write("and you have at least 1 life still remaining.", 18, True, (0, 0, 255), 0, (110, 400), screen)
1756+
1757+ font_write("Press <SPACE> to return to Menu", 24, True, (0, 0, 255), 0, (200, 500), screen)
1758+ font_write("ESC to exit", 18, True, (0, 0, 255), 0, (0, 0), screen)
1759+
1760+ pygame.display.flip() #update display - just once not in loop.
1761+ #Main loop:
1762+ while 1:
1763+ #Were looking for certain events only within the game over menu.
1764+ #ESC or mouse-clicking the 'X' to exit the game
1765+ #SPACEBAR to start a new game.
1766+ for event in pygame.event.get():
1767+ if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
1768+ sys.exit()
1769+ if event.type == KEYDOWN and event.key == K_SPACE:
1770+ menu()
1771+
1772+ #We need to ensure game is limited to 30FPS in order to control CPU
1773+ clock.tick(30)
1774+
1775+def game_over_screen(score):
1776+ """ This method is called when you wish to display the Game Over Screen.
1777+ Clears the screen and prints data about the past game: score, level
1778+ and a way to exit or start a new game.
1779+
1780+ :param score: The score the player achieved before Game Over.
1781+ :type score: ``int``
1782+ :param level: The level the player achieved.
1783+ :type level: ``int``
1784+ """
1785+
1786+ #Clear the screen so that it can be printed on.
1787+ screen = pygame.display.set_mode(resolution)
1788+
1789+ #Print text to the screen.
1790+ font_write("GAME OVER", 72, True, (0, 0, 255), 0, (210, 100), screen)
1791+ font_write("You Scored " + str(score) + " points!", 28, True, (0, 0, 255), 0, (230, 180), screen)
1792+ font_write("Highest level achieved: " + str(level), 28, True, (0, 0, 255), 0, (230, 210), screen)
1793+ font_write("Press <SPACE> to Start a New Game", 24, True, (0, 0, 255), 0, (200, 500), screen)
1794+ font_write("ESC to exit", 18, True, (0, 0, 255), 0, (0, 0), screen)
1795+
1796+ pygame.display.flip() #update display - just once not in loop.
1797+ #Main loop:
1798+ while 1:
1799+ #Were looking for certain events only within the game over menu.
1800+ #ESC or mouse-clicking the 'X' to exit the game
1801+ #SPACEBAR to start a new game.
1802+ for event in pygame.event.get():
1803+ if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
1804+ sys.exit()
1805+ if event.type == KEYDOWN and event.key == K_SPACE:
1806+ game()
1807+
1808+ #We need to ensure game is limited to 30FPS in order to control CPU
1809+ clock.tick(30)
1810+
1811+def menu():
1812+ """ This method is called when you wish to display the STARTUP menu.
1813+ This menu is the entry point to the game, it contains logic that
1814+ allows the player to play the game, exit (and so on).
1815+ """
1816+ #Clear screen.
1817+ screen = pygame.display.set_mode(resolution)
1818+
1819+ #Print text to screen.
1820+ font_write("FROG GAME", 72, True, (0, 0, 255), 0, (210, 200), screen)
1821+ font_write("Welcome To", 32, True, (0, 0, 255), 0, (305, 175), screen)
1822+ font_write("Press <I> for Instructions", 24, True, (0, 0, 255), 0, (240, 480), screen)
1823+ font_write("Press <SPACE> to Continue", 24, True, (0, 0, 255), 0, (247, 500), screen)
1824+ font_write("ESC to exit", 18, True, (0, 0, 255), 0, (0, 0), screen)
1825+
1826+ pygame.display.flip()
1827+ #Main loop:
1828+ while 1:
1829+ for event in pygame.event.get():
1830+ if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
1831+ sys.exit()
1832+ if event.type == KEYDOWN and event.key == K_SPACE:
1833+ game()
1834+ if event.type ==KEYDOWN and event.key == K_i:
1835+ instructions()
1836+
1837+ clock.tick(30)
1838+
1839+def game():
1840+ #starting game needs to be on level 1.
1841+ global level, speed
1842+ level =1
1843+ speed = 4
1844+ """ This method contains all the logic for the actual game.
1845+ This is to be called when the player wants to play the game.
1846+ """
1847+ #Clear screen.
1848+ screen = pygame.display.set_mode(resolution)
1849+
1850+ #Setup the background.
1851+ backgroundImage = 'data/images/background.png'
1852+ background = pygame.image.load(backgroundImage).convert()
1853+ screen.blit(background, (0,0))
1854+ pygame.display.update()
1855+
1856+ #Create player character.
1857+ player = Frog()
1858+
1859+ #Create the cars that travel in the left direction.
1860+ leftcars = [
1861+ Leftcar(0, 285),
1862+ Leftcar(280, 285),
1863+ Leftcar(560, 285),
1864+ Leftcar(100, 375),
1865+ Leftcar(380, 375),
1866+ Leftcar(660, 375),
1867+ ]
1868+ #Create the cars that travel right direction.
1869+ rightcars = [
1870+ Rightcar(200, 330),
1871+ Rightcar(480, 330),
1872+ Rightcar(760, 330),
1873+ Rightcar(60, 420),
1874+ Rightcar(300, 420),
1875+ Rightcar(580, 420),
1876+ ]
1877+ #Create babyfrogs
1878+ babyfrogs = [
1879+ Homefrog(30, 15),
1880+ Homefrog(258,15),
1881+ Homefrog(482,15),
1882+ Homefrog(720,15),
1883+ ]
1884+ #Create logs that travel left.
1885+ leftlogs = [
1886+ Log(0, 60),
1887+ Log(234, 60),
1888+ Log(468, 60),
1889+ Log(702, 60),
1890+ Log(0, 150),
1891+ Log(234, 150),
1892+ Log(468, 150),
1893+ Log(702, 150),
1894+ ]
1895+ #Create logs that travel right.
1896+ rightlogs = [
1897+ Log(0, 105),
1898+ Log(234, 105),
1899+ Log(468, 105),
1900+ Log(702, 105),
1901+ Log(0, 195),
1902+ Log(234, 195),
1903+ Log(468, 195),
1904+ Log(702, 195),
1905+ ]
1906+ #Create life images.
1907+ lives = [
1908+ Life(10, 570),
1909+ Life(38, 570),
1910+ Life(66, 570),
1911+ ]
1912+
1913+ #Create sprite group - all.
1914+ #Using pygame.sprite.OirderedUpdates instead of RenderedUpdates
1915+ #There is a small performance decrease for using this, but required
1916+ #to allow frogs to be on top of logs.
1917+ all = pygame.sprite.OrderedUpdates(
1918+ leftlogs, rightlogs, player, leftcars, rightcars, babyfrogs, lives)
1919+
1920+ #Print level, and score/information on screen.
1921+ font_write("Level: " +str(level) + " ", 34, True, (0, 0, 255), (0, 0, 0), (3, 510), screen)
1922+ print_score_data(player.score, player.perfect_score, player.good_score)
1923+
1924+ pygame.key.set_repeat(100)
1925+ #Main loop: (GAME LOOP).
1926+ while 1:
1927+
1928+ #Get input
1929+ for event in pygame.event.get():
1930+ if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
1931+ sys.exit()
1932+ #Only allow player movement if game is not over - not tech required:
1933+ #as when its game over a new screen is displayed.
1934+ #For each movement - reset on_left_log and on_right_log to False
1935+ #so that there is never a way you could have some ghost movement of the player.
1936+ if player.game_over != True:
1937+ if event.type == KEYDOWN and event.key == K_UP:
1938+ player.rect.top -= 45
1939+ player.on_left_log = False
1940+ player.on_right_log = False
1941+ for frog in babyfrogs:
1942+ if frog.rect.colliderect(player.rect) and player.collecting ==True:
1943+ player.rect.top +=45
1944+ if event.type == KEYDOWN and event.key == K_DOWN:
1945+ player.rect.top += 45
1946+ player.on_left_log = False
1947+ player.on_right_log = False
1948+ for frog in babyfrogs:
1949+ if frog.rect.colliderect(player.rect) and player.collecting ==True:
1950+ player.rect.top -=45
1951+ if event.type == KEYDOWN and event.key == K_LEFT:
1952+ player.rect.left -= 20
1953+ player.on_left_log = False
1954+ player.on_right_log = False
1955+ for frog in babyfrogs:
1956+ if frog.rect.colliderect(player.rect) and player.collecting ==True:
1957+ player.rect.left +=20
1958+ if event.type == KEYDOWN and event.key == K_RIGHT:
1959+ player.rect.left += 20
1960+ player.on_left_log = False
1961+ player.on_right_log = False
1962+ for frog in babyfrogs:
1963+ if frog.rect.colliderect(player.rect) and player.collecting ==True:
1964+ player.rect.left -=20
1965+
1966+ #move objects
1967+
1968+ #Move the left cars:
1969+ for car in leftcars:
1970+ if car.rect.right <=0:
1971+ car.rect.left = 800
1972+ else:
1973+ car.rect.left -= speed
1974+ #Die if they collide
1975+ if car.rect.colliderect(player.rect):
1976+ player_died(player, babyfrogs)
1977+ print_score_data(player.score, player.perfect_score, player.good_score)
1978+
1979+ #Move the right cars:
1980+ for car in rightcars:
1981+ if car.rect.left >=800:
1982+ car.rect.right = 0
1983+ else:
1984+ car.rect.left += speed
1985+ #player dies if they collide
1986+ if car.rect.colliderect(player.rect):
1987+ player_died(player, babyfrogs)
1988+ print_score_data(player.score, player.perfect_score, player.good_score)
1989+
1990+ #Move the left logs:
1991+ for log in leftlogs:
1992+ if log.rect.right <=0:
1993+ log.rect.left = 800
1994+ else:
1995+ log.rect.left -=speed
1996+ #if log collides, set player variable on_left_log to True.
1997+ if log.rect.colliderect(player.rect):
1998+ player.on_left_log = True
1999+
2000+ #Move the right logs:
2001+ for log in rightlogs:
2002+ if log.rect.left >=800:
2003+ log.rect.right = 0
2004+ else:
2005+ log.rect.left +=speed
2006+ #If right logs collides with frog, set player variable on_right_log to True.
2007+ if log.rect.colliderect(player.rect):
2008+ player.on_right_log = True
2009+
2010+ #Check if the player picks up a frog:
2011+ #Set player variables: collecting to True, and collecting_number to babyfrog picked up.
2012+ #Hide the frog from view.
2013+ for frog in range(len(babyfrogs)):
2014+ if babyfrogs[frog].rect.colliderect(player.rect):
2015+ if player.collecting == False:
2016+ player.collecting = True
2017+ player.collecting_number = frog
2018+ babyfrogs[frog].collected = True
2019+ babyfrogs[frog].rect.left = -100
2020+ babyfrogs[frog].rect.top = -100
2021+ player.carry_frog(player.rect.left, player.rect.top)
2022+
2023+ #Water Area: if the frog is in between these positions
2024+ #the frog must be on a log to survive.
2025+ #if frog is on a log, then the system needs to automate the movement.
2026+ if player.rect.top <=195 and player.rect.top >=40:
2027+ if player.on_left_log == True:
2028+ player.rect.left -=speed
2029+ elif player.on_right_log == True:
2030+ player.rect.left +=speed
2031+ #Not on a log: die and update.
2032+ else:
2033+ player_died(player, babyfrogs)
2034+ print_score_data(player.score, player.perfect_score, player.good_score)
2035+
2036+ #When its game over - display a game over screen.
2037+ if player.game_over:
2038+ game_over_screen(player.score)
2039+
2040+ #Handle the positioning of life icons.
2041+ if player.lives == 2:
2042+ lives[2].rect.left = -50
2043+ if player.lives == 1:
2044+ lives[1].rect.left = -50
2045+
2046+ #If all babyfrogs are saved, then start a new level :)
2047+ if babyfrogs[0].saved == True:
2048+ if babyfrogs[1].saved == True:
2049+ if babyfrogs[2].saved == True:
2050+ if babyfrogs[3].saved == True:
2051+ new_level(player, babyfrogs, lives)
2052+
2053+
2054+ #Clear sprite
2055+ all.clear(screen, background)
2056+
2057+ #Update sprites
2058+ all.update()
2059+ player_boundaries(player, babyfrogs)
2060+
2061+ #Redraw sprites
2062+ all.draw(screen)
2063+ pygame.display.flip()
2064+
2065+ #Maintain frame rate
2066+ #using 30 FPS
2067+ clock.tick(30)
2068+
2069+def print_score_data(score, perfect, good, time=None):
2070+ """This method is used to print Score details to the screen.
2071+ It prints score and the current score modifier.
2072+ :param score: The players score
2073+ :param type: ``int``
2074+ :param perfect: value of players perfectScore
2075+ :param type: ``boolean``
2076+ :param good: value of players goodScore
2077+ :param type: ``boolean``
2078+ :param time: time taken to score
2079+ :param type: ``int``
2080+ """
2081+ #Print to screen.
2082+ font_write("Score: " +str(score) + " ", 28, True, (0, 0, 255), (0, 0, 0), (3, 540), screen)
2083+ if perfect:
2084+ font_write("Score Modifier: x3 ", 28, True, (0, 0, 255), (0, 0, 0), (535, 510), screen)
2085+ elif good:
2086+ font_write("Score Modifier: x2 ", 28, True, (0, 0, 255), (0, 0, 0), (535, 510), screen)
2087+ else:
2088+ font_write("Score Modifier: x1 ", 28, True, (0, 0, 255), (0, 0, 0), (535, 510), screen)
2089+ if time!=None:
2090+ font_write(
2091+ "Last Frog saved in: " +str(time) + " seconds! ", 28, True, (0, 0, 255),
2092+ (0, 0, 0), (380, 550), screen)
2093+
2094+def player_died(player, babyfrogs):
2095+ """This method should be called if when the player died and acts out everything that is
2096+ required to happen when a player dies: loosing of lives, ensuring babyfrog goes back correctly
2097+ and so on.
2098+ :param player: The player
2099+ :param type: ``Frog`` - send through an instance of Frog Class.
2100+ :param babyfrogs: The babyfrogs
2101+ :param type: ``Homefrog`` - send through an instance of Homefrog Class.
2102+ """
2103+ #Reset timer
2104+ player.startTime = time.time()
2105+ #if we die, then the frog we hold needs to be reset.
2106+ babyfrog_reset(babyfrogs, player.collecting_number)
2107+ #Reset some player variables.
2108+ player.good_score = False
2109+ player.perfect_score = False
2110+ player.on_left_log = False
2111+ player.on_right_log = False
2112+ player.collecting = False
2113+ player.collecting_number = None
2114+ player.not_carry_frog(player.rect.left, player.rect.top)
2115+ #Reset player position.
2116+ player.rect.left = player.starting_left
2117+ player.rect.top = player.starting_top
2118+ #Remove one from life.
2119+ player.lives -= 1
2120+ if player.lives <= 0:
2121+ player.game_over = True
2122+
2123+def player_boundaries(player, babyfrogs):
2124+ """This method should be called when you want to ensure frog is within boundaries
2125+ :param player: The player.
2126+ :param type: ``Frog`` - send through an instance of Frog Class
2127+ :param babyfrogs: The babyfrogs.
2128+ :param type: ``Homefrog`` - send through an instance of Homefrog Class
2129+ """
2130+ #If not on any logs:
2131+ if player.on_left_log != True and player.on_right_log != True:
2132+ if player.rect.top >=510:
2133+ player.rect.top -=45
2134+ if player.rect.top <=0:
2135+ player.rect.top +=45
2136+ if player.rect.left <=0:
2137+ player.rect.left +=20
2138+ if player.rect.right >=800:
2139+ player.rect.left -=20
2140+ #this is home spot - so check if we should score.
2141+ if player.rect.top ==465:
2142+ player_scored(player, babyfrogs)
2143+ #If were on a log boundaries and handled differently.
2144+ else:
2145+ if player.rect.right <=0:
2146+ player_died(player, babyfrogs)
2147+ if player.rect.left >=800:
2148+ player_died(player, babyfrogs)
2149+
2150+def babyfrog_reset(babyfrog, collecting_number):
2151+ """ This method should be called when you want to reset the position of the babyfrog specified
2152+ it sets the saved variable of a babyfrog in the list to true, the frog that is reset depends
2153+ on what is send through.
2154+ :param babyfrogs: The babyfrogs.
2155+ :param type: ``Homefrog`` - send through an instance of Homefrog Class
2156+ :param collecting_number: The babyfrog you want to reset.
2157+ :param type: ``int``
2158+ """
2159+ #Make sure the frog we are trying to reset has a number (error prevention)
2160+ #Use the default left, top that were assigned on creation to reset position
2161+ if collecting_number!=None:
2162+ #babyfrog[collecting_number].rect.left = babyfrog[collecting_number].left
2163+ #babyfrog[collecting_number].rect.top = babyfrog[collecting_number].top
2164+ #now just sets saved to true, so frog can no longer be captured.It dies with big frog.
2165+ babyfrog[collecting_number].saved = True
2166+def player_scored(player, babyfrogs):
2167+ """ This method should be called when the player has scored.
2168+ It acts out things required when a player scores.
2169+ :param player: The player.
2170+ :param type: ``Frog`` - send through an instance of Frog Class
2171+ :param babyfrogs: The babyfrogs.
2172+ :param type: ``Homefrog`` - send through an instance of Homefrog Class
2173+ """
2174+ #Since we can start at the scoring position, we only want to act out this
2175+ #if we are collecting a frog, (and as error prevention so we cannot attempt to score when
2176+ #list is "None" make sure there is a value in collecting_number.
2177+ #Reset player variables: collecting, collecting_number
2178+ #Set babyfrogs variables: saved - True (we've just saved frog)
2179+ #Add score and print.
2180+ if player.collecting == True and player.collecting_number !=None:
2181+ player.collecting = False
2182+ babyfrogs[player.collecting_number].saved = True
2183+ babyfrogs[player.collecting_number].collected = False
2184+ player.collecting_number = None
2185+ player.not_carry_frog(player.rect.left, player.rect.top)
2186+ player.add_score()
2187+ print_score_data(player.score, player.perfect_score, player.good_score, player.end_time)
2188+
2189+def new_level(player, babyfrogs, lives):
2190+ """ This method should be called when you want a new level to begin.
2191+ It resets the game so that a new level can begin - and then increments level and speed.
2192+ :param player: The player
2193+ :param type: ``Frog`` - send through an instance of Frog Class.
2194+ :param babyfrogs: The babyfrogs
2195+ :param type: ``Homefrog`` - send through an instance of Homefrog Class.
2196+ """
2197+ global level, speed
2198+ level +=1 #add 1 to level
2199+ speed +=1 #add 1 to speed
2200+ #Reset position of frog.
2201+ player.rect.left = player.starting_left
2202+ player.rect.top = player.starting_top
2203+ #Reset position of babyfrogs, and reset collected, saved variables.
2204+ for frog in babyfrogs:
2205+ frog.collected = False
2206+ frog.saved = False
2207+ frog.rect.left = frog.left
2208+ frog.rect.top = frog.top
2209+ #Before we add lives check if we have 3: Remember if you have three lives when you complete
2210+ #a level you get a good_score = true.
2211+ if player.lives ==3:
2212+ player.good_score = True
2213+ else:
2214+ player_add_life(player, lives)
2215+ #reprint stuff to screen.
2216+ font_write("Level: " +str(level) + " ", 34, True, (0, 0, 255), (0, 0, 0), (3, 510), screen)
2217+ print_score_data(player.score, player.perfect_score, player.good_score, player.end_time)
2218+
2219+def player_add_life(player, lives):
2220+ """ This method to be called when you wish to add a life to the player.
2221+ Handles the life images and so forth.
2222+ """
2223+ #revalidates that player doesn't already have 3 lifes: 3 is max.
2224+ if player.lives <3:
2225+ player.lives +=1
2226+ if player.lives==3:
2227+ lives[2].rect.left = 68
2228+ if player.lives==2:
2229+ lives[1].rect.left = 38
2230+
2231+if __name__ == '__main__': main()
2232
2233=== removed file 'Frogger/frogger.py'
2234--- Frogger/frogger.py 2010-02-09 19:44:03 +0000
2235+++ Frogger/frogger.py 1970-01-01 00:00:00 +0000
2236@@ -1,356 +0,0 @@
2237-#!/usr/bin/env python
2238-"""
2239-Frog Game (C) Daniel Bell, 2010.
2240-Frog Game is released under the General Public License Version 3. See LICENSE for details.
2241-Frog Game is a fun survival game, that is based upon the classic arcade game: Frogger.
2242-"""
2243-try:
2244- import sys
2245- import os
2246- import pygame
2247- import time
2248- from pygame.locals import *
2249- from sprites import *
2250-except ImportError, err:
2251- print "Failure loading module. %s" % (err)
2252- sys.exit(2)
2253-
2254-"""
2255-Image Loading Function
2256-"""
2257-global screen
2258-screen = pygame.display.set_mode((592,774), DOUBLEBUF, 32)
2259-
2260-def levelIndicator(level):
2261- fontNormal = pygame.font.Font('data/fonts/bgrovealtb.ttf', 28)
2262- levelText = fontNormal.render("Level: " + str(level), True, (0, 0, 255), (181, 230, 29))
2263- screen.blit(levelText, (250, 15))
2264- pygame.display.update()
2265-
2266-def scoreIndicator(score, time, perfect, good):
2267- fontNormal = pygame.font.Font('data/fonts/bgrovealtb.ttf', 18)
2268- scoreText = fontNormal.render("Score: " + str(score), True, (0, 0, 255), (0, 0, 0))
2269- if time != 0:
2270- scoreTime = fontNormal.render("Last Frog Scored in: " + str(time) + " seconds!", True, (0, 0, 255), (0, 0, 0))
2271- screen.blit(scoreTime, (300, 745))
2272-
2273- if perfect == True:
2274- modifier = fontNormal.render("Score Modifier: (x3)", True, (0, 0, 255), (0, 0, 0))
2275- screen.blit(modifier, (422, 715))
2276-
2277- elif good == True and perfect == False:
2278- modifier = fontNormal.render("Score Modifier: (x2)", True, (0, 0, 255), (0, 0, 0))
2279- screen.blit(modifier, (422, 715))
2280-
2281- else:
2282- modifier = fontNormal.render("Score Modifier: (x1)", True, (0, 0, 255), (0, 0, 0))
2283- screen.blit(modifier, (422, 715))
2284-
2285- screen.blit(scoreText, (5, 745))
2286- pygame.display.update()
2287-
2288-def gameOverScreen(score, level):
2289- pygame.init()
2290- pygame.display.set_caption('Frog Game')
2291- logo = pygame.image.load("data/images/logo.png")
2292- pygame.display.set_icon(logo)
2293-
2294- screen = pygame.display.set_mode((592,774), DOUBLEBUF, 32)
2295-
2296- pygame.display.update()
2297-
2298- """
2299- Menu
2300- """
2301- fontTitle = pygame.font.Font('data/fonts/bgrovealtb.ttf', 72)
2302- fontNormal = pygame.font.Font('data/fonts/bgrovealtb.ttf', 28)
2303- fontExit = pygame.font.Font('data/fonts/bgrovealtb.ttf', 18)
2304-
2305- title = fontTitle.render("GAME OVER", True, (0, 0, 255))
2306- caption = fontNormal.render("You Scored: " + str(score), True, (0, 0, 255))
2307- caption2 = fontNormal.render("Level: " + str(level), True, (0, 0, 255))
2308- play = fontNormal.render("Press <SPACE> to Start a New Game", True, (0, 0, 255))
2309- esc = fontExit.render("ESC to exit", True, (0, 0, 255))
2310-
2311- screen.blit(caption, (150, 160))
2312- screen.blit(caption2, (150, 200))
2313- screen.blit(title, (100,50))
2314- screen.blit(esc, (0, 0))
2315- screen.blit(play, (60, 700))
2316- pygame.display.update()
2317- clock = pygame.time.Clock()
2318- while 1:
2319-
2320- #Get input
2321- for event in pygame.event.get():
2322- if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
2323- sys.exit()
2324- if event.type == KEYDOWN and event.key == K_SPACE:
2325- game()
2326- #using 30 FPS
2327- clock.tick(30)
2328-def main():
2329- pygame.init()
2330- pygame.display.set_caption('Frog Game')
2331- logo = pygame.image.load("data/images/logo.png")
2332- pygame.display.set_icon(logo)
2333-
2334- screen = pygame.display.set_mode((592,774), DOUBLEBUF, 32)
2335-
2336- pygame.display.update()
2337-
2338- """
2339- Menu
2340- """
2341- fontTitle = pygame.font.Font('data/fonts/bgrovealtb.ttf', 72)
2342- fontNormal = pygame.font.Font('data/fonts/bgrovealtb.ttf', 28)
2343- fontExit = pygame.font.Font('data/fonts/bgrovealtb.ttf', 18)
2344-
2345- title = fontTitle.render("FROG GAME", True, (0, 0, 255))
2346- caption = fontNormal.render("Welcome To", True, (0, 0, 255))
2347- play = fontNormal.render("Press <SPACE> to Continue", True, (0, 0, 255))
2348- esc = fontExit.render("ESC to exit", True, (0, 0, 255))
2349-
2350- screen.blit(caption, (220, 175))
2351- screen.blit(title, (100,200))
2352- screen.blit(esc, (0, 0))
2353- screen.blit(play, (120, 700))
2354- pygame.display.update()
2355-
2356- clock = pygame.time.Clock()
2357- while 1:
2358-
2359- #Get input
2360- for event in pygame.event.get():
2361- if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
2362- sys.exit()
2363- if event.type == KEYDOWN and event.key == K_SPACE:
2364- game()
2365- #using 30 FPS
2366- clock.tick(30)
2367-def game():
2368-
2369- #Initialise pygame, icons and captions.
2370- pygame.init()
2371- pygame.display.set_caption('Frog Game')
2372- logo = pygame.image.load("data/images/logo.png")
2373- pygame.display.set_icon(logo)
2374-
2375- #Initialise the screen, resolution: 592x774 (which is the size of the current background).
2376- #TODO: Make the screen size smaller by default, or allow scrolling to occur in the game.
2377-
2378- screen = pygame.display.set_mode((592,774), DOUBLEBUF, 32)
2379-
2380- #Make background
2381- backgroundImage = 'data/images/background.png'
2382- background = pygame.image.load(backgroundImage).convert()
2383- screen.blit(background, (0,0))
2384- pygame.display.update()
2385-
2386-
2387- #Keep track of sprites
2388- player = Frog()
2389- leftcars = []
2390- """
2391- 0 & 1 = Row 1, 2 & 3 = Row 3, 4 & 5 = Row 5
2392- """
2393- leftcars.append(Leftcar(400, 616)) # 0
2394- leftcars.append(Leftcar(100, 616)) # 1
2395- leftcars.append(Leftcar(400, 526)) # 2
2396- leftcars.append(Leftcar(100, 526)) # 3
2397- leftcars.append(Leftcar(400, 436)) # 4
2398- leftcars.append(Leftcar(100, 436)) # 5
2399-
2400- rightcars = []
2401- """
2402- 0 & 1 = Row 1, 2 & 3 = Row 3, 4 & 5 = Row 5
2403- """
2404- rightcars.append(Rightcar(200, 571)) # 0
2405- rightcars.append(Rightcar(500, 571)) # 1
2406- rightcars.append(Rightcar(200, 481)) # 2
2407- rightcars.append(Rightcar(500, 481)) # 3
2408- rightcars.append(Rightcar(200, 391)) # 4
2409- rightcars.append(Rightcar(500, 391)) # 5
2410-
2411- homefrogs = [Homefrog(-10,-10), Homefrog(-10,-10), Homefrog(-10,-10), Homefrog(-10,-10), Homefrog(-10,-10)]
2412-
2413- leftlogs = [Log(20, 301), Log(220, 301), Log(420,301), Log(20, 211), Log(220, 211), Log(420, 211), Log(20, 121), Log(220, 121), Log(420, 121)]
2414- rightlogs = [Log(-20, 256), Log(180, 256), Log(380, 256), Log(-20, 166), Log(180, 166), Log(380, 166)]
2415-
2416- lives = [Life(10, 710), Life(38, 710), Life(66, 710)]
2417-
2418- speed = 4
2419-
2420- """
2421- Using pygame.sprite.OrderedUpdates instead of pygame.sprite.RenderedUpdates due to the need to have the the frog ONTOP of the logs.
2422- There is a small performance hit using this function.
2423- """
2424- all = pygame.sprite.OrderedUpdates(leftlogs, rightlogs, player, leftcars, rightcars, homefrogs, lives)
2425-
2426- #Keep track of time
2427- clock = pygame.time.Clock()
2428-
2429- levelIndicator(player.level)
2430- scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
2431- #Game Loop
2432- while 1:
2433-
2434- #Get input
2435- for event in pygame.event.get():
2436- if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
2437- sys.exit()
2438- if player.gameOver != True:
2439- if event.type == KEYDOWN and event.key == K_UP:
2440- player.rect.top -= 45
2441- player.onLeftLog = False
2442- player.onRightLog = False
2443- if event.type == KEYDOWN and event.key == K_DOWN:
2444- player.rect.top += 45
2445- player.onLeftLog = False
2446- player.onRightLog = False
2447- if event.type == KEYDOWN and event.key == K_LEFT:
2448- player.rect.left -= 20
2449- player.onLeftLog = False
2450- player.onRightLog = False
2451- if event.type == KEYDOWN and event.key == K_RIGHT:
2452- player.rect.left += 20
2453- player.onLeftLog = False
2454- player.onRightLog = False
2455-
2456- #move objects
2457- for car in leftcars:
2458- if car.rect.right <=0:
2459- car.rect.left = 600
2460- else:
2461- car.rect.left -= speed
2462- if car.rect.colliderect(player.rect):
2463- player.loseLife()
2464- scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
2465-
2466- for car in rightcars:
2467- if car.rect.left >=600:
2468- car.rect.right = 0
2469- else:
2470- car.rect.left += speed
2471- if car.rect.colliderect(player.rect):
2472- player.loseLife()
2473- scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
2474-
2475- for log in leftlogs:
2476- if log.rect.right <=0:
2477- log.rect.left = 600
2478- else:
2479- log.rect.left -=speed
2480- if log.rect.colliderect(player.rect):
2481- player.onLeftLog = True
2482-
2483- for log in rightlogs:
2484- if log.rect.left >=600:
2485- log.rect.right = 0
2486- else:
2487- log.rect.left +=speed
2488- if log.rect.colliderect(player.rect):
2489- player.onRightLog = True
2490-
2491- if player.rect.top <=301 and player.rect.top >=121:
2492- if player.onLeftLog == True:
2493- player.rect.left -=speed
2494- elif player.onRightLog == True:
2495- player.rect.left +=speed
2496- else:
2497- player.loseLife()
2498- scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
2499-
2500- if player.rect.top <=100:
2501-
2502- if player.rect.left >=12 and player.rect.right <=104 and player.frogsHome[0] != True:
2503- player.scored()
2504- scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
2505- homefrogs[0].rect.left = 35
2506- homefrogs[0].rect.top = 70
2507- player.frogsHome[0] = True
2508-
2509- elif player.rect.left >=132 and player.rect.right <=224 and player.frogsHome[1] != True:
2510- player.scored()
2511- scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
2512- homefrogs[1].rect.left = 155
2513- homefrogs[1].rect.top = 70
2514- player.frogsHome[1] = True
2515-
2516- elif player.rect.left >=252 and player.rect.right <=344 and player.frogsHome[2] != True:
2517- player.scored()
2518- scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
2519- homefrogs[2].rect.left = 275
2520- homefrogs[2].rect.top = 70
2521- player.frogsHome[2] = True
2522-
2523- elif player.rect.left >=372 and player.rect.right <=464 and player.frogsHome[3] != True:
2524- player.scored()
2525- scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
2526- homefrogs[3].rect.left = 395
2527- homefrogs[3].rect.top = 70
2528- player.frogsHome[3] = True
2529-
2530- elif player.rect.left >=492 and player.rect.right <=584 and player.frogsHome[4] != True:
2531- player.scored()
2532- scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
2533- homefrogs[4].rect.left = 515
2534- homefrogs[4].rect.top = 70
2535- player.frogsHome[4] = True
2536-
2537- else:
2538- player.loseLife()
2539- scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
2540-
2541- if player.frogsHome[0] == True and player.frogsHome[1] == True and player.frogsHome[2] == True and player.frogsHome[3] == True and player.frogsHome[4] == True:
2542- player.frogsHome[0] = False
2543- player.frogsHome[1] = False
2544- player.frogsHome[2] = False
2545- player.frogsHome[3] = False
2546- player.frogsHome[4] = False
2547- homefrogs[0].rect.left = -10
2548- homefrogs[0].rect.top = -10
2549- homefrogs[1].rect.left = -10
2550- homefrogs[1].rect.top = -10
2551- homefrogs[2].rect.left = -10
2552- homefrogs[2].rect.top = -10
2553- homefrogs[3].rect.left = -10
2554- homefrogs[3].rect.top = -10
2555- homefrogs[4].rect.left = -10
2556- homefrogs[4].rect.top = -10
2557- if player.lives == 3:
2558- player.goodScore = True
2559- if player.lives <3:
2560- player.lives +=1
2561- if player.lives == 2:
2562- lives[1].rect.left = 38
2563- elif player.lives == 3:
2564- lives[2].rect.left = 66
2565- player.level +=1
2566- speed +=1
2567- levelIndicator(player.level)
2568-
2569- if player.gameOver:
2570- gameOverScreen(player.score, player.level)
2571-
2572- if player.lives == 2:
2573- lives[2].rect.left = -50
2574- if player.lives == 1:
2575- lives[1].rect.left = -50
2576-
2577-
2578- #Clear sprite
2579- all.clear(screen, background)
2580-
2581- #Update sprites
2582- all.update()
2583-
2584- #Redraw sprites
2585- dirty = all.draw(screen)
2586- pygame.display.update(dirty)
2587-
2588- #Maintain frame rate
2589- #using 30 FPS
2590- clock.tick(30)
2591-
2592-if __name__ == '__main__': main()
2593
2594=== added directory 'Frogger/lib'
2595=== added file 'Frogger/lib/__init__.py'
2596=== added file 'Frogger/lib/engine.py'
2597--- Frogger/lib/engine.py 1970-01-01 00:00:00 +0000
2598+++ Frogger/lib/engine.py 2010-03-12 10:44:17 +0000
2599@@ -0,0 +1,69 @@
2600+#!/usr/bin/env python
2601+
2602+###BEGIN LICENSE
2603+# Copyright (C) 2010 Daniel Bell <daniel.bell@saraclan.com>
2604+#
2605+#This program is free software: you can redistribute it and/or modify it
2606+#under the terms of the GNU General Public License version 3, as published
2607+#by the Free Software Foundation.
2608+#
2609+#This program is distributed in the hope that it will be useful, but
2610+#WITHOUT ANY WARRANTY; without even the implied warranties of
2611+#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
2612+#PURPOSE. See the GNU General Public License for more details.
2613+#
2614+#You should have received a copy of the GNU General Public License along
2615+#with this program. If not, see <http://www.gnu.org/licenses/>.
2616+### END LICENSE
2617+
2618+
2619+import os
2620+import pygame
2621+from pygame.locals import *
2622+
2623+global font
2624+global font_write
2625+
2626+def load_image(name, colorkey=None):
2627+ fullname = os.path.join('data/images/', name)
2628+ try:
2629+ image = pygame.image.load(fullname)
2630+ except pygame.error, message:
2631+ print 'Cannot load image:', fullname
2632+ raise SystemExit, message
2633+ image = image.convert()
2634+ if colorkey is not None:
2635+ if colorkey is -1:
2636+ colorkey = image.get_at((0,0))
2637+ image.set_colorkey(colorkey, RLEACCEL)
2638+ return image, image.get_rect()
2639+
2640+def font_write(message, size, aaliasing, color, background, coordinates, screen):
2641+ """ This Method is used to print messages to the screen.
2642+ You can call this method, and with parameters messages will be displayed on the screen.
2643+
2644+ :param message: The message you wish to display on the screen.
2645+ :type message: ``String``
2646+ :param size: The size of font you wish to use.
2647+ :type size: ``int``
2648+ :param aaliasing: Whether or not anti-aliasing should be enabled.
2649+ :type aaliasing: ``boolean``
2650+ :param color: Color of the message
2651+ :type color: ``int`` - in format of (red, green, blue)
2652+ :param background: Color of background.
2653+ :type background: ``int`` - 0 results in transparent otherwise format (red, green, blue)
2654+ :param coordinates: Coordinates of where the message should be displayed.
2655+ :param type: ``int`` - format (x, y)
2656+ :param screen: The screen you wish to print on
2657+ :param type: ``pygame.display``
2658+ """
2659+ #Define font
2660+ font ='data/fonts/nibby.ttf'
2661+ font = pygame.font.Font(font, size)
2662+ #Check if background is defined or not.
2663+ if background==0:
2664+ print_message=font.render(message, aaliasing, color)
2665+ else:
2666+ print_message=font.render(message, aaliasing, color, background)
2667+ screen.blit(print_message, coordinates)
2668+ #pygame.display.update()
2669
2670=== added file 'Frogger/lib/sprites.py'
2671--- Frogger/lib/sprites.py 1970-01-01 00:00:00 +0000
2672+++ Frogger/lib/sprites.py 2010-03-12 10:44:17 +0000
2673@@ -0,0 +1,136 @@
2674+#!/usr/bin/env python
2675+
2676+###BEGIN LICENSE
2677+# Copyright (C) 2010 Daniel Bell <daniel.bell@saraclan.com>
2678+#
2679+#This program is free software: you can redistribute it and/or modify it
2680+#under the terms of the GNU General Public License version 3, as published
2681+#by the Free Software Foundation.
2682+#
2683+#This program is distributed in the hope that it will be useful, but
2684+#WITHOUT ANY WARRANTY; without even the implied warranties of
2685+#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
2686+#PURPOSE. See the GNU General Public License for more details.
2687+#
2688+#You should have received a copy of the GNU General Public License along
2689+#with this program. If not, see <http://www.gnu.org/licenses/>.
2690+### END LICENSE
2691+
2692+#Sprite module: Contains all the sprites/objects.
2693+
2694+
2695+import sys
2696+import os
2697+import pygame
2698+import time
2699+
2700+from pygame.locals import *
2701+from lib.engine import *
2702+
2703+class Leftcar(pygame.sprite.Sprite):
2704+ """ This is the Leftcar class - contains logic required for
2705+ anything related to the leftcar.
2706+ Leftcar is a subclass of pygame.sprite.Sprite
2707+ """
2708+ def __init__(self, left, top):
2709+ pygame.sprite.Sprite.__init__(self)
2710+ self.image, self.rect = load_image('bettercar2.gif', -1)
2711+ self.rect.left = left
2712+ self.rect.top = top
2713+
2714+class Rightcar(pygame.sprite.Sprite):
2715+ """ This is the Rightcar class - contains logic required for
2716+ anything related to the Rightcar.
2717+ Rightcar is a subclass of pygame.sprite.Sprite
2718+ """
2719+ def __init__(self, left, top):
2720+ pygame.sprite.Sprite.__init__(self)
2721+ self.image, self.rect = load_image('bettercar.gif', -1)
2722+ self.rect.left = left
2723+ self.rect.top = top
2724+
2725+class Homefrog(pygame.sprite.Sprite):
2726+ def __init__(self, left, top):
2727+ self.left = left
2728+ self.top = top
2729+ pygame.sprite.Sprite.__init__(self)
2730+ self.image, self.rect = load_image('life.gif')
2731+ self.rect.left = self.left
2732+ self.rect.top = self.top
2733+ self.collected = False
2734+ self.saved = False
2735+
2736+class Log(pygame.sprite.Sprite):
2737+ def __init__(self, left, top):
2738+ pygame.sprite.Sprite.__init__(self)
2739+ self.image, self.rect = load_image('log.gif')
2740+ self.rect.left = left
2741+ self.rect.top = top
2742+
2743+class Life(pygame.sprite.Sprite):
2744+ def __init__(self, left, top):
2745+ pygame.sprite.Sprite.__init__(self)
2746+ self.image, self.rect = load_image('life.gif')
2747+ self.rect.left = left
2748+ self.rect.top = top
2749+
2750+class Frog(pygame.sprite.Sprite):
2751+ """Contains all the functions and information regarding the Frog,
2752+ player controllable character
2753+ """
2754+ def __init__(self):
2755+ pygame.sprite.Sprite.__init__(self)
2756+ self.default_image = load_image('betterfrog.gif', -1)
2757+ self.carry_image = load_image('frogcarry.gif', -1)
2758+ self.image, self.rect = self.default_image
2759+ self.starting_left = 374
2760+ self.starting_top = 465
2761+ self.rect.left = self.starting_left
2762+ self.rect.top = self.starting_top
2763+ self.lives = 3
2764+ self.score = 0
2765+ self.game_over = False
2766+ self.on_left_log = False
2767+ self.on_right_log = False
2768+ self.perfect_score = True
2769+ self.good_score = True
2770+ self.start_time = time.time()
2771+ self.end_time = None
2772+ self.collecting = False
2773+ self.collecting_number = None
2774+
2775+ def carry_frog(self, left, top):
2776+ self.image, self.rect = self.carry_image
2777+ self.rect.left = left
2778+ self.rect.top = top
2779+
2780+ def not_carry_frog(self, left, top):
2781+ self.image, self.rect = self.default_image
2782+ self.rect.left = left
2783+ self.rect.top = top
2784+
2785+ def add_score(self):
2786+ """ This method generates score for the user based on time taken to save the frog.
2787+ """
2788+ #Generate time taken to score:
2789+ self.end_time = time.time() - self.start_time
2790+ self.end_time = int(self.end_time)
2791+
2792+ #Generate base score:
2793+ if self.end_time <10:
2794+ self.base_score = 30
2795+ elif self.end_time >=11 and self.end_time <20:
2796+ self.base_score = 20
2797+ else:
2798+ self.base_score = 10
2799+
2800+ #Generate actual score:
2801+ if self.perfect_score == True:
2802+ self.score += (self.base_score)*3
2803+ elif self.good_score == True:
2804+ self.score += (self.base_score)*2
2805+ else:
2806+ self.score += self.base_score
2807+
2808+ #Reset timer.
2809+ self.start_time = time.time()
2810
2811=== added file 'Frogger/setup.py'
2812--- Frogger/setup.py 1970-01-01 00:00:00 +0000
2813+++ Frogger/setup.py 2010-03-12 10:44:17 +0000
2814@@ -0,0 +1,110 @@
2815+#! /usr/bin/env python
2816+
2817+###BEGIN LICENSE
2818+# Copyright (C) 2010 Daniel Bell <daniel.bell@saraclan.com>
2819+#
2820+#This program is free software: you can redistribute it and/or modify it
2821+#under the terms of the GNU General Public License version 3, as published
2822+#by the Free Software Foundation.
2823+#
2824+#This program is distributed in the hope that it will be useful, but
2825+#WITHOUT ANY WARRANTY; without even the implied warranties of
2826+#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
2827+#PURPOSE. See the GNU General Public License for more details.
2828+#
2829+#You should have received a copy of the GNU General Public License along
2830+#with this program. If not, see <http://www.gnu.org/licenses/>.
2831+### END LICENSE
2832+
2833+###
2834+# Setup Script for Frog Game: 0.3
2835+# Works on Mac, Windows and Unix based systems.
2836+#
2837+#Usage (Mac OS X):
2838+# python setup.py py2app
2839+#
2840+#Usage (Windows):
2841+# python setup.py py2exe
2842+#
2843+#Usage (UNIX):
2844+# ./setup.py install
2845+###
2846+
2847+#Import stuff required to do the install. Stuff that could not be carried through gets ignored.
2848+try:
2849+from distutils.core import setup
2850+from distutils.command.install_data import install_data
2851+from distutils.dep_util import newer
2852+from distutils.log import info
2853+import glob
2854+import os
2855+import sys
2856+import py2exe
2857+from setuptools import setup
2858+except ImportError:
2859+ pass
2860+
2861+#Check if what we are running (and thus installing on) is MAC OSX.
2862+if sys.platform == 'darwin':
2863+ extra_options = dict(
2864+ setup_requires=['py2app'],
2865+ app=[frogger],
2866+ data_files =[
2867+ ('data/fonts', glob.glob('data/fonts/*.ttf')),
2868+ ('data/images', glob.glob('data/images/*.png')),
2869+ ('data/images', glob.glob('data/images/*.gif')),
2870+ ]
2871+ #py2app has certain flags/options that can be enabled.
2872+ #Setting Icon file, so that generated .app has the icon set automatically.
2873+ options=dict(py2app=dict(iconfile=data/icons/frog-game.icns)),
2874+ )
2875+#if we are not using running MAC OSX check if we are running Windows.
2876+elif sys.platform == 'win32':
2877+ extra_options = dict(
2878+ windows = [
2879+ {
2880+ "script": "frogger",
2881+ "icon_resources": [(2, "frog-game.ico")]
2882+ }
2883+ data_files =[
2884+ ('data/fonts', glob.glob('data/fonts/*.ttf')),
2885+ ('data/images', glob.glob('data/images/*.png')),
2886+ ('data/images', glob.glob('data/images/*.gif')),
2887+ ]
2888+ )
2889+#when its not MAC OSX or Windows we can assume its some sort of UNIX
2890+#based system.
2891+else:
2892+ extra_options = dict(
2893+ scripts=['frogger'],
2894+ data_files =[
2895+ ('share/applications', ['data/frog-game.desktop']),
2896+ ('share/icons/hicolor/scalable/apps',
2897+ glob.glob('data/icons/scalable/*.svg')),
2898+ ('share/icons/hicolor/16x16/apps',
2899+ glob.glob('data/icons/16x16/*.png')),
2900+ ('share/icons/hicolor/22x22/apps',
2901+ glob.glob('data/icons/22x22/*.png')),
2902+ ('share/icons/hicolor/24x24/apps',
2903+ glob.glob('data/icons/24x24/*.png')),
2904+ ('share/icons/hicolor/48x48/apps',
2905+ glob.glob('data/icons/48x48/*.png')),
2906+ ('share/frog-game/data/fonts',
2907+ glob.glob('data/fonts/*.ttf')),
2908+ ('share/frog-game/data/images',
2909+ glob.glob('data/images/*.png')),
2910+ ('share/frog-game/data/images',
2911+ glob.glob('data/images/*.gif')),
2912+ ],
2913+ )
2914+
2915+setup(
2916+ version='0.2',
2917+ description='Fun survival/rescue game!',
2918+ long_description="The baby frogs are lost! Can you rescue them?",
2919+ author='Daniel Bell (dbell)',
2920+ author_email='daniel.bell@saraclan.com',
2921+ url='https://launchpad.net/frogger',
2922+ license='GPL v3',
2923+ **extra_options
2924+)
2925
2926=== removed file 'Frogger/sprites.py'
2927--- Frogger/sprites.py 2010-02-13 16:37:05 +0000
2928+++ Frogger/sprites.py 1970-01-01 00:00:00 +0000
2929@@ -1,141 +0,0 @@
2930-try:
2931- import sys
2932- import os
2933- import pygame
2934- import time
2935- from pygame.locals import *
2936- import weakref
2937-except ImportError, err:
2938- print "Failure loading module. %s" % (err)
2939- sys.exit(2)
2940-
2941-def load_image(name, colorkey=None):
2942- fullname = os.path.join('data/images/', name)
2943- try:
2944- image = pygame.image.load(fullname)
2945- except pygame.error, message:
2946- print 'Cannot load image:', fullname
2947- raise SystemExit, message
2948- image = image.convert()
2949- if colorkey is not None:
2950- if colorkey is -1:
2951- colorkey = image.get_at((0,0))
2952- image.set_colorkey(colorkey, RLEACCEL)
2953- return image, image.get_rect()
2954-
2955-
2956-class Leftcar(pygame.sprite.Sprite):
2957- """
2958- Left Car functions.
2959- """
2960- def __init__(self, left, top):
2961- pygame.sprite.Sprite.__init__(self)
2962- self.image, self.rect = load_image('bettercar2.gif', -1)
2963- self.rect.left = left
2964- self.rect.top = top
2965-
2966-class Rightcar(pygame.sprite.Sprite):
2967- """
2968- Left Car functions.
2969- """
2970- def __init__(self, left, top):
2971- pygame.sprite.Sprite.__init__(self)
2972- self.image, self.rect = load_image('bettercar.gif', -1)
2973- self.rect.left = left
2974- self.rect.top = top
2975-
2976-class Homefrog(pygame.sprite.Sprite):
2977- def __init__(self, left, top):
2978- pygame.sprite.Sprite.__init__(self)
2979- self.image, self.rect = load_image('smallerfrog.gif', -1)
2980- self.rect.left = left
2981- self.rect.top = top
2982-
2983-class Log(pygame.sprite.Sprite):
2984- def __init__(self, left, top):
2985- pygame.sprite.Sprite.__init__(self)
2986- self.image, self.rect = load_image('log.gif')
2987- self.rect.left = left
2988- self.rect.top = top
2989-
2990-class Life(pygame.sprite.Sprite):
2991- def __init__(self, left, top):
2992- pygame.sprite.Sprite.__init__(self)
2993- self.image, self.rect = load_image('life.gif')
2994- self.rect.left = left
2995- self.rect.top = top
2996-
2997-class Frog(pygame.sprite.Sprite):
2998- """
2999- Contains all the functions and information regarding the Frog, player controllable character
3000- """
3001- def __init__(self):
3002- pygame.sprite.Sprite.__init__(self)
3003- self.image, self.rect = load_image('betterfrog.gif', -1)
3004- self.rect.left = 266
3005- self.rect.top= 661
3006- self.lives = 3
3007- self.score = 0
3008- self.level = 1
3009- self.gameOver = False
3010- self.frogsHome = [False, False, False, False, False]
3011- self.onLeftLog = False
3012- self.onRightLog = False
3013- self.perfectScore = True
3014- self.goodScore = True
3015- self.startTime = time.time()
3016-
3017- def update(self):
3018- #moves the frog
3019- self.gameAreaCheck()
3020-
3021- def scored(self):
3022-
3023- self.rect.left = 266
3024- self.rect.top= 661
3025-
3026- self.endTime = time.time() - self.startTime
3027- self.endTime = int(self.endTime)
3028-
3029- if self.endTime <5:
3030- self.baseScore = 30
3031- elif self.endTime >=6 and self.endTime <15:
3032- self.baseScore = 20
3033- else:
3034- self.baseScore = 10
3035-
3036- if self.perfectScore == True:
3037- self.score += (self.baseScore + (self.level*5))*3
3038- elif self.goodScore == True:
3039- self.score += (self.baseScore + (self.level*5))*2
3040- else:
3041- self.score += self.baseScore + (self.level*5)
3042-
3043- self.startTime = time.time()
3044-
3045- def gameAreaCheck(self):
3046- if self.onLeftLog != True and self.onRightLog != True:
3047- if self.rect.top >=662:
3048- self.rect.top -=45
3049- if self.rect.left <=0:
3050- self.rect.left +=20
3051- if self.rect.right >=595:
3052- self.rect.left -=20
3053- else:
3054- if self.rect.right <=0:
3055- self.loseLife()
3056- if self.rect.left >=600:
3057- self.loseLife()
3058-
3059-
3060- def loseLife(self):
3061- self.startTime = time.time()
3062- self.goodScore = False
3063- self.perfectScore = False
3064- self.onLeftLog = False
3065- self.onRightLog = False
3066- self.rect.left = 266
3067- self.rect.top= 661
3068- self.lives -= 1
3069- if self.lives <= 0:
3070- self.gameOver = True

Subscribers

People subscribed via source and target branches

to all changes: