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
=== removed file 'Frogger/CHANGES'
--- Frogger/CHANGES 2010-01-29 23:57:26 +0000
+++ Frogger/CHANGES 1970-01-01 00:00:00 +0000
@@ -1,19 +0,0 @@
1Frog Game (0.1)
2
3 * Moved Game to Python, instead of C#.
4 * Support for Linux and Mac OS X in addition to Windows.
5 * Fixed issues with CPU usage.
6 * Difficulty increases every level now instead of every 5: Still basic difficulty (speed increase only).
7 * Log size reduced to remove ability to slide from log to log on same level.
8 * Balancing on log removed. Currently a single pixel on log will be enough to prevent you from landing in water. (LP #514564)
9 * New Menu/Exit Screen.
10 * New Font: Blooming Grove released under Public Domain by Jonadab the Unsightly One (http://openfontlibrary.org/media/files/jonadab/414)
11
12 -- Daniel Bell <daniel.bell@saraclan.com> Fri, 29 Jan 2010.
13
14Frog Game (prototype)
15
16 * Initial prototype to test the game concepts.
17
18 -- Daniel Bell <daniel.bell@saraclan.com> Sat, 12 Dec 2009.
19
200
=== added file 'Frogger/COPYING'
--- Frogger/COPYING 1970-01-01 00:00:00 +0000
+++ Frogger/COPYING 2010-03-12 10:44:17 +0000
@@ -0,0 +1,674 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The GNU General Public License is a free, copyleft license for
11software and other kinds of works.
12
13 The licenses for most software and other practical works are designed
14to take away your freedom to share and change the works. By contrast,
15the GNU General Public License is intended to guarantee your freedom to
16share and change all versions of a program--to make sure it remains free
17software for all its users. We, the Free Software Foundation, use the
18GNU General Public License for most of our software; it applies also to
19any other work released this way by its authors. You can apply it to
20your programs, too.
21
22 When we speak of free software, we are referring to freedom, not
23price. Our General Public Licenses are designed to make sure that you
24have the freedom to distribute copies of free software (and charge for
25them if you wish), that you receive source code or can get it if you
26want it, that you can change the software or use pieces of it in new
27free programs, and that you know you can do these things.
28
29 To protect your rights, we need to prevent others from denying you
30these rights or asking you to surrender the rights. Therefore, you have
31certain responsibilities if you distribute copies of the software, or if
32you modify it: responsibilities to respect the freedom of others.
33
34 For example, if you distribute copies of such a program, whether
35gratis or for a fee, you must pass on to the recipients the same
36freedoms that you received. You must make sure that they, too, receive
37or can get the source code. And you must show them these terms so they
38know their rights.
39
40 Developers that use the GNU GPL protect your rights with two steps:
41(1) assert copyright on the software, and (2) offer you this License
42giving you legal permission to copy, distribute and/or modify it.
43
44 For the developers' and authors' protection, the GPL clearly explains
45that there is no warranty for this free software. For both users' and
46authors' sake, the GPL requires that modified versions be marked as
47changed, so that their problems will not be attributed erroneously to
48authors of previous versions.
49
50 Some devices are designed to deny users access to install or run
51modified versions of the software inside them, although the manufacturer
52can do so. This is fundamentally incompatible with the aim of
53protecting users' freedom to change the software. The systematic
54pattern of such abuse occurs in the area of products for individuals to
55use, which is precisely where it is most unacceptable. Therefore, we
56have designed this version of the GPL to prohibit the practice for those
57products. If such problems arise substantially in other domains, we
58stand ready to extend this provision to those domains in future versions
59of the GPL, as needed to protect the freedom of users.
60
61 Finally, every program is threatened constantly by software patents.
62States should not allow patents to restrict development and use of
63software on general-purpose computers, but in those that do, we wish to
64avoid the special danger that patents applied to a free program could
65make it effectively proprietary. To prevent this, the GPL assures that
66patents cannot be used to render the program non-free.
67
68 The precise terms and conditions for copying, distribution and
69modification follow.
70
71 TERMS AND CONDITIONS
72
73 0. Definitions.
74
75 "This License" refers to version 3 of the GNU General Public License.
76
77 "Copyright" also means copyright-like laws that apply to other kinds of
78works, such as semiconductor masks.
79
80 "The Program" refers to any copyrightable work licensed under this
81License. Each licensee is addressed as "you". "Licensees" and
82"recipients" may be individuals or organizations.
83
84 To "modify" a work means to copy from or adapt all or part of the work
85in a fashion requiring copyright permission, other than the making of an
86exact copy. The resulting work is called a "modified version" of the
87earlier work or a work "based on" the earlier work.
88
89 A "covered work" means either the unmodified Program or a work based
90on the Program.
91
92 To "propagate" a work means to do anything with it that, without
93permission, would make you directly or secondarily liable for
94infringement under applicable copyright law, except executing it on a
95computer or modifying a private copy. Propagation includes copying,
96distribution (with or without modification), making available to the
97public, and in some countries other activities as well.
98
99 To "convey" a work means any kind of propagation that enables other
100parties to make or receive copies. Mere interaction with a user through
101a computer network, with no transfer of a copy, is not conveying.
102
103 An interactive user interface displays "Appropriate Legal Notices"
104to the extent that it includes a convenient and prominently visible
105feature that (1) displays an appropriate copyright notice, and (2)
106tells the user that there is no warranty for the work (except to the
107extent that warranties are provided), that licensees may convey the
108work under this License, and how to view a copy of this License. If
109the interface presents a list of user commands or options, such as a
110menu, a prominent item in the list meets this criterion.
111
112 1. Source Code.
113
114 The "source code" for a work means the preferred form of the work
115for making modifications to it. "Object code" means any non-source
116form of a work.
117
118 A "Standard Interface" means an interface that either is an official
119standard defined by a recognized standards body, or, in the case of
120interfaces specified for a particular programming language, one that
121is widely used among developers working in that language.
122
123 The "System Libraries" of an executable work include anything, other
124than the work as a whole, that (a) is included in the normal form of
125packaging a Major Component, but which is not part of that Major
126Component, and (b) serves only to enable use of the work with that
127Major Component, or to implement a Standard Interface for which an
128implementation is available to the public in source code form. A
129"Major Component", in this context, means a major essential component
130(kernel, window system, and so on) of the specific operating system
131(if any) on which the executable work runs, or a compiler used to
132produce the work, or an object code interpreter used to run it.
133
134 The "Corresponding Source" for a work in object code form means all
135the source code needed to generate, install, and (for an executable
136work) run the object code and to modify the work, including scripts to
137control those activities. However, it does not include the work's
138System Libraries, or general-purpose tools or generally available free
139programs which are used unmodified in performing those activities but
140which are not part of the work. For example, Corresponding Source
141includes interface definition files associated with source files for
142the work, and the source code for shared libraries and dynamically
143linked subprograms that the work is specifically designed to require,
144such as by intimate data communication or control flow between those
145subprograms and other parts of the work.
146
147 The Corresponding Source need not include anything that users
148can regenerate automatically from other parts of the Corresponding
149Source.
150
151 The Corresponding Source for a work in source code form is that
152same work.
153
154 2. Basic Permissions.
155
156 All rights granted under this License are granted for the term of
157copyright on the Program, and are irrevocable provided the stated
158conditions are met. This License explicitly affirms your unlimited
159permission to run the unmodified Program. The output from running a
160covered work is covered by this License only if the output, given its
161content, constitutes a covered work. This License acknowledges your
162rights of fair use or other equivalent, as provided by copyright law.
163
164 You may make, run and propagate covered works that you do not
165convey, without conditions so long as your license otherwise remains
166in force. You may convey covered works to others for the sole purpose
167of having them make modifications exclusively for you, or provide you
168with facilities for running those works, provided that you comply with
169the terms of this License in conveying all material for which you do
170not control copyright. Those thus making or running the covered works
171for you must do so exclusively on your behalf, under your direction
172and control, on terms that prohibit them from making any copies of
173your copyrighted material outside their relationship with you.
174
175 Conveying under any other circumstances is permitted solely under
176the conditions stated below. Sublicensing is not allowed; section 10
177makes it unnecessary.
178
179 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
181 No covered work shall be deemed part of an effective technological
182measure under any applicable law fulfilling obligations under article
18311 of the WIPO copyright treaty adopted on 20 December 1996, or
184similar laws prohibiting or restricting circumvention of such
185measures.
186
187 When you convey a covered work, you waive any legal power to forbid
188circumvention of technological measures to the extent such circumvention
189is effected by exercising rights under this License with respect to
190the covered work, and you disclaim any intention to limit operation or
191modification of the work as a means of enforcing, against the work's
192users, your or third parties' legal rights to forbid circumvention of
193technological measures.
194
195 4. Conveying Verbatim Copies.
196
197 You may convey verbatim copies of the Program's source code as you
198receive it, in any medium, provided that you conspicuously and
199appropriately publish on each copy an appropriate copyright notice;
200keep intact all notices stating that this License and any
201non-permissive terms added in accord with section 7 apply to the code;
202keep intact all notices of the absence of any warranty; and give all
203recipients a copy of this License along with the Program.
204
205 You may charge any price or no price for each copy that you convey,
206and you may offer support or warranty protection for a fee.
207
208 5. Conveying Modified Source Versions.
209
210 You may convey a work based on the Program, or the modifications to
211produce it from the Program, in the form of source code under the
212terms of section 4, provided that you also meet all of these conditions:
213
214 a) The work must carry prominent notices stating that you modified
215 it, and giving a relevant date.
216
217 b) The work must carry prominent notices stating that it is
218 released under this License and any conditions added under section
219 7. This requirement modifies the requirement in section 4 to
220 "keep intact all notices".
221
222 c) You must license the entire work, as a whole, under this
223 License to anyone who comes into possession of a copy. This
224 License will therefore apply, along with any applicable section 7
225 additional terms, to the whole of the work, and all its parts,
226 regardless of how they are packaged. This License gives no
227 permission to license the work in any other way, but it does not
228 invalidate such permission if you have separately received it.
229
230 d) If the work has interactive user interfaces, each must display
231 Appropriate Legal Notices; however, if the Program has interactive
232 interfaces that do not display Appropriate Legal Notices, your
233 work need not make them do so.
234
235 A compilation of a covered work with other separate and independent
236works, which are not by their nature extensions of the covered work,
237and which are not combined with it such as to form a larger program,
238in or on a volume of a storage or distribution medium, is called an
239"aggregate" if the compilation and its resulting copyright are not
240used to limit the access or legal rights of the compilation's users
241beyond what the individual works permit. Inclusion of a covered work
242in an aggregate does not cause this License to apply to the other
243parts of the aggregate.
244
245 6. Conveying Non-Source Forms.
246
247 You may convey a covered work in object code form under the terms
248of sections 4 and 5, provided that you also convey the
249machine-readable Corresponding Source under the terms of this License,
250in one of these ways:
251
252 a) Convey the object code in, or embodied in, a physical product
253 (including a physical distribution medium), accompanied by the
254 Corresponding Source fixed on a durable physical medium
255 customarily used for software interchange.
256
257 b) Convey the object code in, or embodied in, a physical product
258 (including a physical distribution medium), accompanied by a
259 written offer, valid for at least three years and valid for as
260 long as you offer spare parts or customer support for that product
261 model, to give anyone who possesses the object code either (1) a
262 copy of the Corresponding Source for all the software in the
263 product that is covered by this License, on a durable physical
264 medium customarily used for software interchange, for a price no
265 more than your reasonable cost of physically performing this
266 conveying of source, or (2) access to copy the
267 Corresponding Source from a network server at no charge.
268
269 c) Convey individual copies of the object code with a copy of the
270 written offer to provide the Corresponding Source. This
271 alternative is allowed only occasionally and noncommercially, and
272 only if you received the object code with such an offer, in accord
273 with subsection 6b.
274
275 d) Convey the object code by offering access from a designated
276 place (gratis or for a charge), and offer equivalent access to the
277 Corresponding Source in the same way through the same place at no
278 further charge. You need not require recipients to copy the
279 Corresponding Source along with the object code. If the place to
280 copy the object code is a network server, the Corresponding Source
281 may be on a different server (operated by you or a third party)
282 that supports equivalent copying facilities, provided you maintain
283 clear directions next to the object code saying where to find the
284 Corresponding Source. Regardless of what server hosts the
285 Corresponding Source, you remain obligated to ensure that it is
286 available for as long as needed to satisfy these requirements.
287
288 e) Convey the object code using peer-to-peer transmission, provided
289 you inform other peers where the object code and Corresponding
290 Source of the work are being offered to the general public at no
291 charge under subsection 6d.
292
293 A separable portion of the object code, whose source code is excluded
294from the Corresponding Source as a System Library, need not be
295included in conveying the object code work.
296
297 A "User Product" is either (1) a "consumer product", which means any
298tangible personal property which is normally used for personal, family,
299or household purposes, or (2) anything designed or sold for incorporation
300into a dwelling. In determining whether a product is a consumer product,
301doubtful cases shall be resolved in favor of coverage. For a particular
302product received by a particular user, "normally used" refers to a
303typical or common use of that class of product, regardless of the status
304of the particular user or of the way in which the particular user
305actually uses, or expects or is expected to use, the product. A product
306is a consumer product regardless of whether the product has substantial
307commercial, industrial or non-consumer uses, unless such uses represent
308the only significant mode of use of the product.
309
310 "Installation Information" for a User Product means any methods,
311procedures, authorization keys, or other information required to install
312and execute modified versions of a covered work in that User Product from
313a modified version of its Corresponding Source. The information must
314suffice to ensure that the continued functioning of the modified object
315code is in no case prevented or interfered with solely because
316modification has been made.
317
318 If you convey an object code work under this section in, or with, or
319specifically for use in, a User Product, and the conveying occurs as
320part of a transaction in which the right of possession and use of the
321User Product is transferred to the recipient in perpetuity or for a
322fixed term (regardless of how the transaction is characterized), the
323Corresponding Source conveyed under this section must be accompanied
324by the Installation Information. But this requirement does not apply
325if neither you nor any third party retains the ability to install
326modified object code on the User Product (for example, the work has
327been installed in ROM).
328
329 The requirement to provide Installation Information does not include a
330requirement to continue to provide support service, warranty, or updates
331for a work that has been modified or installed by the recipient, or for
332the User Product in which it has been modified or installed. Access to a
333network may be denied when the modification itself materially and
334adversely affects the operation of the network or violates the rules and
335protocols for communication across the network.
336
337 Corresponding Source conveyed, and Installation Information provided,
338in accord with this section must be in a format that is publicly
339documented (and with an implementation available to the public in
340source code form), and must require no special password or key for
341unpacking, reading or copying.
342
343 7. Additional Terms.
344
345 "Additional permissions" are terms that supplement the terms of this
346License by making exceptions from one or more of its conditions.
347Additional permissions that are applicable to the entire Program shall
348be treated as though they were included in this License, to the extent
349that they are valid under applicable law. If additional permissions
350apply only to part of the Program, that part may be used separately
351under those permissions, but the entire Program remains governed by
352this License without regard to the additional permissions.
353
354 When you convey a copy of a covered work, you may at your option
355remove any additional permissions from that copy, or from any part of
356it. (Additional permissions may be written to require their own
357removal in certain cases when you modify the work.) You may place
358additional permissions on material, added by you to a covered work,
359for which you have or can give appropriate copyright permission.
360
361 Notwithstanding any other provision of this License, for material you
362add to a covered work, you may (if authorized by the copyright holders of
363that material) supplement the terms of this License with terms:
364
365 a) Disclaiming warranty or limiting liability differently from the
366 terms of sections 15 and 16 of this License; or
367
368 b) Requiring preservation of specified reasonable legal notices or
369 author attributions in that material or in the Appropriate Legal
370 Notices displayed by works containing it; or
371
372 c) Prohibiting misrepresentation of the origin of that material, or
373 requiring that modified versions of such material be marked in
374 reasonable ways as different from the original version; or
375
376 d) Limiting the use for publicity purposes of names of licensors or
377 authors of the material; or
378
379 e) Declining to grant rights under trademark law for use of some
380 trade names, trademarks, or service marks; or
381
382 f) Requiring indemnification of licensors and authors of that
383 material by anyone who conveys the material (or modified versions of
384 it) with contractual assumptions of liability to the recipient, for
385 any liability that these contractual assumptions directly impose on
386 those licensors and authors.
387
388 All other non-permissive additional terms are considered "further
389restrictions" within the meaning of section 10. If the Program as you
390received it, or any part of it, contains a notice stating that it is
391governed by this License along with a term that is a further
392restriction, you may remove that term. If a license document contains
393a further restriction but permits relicensing or conveying under this
394License, you may add to a covered work material governed by the terms
395of that license document, provided that the further restriction does
396not survive such relicensing or conveying.
397
398 If you add terms to a covered work in accord with this section, you
399must place, in the relevant source files, a statement of the
400additional terms that apply to those files, or a notice indicating
401where to find the applicable terms.
402
403 Additional terms, permissive or non-permissive, may be stated in the
404form of a separately written license, or stated as exceptions;
405the above requirements apply either way.
406
407 8. Termination.
408
409 You may not propagate or modify a covered work except as expressly
410provided under this License. Any attempt otherwise to propagate or
411modify it is void, and will automatically terminate your rights under
412this License (including any patent licenses granted under the third
413paragraph of section 11).
414
415 However, if you cease all violation of this License, then your
416license from a particular copyright holder is reinstated (a)
417provisionally, unless and until the copyright holder explicitly and
418finally terminates your license, and (b) permanently, if the copyright
419holder fails to notify you of the violation by some reasonable means
420prior to 60 days after the cessation.
421
422 Moreover, your license from a particular copyright holder is
423reinstated permanently if the copyright holder notifies you of the
424violation by some reasonable means, this is the first time you have
425received notice of violation of this License (for any work) from that
426copyright holder, and you cure the violation prior to 30 days after
427your receipt of the notice.
428
429 Termination of your rights under this section does not terminate the
430licenses of parties who have received copies or rights from you under
431this License. If your rights have been terminated and not permanently
432reinstated, you do not qualify to receive new licenses for the same
433material under section 10.
434
435 9. Acceptance Not Required for Having Copies.
436
437 You are not required to accept this License in order to receive or
438run a copy of the Program. Ancillary propagation of a covered work
439occurring solely as a consequence of using peer-to-peer transmission
440to receive a copy likewise does not require acceptance. However,
441nothing other than this License grants you permission to propagate or
442modify any covered work. These actions infringe copyright if you do
443not accept this License. Therefore, by modifying or propagating a
444covered work, you indicate your acceptance of this License to do so.
445
446 10. Automatic Licensing of Downstream Recipients.
447
448 Each time you convey a covered work, the recipient automatically
449receives a license from the original licensors, to run, modify and
450propagate that work, subject to this License. You are not responsible
451for enforcing compliance by third parties with this License.
452
453 An "entity transaction" is a transaction transferring control of an
454organization, or substantially all assets of one, or subdividing an
455organization, or merging organizations. If propagation of a covered
456work results from an entity transaction, each party to that
457transaction who receives a copy of the work also receives whatever
458licenses to the work the party's predecessor in interest had or could
459give under the previous paragraph, plus a right to possession of the
460Corresponding Source of the work from the predecessor in interest, if
461the predecessor has it or can get it with reasonable efforts.
462
463 You may not impose any further restrictions on the exercise of the
464rights granted or affirmed under this License. For example, you may
465not impose a license fee, royalty, or other charge for exercise of
466rights granted under this License, and you may not initiate litigation
467(including a cross-claim or counterclaim in a lawsuit) alleging that
468any patent claim is infringed by making, using, selling, offering for
469sale, or importing the Program or any portion of it.
470
471 11. Patents.
472
473 A "contributor" is a copyright holder who authorizes use under this
474License of the Program or a work on which the Program is based. The
475work thus licensed is called the contributor's "contributor version".
476
477 A contributor's "essential patent claims" are all patent claims
478owned or controlled by the contributor, whether already acquired or
479hereafter acquired, that would be infringed by some manner, permitted
480by this License, of making, using, or selling its contributor version,
481but do not include claims that would be infringed only as a
482consequence of further modification of the contributor version. For
483purposes of this definition, "control" includes the right to grant
484patent sublicenses in a manner consistent with the requirements of
485this License.
486
487 Each contributor grants you a non-exclusive, worldwide, royalty-free
488patent license under the contributor's essential patent claims, to
489make, use, sell, offer for sale, import and otherwise run, modify and
490propagate the contents of its contributor version.
491
492 In the following three paragraphs, a "patent license" is any express
493agreement or commitment, however denominated, not to enforce a patent
494(such as an express permission to practice a patent or covenant not to
495sue for patent infringement). To "grant" such a patent license to a
496party means to make such an agreement or commitment not to enforce a
497patent against the party.
498
499 If you convey a covered work, knowingly relying on a patent license,
500and the Corresponding Source of the work is not available for anyone
501to copy, free of charge and under the terms of this License, through a
502publicly available network server or other readily accessible means,
503then you must either (1) cause the Corresponding Source to be so
504available, or (2) arrange to deprive yourself of the benefit of the
505patent license for this particular work, or (3) arrange, in a manner
506consistent with the requirements of this License, to extend the patent
507license to downstream recipients. "Knowingly relying" means you have
508actual knowledge that, but for the patent license, your conveying the
509covered work in a country, or your recipient's use of the covered work
510in a country, would infringe one or more identifiable patents in that
511country that you have reason to believe are valid.
512
513 If, pursuant to or in connection with a single transaction or
514arrangement, you convey, or propagate by procuring conveyance of, a
515covered work, and grant a patent license to some of the parties
516receiving the covered work authorizing them to use, propagate, modify
517or convey a specific copy of the covered work, then the patent license
518you grant is automatically extended to all recipients of the covered
519work and works based on it.
520
521 A patent license is "discriminatory" if it does not include within
522the scope of its coverage, prohibits the exercise of, or is
523conditioned on the non-exercise of one or more of the rights that are
524specifically granted under this License. You may not convey a covered
525work if you are a party to an arrangement with a third party that is
526in the business of distributing software, under which you make payment
527to the third party based on the extent of your activity of conveying
528the work, and under which the third party grants, to any of the
529parties who would receive the covered work from you, a discriminatory
530patent license (a) in connection with copies of the covered work
531conveyed by you (or copies made from those copies), or (b) primarily
532for and in connection with specific products or compilations that
533contain the covered work, unless you entered into that arrangement,
534or that patent license was granted, prior to 28 March 2007.
535
536 Nothing in this License shall be construed as excluding or limiting
537any implied license or other defenses to infringement that may
538otherwise be available to you under applicable patent law.
539
540 12. No Surrender of Others' Freedom.
541
542 If conditions are imposed on you (whether by court order, agreement or
543otherwise) that contradict the conditions of this License, they do not
544excuse you from the conditions of this License. If you cannot convey a
545covered work so as to satisfy simultaneously your obligations under this
546License and any other pertinent obligations, then as a consequence you may
547not convey it at all. For example, if you agree to terms that obligate you
548to collect a royalty for further conveying from those to whom you convey
549the Program, the only way you could satisfy both those terms and this
550License would be to refrain entirely from conveying the Program.
551
552 13. Use with the GNU Affero General Public License.
553
554 Notwithstanding any other provision of this License, you have
555permission to link or combine any covered work with a work licensed
556under version 3 of the GNU Affero General Public License into a single
557combined work, and to convey the resulting work. The terms of this
558License will continue to apply to the part which is the covered work,
559but the special requirements of the GNU Affero General Public License,
560section 13, concerning interaction through a network will apply to the
561combination as such.
562
563 14. Revised Versions of this License.
564
565 The Free Software Foundation may publish revised and/or new versions of
566the GNU General Public License from time to time. Such new versions will
567be similar in spirit to the present version, but may differ in detail to
568address new problems or concerns.
569
570 Each version is given a distinguishing version number. If the
571Program specifies that a certain numbered version of the GNU General
572Public License "or any later version" applies to it, you have the
573option of following the terms and conditions either of that numbered
574version or of any later version published by the Free Software
575Foundation. If the Program does not specify a version number of the
576GNU General Public License, you may choose any version ever published
577by the Free Software Foundation.
578
579 If the Program specifies that a proxy can decide which future
580versions of the GNU General Public License can be used, that proxy's
581public statement of acceptance of a version permanently authorizes you
582to choose that version for the Program.
583
584 Later license versions may give you additional or different
585permissions. However, no additional obligations are imposed on any
586author or copyright holder as a result of your choosing to follow a
587later version.
588
589 15. Disclaimer of Warranty.
590
591 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
600 16. Limitation of Liability.
601
602 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610SUCH DAMAGES.
611
612 17. Interpretation of Sections 15 and 16.
613
614 If the disclaimer of warranty and limitation of liability provided
615above cannot be given local legal effect according to their terms,
616reviewing courts shall apply local law that most closely approximates
617an absolute waiver of all civil liability in connection with the
618Program, unless a warranty or assumption of liability accompanies a
619copy of the Program in return for a fee.
620
621 END OF TERMS AND CONDITIONS
622
623 How to Apply These Terms to Your New Programs
624
625 If you develop a new program, and you want it to be of the greatest
626possible use to the public, the best way to achieve this is to make it
627free software which everyone can redistribute and change under these terms.
628
629 To do so, attach the following notices to the program. It is safest
630to attach them to the start of each source file to most effectively
631state the exclusion of warranty; and each file should have at least
632the "copyright" line and a pointer to where the full notice is found.
633
634 <one line to give the program's name and a brief idea of what it does.>
635 Copyright (C) <year> <name of author>
636
637 This program is free software: you can redistribute it and/or modify
638 it under the terms of the GNU General Public License as published by
639 the Free Software Foundation, either version 3 of the License, or
640 (at your option) any later version.
641
642 This program is distributed in the hope that it will be useful,
643 but WITHOUT ANY WARRANTY; without even the implied warranty of
644 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 GNU General Public License for more details.
646
647 You should have received a copy of the GNU General Public License
648 along with this program. If not, see <http://www.gnu.org/licenses/>.
649
650Also add information on how to contact you by electronic and paper mail.
651
652 If the program does terminal interaction, make it output a short
653notice like this when it starts in an interactive mode:
654
655 <program> Copyright (C) <year> <name of author>
656 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 This is free software, and you are welcome to redistribute it
658 under certain conditions; type `show c' for details.
659
660The hypothetical commands `show w' and `show c' should show the appropriate
661parts of the General Public License. Of course, your program's commands
662might be different; for a GUI interface, you would use an "about box".
663
664 You should also get your employer (if you work as a programmer) or school,
665if any, to sign a "copyright disclaimer" for the program, if necessary.
666For more information on this, and how to apply and follow the GNU GPL, see
667<http://www.gnu.org/licenses/>.
668
669 The GNU General Public License does not permit incorporating your program
670into proprietary programs. If your program is a subroutine library, you
671may consider it more useful to permit linking proprietary applications with
672the library. If this is what you want to do, use the GNU Lesser General
673Public License instead of this License. But first, please read
674<http://www.gnu.org/philosophy/why-not-lgpl.html>.
0675
=== added file 'Frogger/ChangeLog'
--- Frogger/ChangeLog 1970-01-01 00:00:00 +0000
+++ Frogger/ChangeLog 2010-03-12 10:44:17 +0000
@@ -0,0 +1,34 @@
1Frog Game 0.3:
2 * Renamed CHANGES to ChangeLog.
3 * Renamed LICENSE to COPYING.
4 * Added INSTALL file (to instruct on how to install on Linux).
5 * Removed setup-win.py and setup-mac.py and created a single setup.py file.
6 * Added Package 'lib' to handle shared logic.
7 * Added frog.game.desktop file.
8 * Changed color of "safe" spots on background.png
9
10Frog Game 0.2:
11 * Changed the objectives of the game to make the game more original.
12 * Changed game resolution to 800x600 instead of 600x800.
13 * Removed DOUBLEBUF and colour depth flags from display.
14 * Some general clean up and optimization of Frog Game.
15 * Fixed issues with font rendering (LP: #514236)
16 * You can now hold to move the Frog.
17
18Frog Game 0.1:
19 * Moved Game to Python, instead of C#.
20 * Support for Linux and Mac OS X in addition to Windows.
21 * Fixed issues with CPU usage.
22 * Difficulty increases every level now instead of every 5:
23 Still basic difficulty (speed increase only).
24 * Log size reduced to remove ability to slide from log to log on
25 same level.
26 * Balancing on log removed. Currently a single pixel on log will
27 be enough to prevent you from landing in water. (LP: #514564)
28 * New Menu/Exit Screen.
29 * New Font: Blooming Grove released under Public Domain by Jonadab
30 the Unsightly One (http://openfontlibrary.org/media/files/jonadab/414)
31
32Frog Game prototype:
33 * Initial prototype to test the game concepts.
34
035
=== added file 'Frogger/INSTALL'
--- Frogger/INSTALL 1970-01-01 00:00:00 +0000
+++ Frogger/INSTALL 2010-03-12 10:44:17 +0000
@@ -0,0 +1,5 @@
1install python pygame library ("python-pygame" on Debian/ubuntu) and run:
2
3 ./setup.py install
4
5Note 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.
06
=== removed file 'Frogger/LICENCE'
--- Frogger/LICENCE 2010-01-29 23:57:26 +0000
+++ Frogger/LICENCE 1970-01-01 00:00:00 +0000
@@ -1,674 +0,0 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The GNU General Public License is a free, copyleft license for
11software and other kinds of works.
12
13 The licenses for most software and other practical works are designed
14to take away your freedom to share and change the works. By contrast,
15the GNU General Public License is intended to guarantee your freedom to
16share and change all versions of a program--to make sure it remains free
17software for all its users. We, the Free Software Foundation, use the
18GNU General Public License for most of our software; it applies also to
19any other work released this way by its authors. You can apply it to
20your programs, too.
21
22 When we speak of free software, we are referring to freedom, not
23price. Our General Public Licenses are designed to make sure that you
24have the freedom to distribute copies of free software (and charge for
25them if you wish), that you receive source code or can get it if you
26want it, that you can change the software or use pieces of it in new
27free programs, and that you know you can do these things.
28
29 To protect your rights, we need to prevent others from denying you
30these rights or asking you to surrender the rights. Therefore, you have
31certain responsibilities if you distribute copies of the software, or if
32you modify it: responsibilities to respect the freedom of others.
33
34 For example, if you distribute copies of such a program, whether
35gratis or for a fee, you must pass on to the recipients the same
36freedoms that you received. You must make sure that they, too, receive
37or can get the source code. And you must show them these terms so they
38know their rights.
39
40 Developers that use the GNU GPL protect your rights with two steps:
41(1) assert copyright on the software, and (2) offer you this License
42giving you legal permission to copy, distribute and/or modify it.
43
44 For the developers' and authors' protection, the GPL clearly explains
45that there is no warranty for this free software. For both users' and
46authors' sake, the GPL requires that modified versions be marked as
47changed, so that their problems will not be attributed erroneously to
48authors of previous versions.
49
50 Some devices are designed to deny users access to install or run
51modified versions of the software inside them, although the manufacturer
52can do so. This is fundamentally incompatible with the aim of
53protecting users' freedom to change the software. The systematic
54pattern of such abuse occurs in the area of products for individuals to
55use, which is precisely where it is most unacceptable. Therefore, we
56have designed this version of the GPL to prohibit the practice for those
57products. If such problems arise substantially in other domains, we
58stand ready to extend this provision to those domains in future versions
59of the GPL, as needed to protect the freedom of users.
60
61 Finally, every program is threatened constantly by software patents.
62States should not allow patents to restrict development and use of
63software on general-purpose computers, but in those that do, we wish to
64avoid the special danger that patents applied to a free program could
65make it effectively proprietary. To prevent this, the GPL assures that
66patents cannot be used to render the program non-free.
67
68 The precise terms and conditions for copying, distribution and
69modification follow.
70
71 TERMS AND CONDITIONS
72
73 0. Definitions.
74
75 "This License" refers to version 3 of the GNU General Public License.
76
77 "Copyright" also means copyright-like laws that apply to other kinds of
78works, such as semiconductor masks.
79
80 "The Program" refers to any copyrightable work licensed under this
81License. Each licensee is addressed as "you". "Licensees" and
82"recipients" may be individuals or organizations.
83
84 To "modify" a work means to copy from or adapt all or part of the work
85in a fashion requiring copyright permission, other than the making of an
86exact copy. The resulting work is called a "modified version" of the
87earlier work or a work "based on" the earlier work.
88
89 A "covered work" means either the unmodified Program or a work based
90on the Program.
91
92 To "propagate" a work means to do anything with it that, without
93permission, would make you directly or secondarily liable for
94infringement under applicable copyright law, except executing it on a
95computer or modifying a private copy. Propagation includes copying,
96distribution (with or without modification), making available to the
97public, and in some countries other activities as well.
98
99 To "convey" a work means any kind of propagation that enables other
100parties to make or receive copies. Mere interaction with a user through
101a computer network, with no transfer of a copy, is not conveying.
102
103 An interactive user interface displays "Appropriate Legal Notices"
104to the extent that it includes a convenient and prominently visible
105feature that (1) displays an appropriate copyright notice, and (2)
106tells the user that there is no warranty for the work (except to the
107extent that warranties are provided), that licensees may convey the
108work under this License, and how to view a copy of this License. If
109the interface presents a list of user commands or options, such as a
110menu, a prominent item in the list meets this criterion.
111
112 1. Source Code.
113
114 The "source code" for a work means the preferred form of the work
115for making modifications to it. "Object code" means any non-source
116form of a work.
117
118 A "Standard Interface" means an interface that either is an official
119standard defined by a recognized standards body, or, in the case of
120interfaces specified for a particular programming language, one that
121is widely used among developers working in that language.
122
123 The "System Libraries" of an executable work include anything, other
124than the work as a whole, that (a) is included in the normal form of
125packaging a Major Component, but which is not part of that Major
126Component, and (b) serves only to enable use of the work with that
127Major Component, or to implement a Standard Interface for which an
128implementation is available to the public in source code form. A
129"Major Component", in this context, means a major essential component
130(kernel, window system, and so on) of the specific operating system
131(if any) on which the executable work runs, or a compiler used to
132produce the work, or an object code interpreter used to run it.
133
134 The "Corresponding Source" for a work in object code form means all
135the source code needed to generate, install, and (for an executable
136work) run the object code and to modify the work, including scripts to
137control those activities. However, it does not include the work's
138System Libraries, or general-purpose tools or generally available free
139programs which are used unmodified in performing those activities but
140which are not part of the work. For example, Corresponding Source
141includes interface definition files associated with source files for
142the work, and the source code for shared libraries and dynamically
143linked subprograms that the work is specifically designed to require,
144such as by intimate data communication or control flow between those
145subprograms and other parts of the work.
146
147 The Corresponding Source need not include anything that users
148can regenerate automatically from other parts of the Corresponding
149Source.
150
151 The Corresponding Source for a work in source code form is that
152same work.
153
154 2. Basic Permissions.
155
156 All rights granted under this License are granted for the term of
157copyright on the Program, and are irrevocable provided the stated
158conditions are met. This License explicitly affirms your unlimited
159permission to run the unmodified Program. The output from running a
160covered work is covered by this License only if the output, given its
161content, constitutes a covered work. This License acknowledges your
162rights of fair use or other equivalent, as provided by copyright law.
163
164 You may make, run and propagate covered works that you do not
165convey, without conditions so long as your license otherwise remains
166in force. You may convey covered works to others for the sole purpose
167of having them make modifications exclusively for you, or provide you
168with facilities for running those works, provided that you comply with
169the terms of this License in conveying all material for which you do
170not control copyright. Those thus making or running the covered works
171for you must do so exclusively on your behalf, under your direction
172and control, on terms that prohibit them from making any copies of
173your copyrighted material outside their relationship with you.
174
175 Conveying under any other circumstances is permitted solely under
176the conditions stated below. Sublicensing is not allowed; section 10
177makes it unnecessary.
178
179 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
181 No covered work shall be deemed part of an effective technological
182measure under any applicable law fulfilling obligations under article
18311 of the WIPO copyright treaty adopted on 20 December 1996, or
184similar laws prohibiting or restricting circumvention of such
185measures.
186
187 When you convey a covered work, you waive any legal power to forbid
188circumvention of technological measures to the extent such circumvention
189is effected by exercising rights under this License with respect to
190the covered work, and you disclaim any intention to limit operation or
191modification of the work as a means of enforcing, against the work's
192users, your or third parties' legal rights to forbid circumvention of
193technological measures.
194
195 4. Conveying Verbatim Copies.
196
197 You may convey verbatim copies of the Program's source code as you
198receive it, in any medium, provided that you conspicuously and
199appropriately publish on each copy an appropriate copyright notice;
200keep intact all notices stating that this License and any
201non-permissive terms added in accord with section 7 apply to the code;
202keep intact all notices of the absence of any warranty; and give all
203recipients a copy of this License along with the Program.
204
205 You may charge any price or no price for each copy that you convey,
206and you may offer support or warranty protection for a fee.
207
208 5. Conveying Modified Source Versions.
209
210 You may convey a work based on the Program, or the modifications to
211produce it from the Program, in the form of source code under the
212terms of section 4, provided that you also meet all of these conditions:
213
214 a) The work must carry prominent notices stating that you modified
215 it, and giving a relevant date.
216
217 b) The work must carry prominent notices stating that it is
218 released under this License and any conditions added under section
219 7. This requirement modifies the requirement in section 4 to
220 "keep intact all notices".
221
222 c) You must license the entire work, as a whole, under this
223 License to anyone who comes into possession of a copy. This
224 License will therefore apply, along with any applicable section 7
225 additional terms, to the whole of the work, and all its parts,
226 regardless of how they are packaged. This License gives no
227 permission to license the work in any other way, but it does not
228 invalidate such permission if you have separately received it.
229
230 d) If the work has interactive user interfaces, each must display
231 Appropriate Legal Notices; however, if the Program has interactive
232 interfaces that do not display Appropriate Legal Notices, your
233 work need not make them do so.
234
235 A compilation of a covered work with other separate and independent
236works, which are not by their nature extensions of the covered work,
237and which are not combined with it such as to form a larger program,
238in or on a volume of a storage or distribution medium, is called an
239"aggregate" if the compilation and its resulting copyright are not
240used to limit the access or legal rights of the compilation's users
241beyond what the individual works permit. Inclusion of a covered work
242in an aggregate does not cause this License to apply to the other
243parts of the aggregate.
244
245 6. Conveying Non-Source Forms.
246
247 You may convey a covered work in object code form under the terms
248of sections 4 and 5, provided that you also convey the
249machine-readable Corresponding Source under the terms of this License,
250in one of these ways:
251
252 a) Convey the object code in, or embodied in, a physical product
253 (including a physical distribution medium), accompanied by the
254 Corresponding Source fixed on a durable physical medium
255 customarily used for software interchange.
256
257 b) Convey the object code in, or embodied in, a physical product
258 (including a physical distribution medium), accompanied by a
259 written offer, valid for at least three years and valid for as
260 long as you offer spare parts or customer support for that product
261 model, to give anyone who possesses the object code either (1) a
262 copy of the Corresponding Source for all the software in the
263 product that is covered by this License, on a durable physical
264 medium customarily used for software interchange, for a price no
265 more than your reasonable cost of physically performing this
266 conveying of source, or (2) access to copy the
267 Corresponding Source from a network server at no charge.
268
269 c) Convey individual copies of the object code with a copy of the
270 written offer to provide the Corresponding Source. This
271 alternative is allowed only occasionally and noncommercially, and
272 only if you received the object code with such an offer, in accord
273 with subsection 6b.
274
275 d) Convey the object code by offering access from a designated
276 place (gratis or for a charge), and offer equivalent access to the
277 Corresponding Source in the same way through the same place at no
278 further charge. You need not require recipients to copy the
279 Corresponding Source along with the object code. If the place to
280 copy the object code is a network server, the Corresponding Source
281 may be on a different server (operated by you or a third party)
282 that supports equivalent copying facilities, provided you maintain
283 clear directions next to the object code saying where to find the
284 Corresponding Source. Regardless of what server hosts the
285 Corresponding Source, you remain obligated to ensure that it is
286 available for as long as needed to satisfy these requirements.
287
288 e) Convey the object code using peer-to-peer transmission, provided
289 you inform other peers where the object code and Corresponding
290 Source of the work are being offered to the general public at no
291 charge under subsection 6d.
292
293 A separable portion of the object code, whose source code is excluded
294from the Corresponding Source as a System Library, need not be
295included in conveying the object code work.
296
297 A "User Product" is either (1) a "consumer product", which means any
298tangible personal property which is normally used for personal, family,
299or household purposes, or (2) anything designed or sold for incorporation
300into a dwelling. In determining whether a product is a consumer product,
301doubtful cases shall be resolved in favor of coverage. For a particular
302product received by a particular user, "normally used" refers to a
303typical or common use of that class of product, regardless of the status
304of the particular user or of the way in which the particular user
305actually uses, or expects or is expected to use, the product. A product
306is a consumer product regardless of whether the product has substantial
307commercial, industrial or non-consumer uses, unless such uses represent
308the only significant mode of use of the product.
309
310 "Installation Information" for a User Product means any methods,
311procedures, authorization keys, or other information required to install
312and execute modified versions of a covered work in that User Product from
313a modified version of its Corresponding Source. The information must
314suffice to ensure that the continued functioning of the modified object
315code is in no case prevented or interfered with solely because
316modification has been made.
317
318 If you convey an object code work under this section in, or with, or
319specifically for use in, a User Product, and the conveying occurs as
320part of a transaction in which the right of possession and use of the
321User Product is transferred to the recipient in perpetuity or for a
322fixed term (regardless of how the transaction is characterized), the
323Corresponding Source conveyed under this section must be accompanied
324by the Installation Information. But this requirement does not apply
325if neither you nor any third party retains the ability to install
326modified object code on the User Product (for example, the work has
327been installed in ROM).
328
329 The requirement to provide Installation Information does not include a
330requirement to continue to provide support service, warranty, or updates
331for a work that has been modified or installed by the recipient, or for
332the User Product in which it has been modified or installed. Access to a
333network may be denied when the modification itself materially and
334adversely affects the operation of the network or violates the rules and
335protocols for communication across the network.
336
337 Corresponding Source conveyed, and Installation Information provided,
338in accord with this section must be in a format that is publicly
339documented (and with an implementation available to the public in
340source code form), and must require no special password or key for
341unpacking, reading or copying.
342
343 7. Additional Terms.
344
345 "Additional permissions" are terms that supplement the terms of this
346License by making exceptions from one or more of its conditions.
347Additional permissions that are applicable to the entire Program shall
348be treated as though they were included in this License, to the extent
349that they are valid under applicable law. If additional permissions
350apply only to part of the Program, that part may be used separately
351under those permissions, but the entire Program remains governed by
352this License without regard to the additional permissions.
353
354 When you convey a copy of a covered work, you may at your option
355remove any additional permissions from that copy, or from any part of
356it. (Additional permissions may be written to require their own
357removal in certain cases when you modify the work.) You may place
358additional permissions on material, added by you to a covered work,
359for which you have or can give appropriate copyright permission.
360
361 Notwithstanding any other provision of this License, for material you
362add to a covered work, you may (if authorized by the copyright holders of
363that material) supplement the terms of this License with terms:
364
365 a) Disclaiming warranty or limiting liability differently from the
366 terms of sections 15 and 16 of this License; or
367
368 b) Requiring preservation of specified reasonable legal notices or
369 author attributions in that material or in the Appropriate Legal
370 Notices displayed by works containing it; or
371
372 c) Prohibiting misrepresentation of the origin of that material, or
373 requiring that modified versions of such material be marked in
374 reasonable ways as different from the original version; or
375
376 d) Limiting the use for publicity purposes of names of licensors or
377 authors of the material; or
378
379 e) Declining to grant rights under trademark law for use of some
380 trade names, trademarks, or service marks; or
381
382 f) Requiring indemnification of licensors and authors of that
383 material by anyone who conveys the material (or modified versions of
384 it) with contractual assumptions of liability to the recipient, for
385 any liability that these contractual assumptions directly impose on
386 those licensors and authors.
387
388 All other non-permissive additional terms are considered "further
389restrictions" within the meaning of section 10. If the Program as you
390received it, or any part of it, contains a notice stating that it is
391governed by this License along with a term that is a further
392restriction, you may remove that term. If a license document contains
393a further restriction but permits relicensing or conveying under this
394License, you may add to a covered work material governed by the terms
395of that license document, provided that the further restriction does
396not survive such relicensing or conveying.
397
398 If you add terms to a covered work in accord with this section, you
399must place, in the relevant source files, a statement of the
400additional terms that apply to those files, or a notice indicating
401where to find the applicable terms.
402
403 Additional terms, permissive or non-permissive, may be stated in the
404form of a separately written license, or stated as exceptions;
405the above requirements apply either way.
406
407 8. Termination.
408
409 You may not propagate or modify a covered work except as expressly
410provided under this License. Any attempt otherwise to propagate or
411modify it is void, and will automatically terminate your rights under
412this License (including any patent licenses granted under the third
413paragraph of section 11).
414
415 However, if you cease all violation of this License, then your
416license from a particular copyright holder is reinstated (a)
417provisionally, unless and until the copyright holder explicitly and
418finally terminates your license, and (b) permanently, if the copyright
419holder fails to notify you of the violation by some reasonable means
420prior to 60 days after the cessation.
421
422 Moreover, your license from a particular copyright holder is
423reinstated permanently if the copyright holder notifies you of the
424violation by some reasonable means, this is the first time you have
425received notice of violation of this License (for any work) from that
426copyright holder, and you cure the violation prior to 30 days after
427your receipt of the notice.
428
429 Termination of your rights under this section does not terminate the
430licenses of parties who have received copies or rights from you under
431this License. If your rights have been terminated and not permanently
432reinstated, you do not qualify to receive new licenses for the same
433material under section 10.
434
435 9. Acceptance Not Required for Having Copies.
436
437 You are not required to accept this License in order to receive or
438run a copy of the Program. Ancillary propagation of a covered work
439occurring solely as a consequence of using peer-to-peer transmission
440to receive a copy likewise does not require acceptance. However,
441nothing other than this License grants you permission to propagate or
442modify any covered work. These actions infringe copyright if you do
443not accept this License. Therefore, by modifying or propagating a
444covered work, you indicate your acceptance of this License to do so.
445
446 10. Automatic Licensing of Downstream Recipients.
447
448 Each time you convey a covered work, the recipient automatically
449receives a license from the original licensors, to run, modify and
450propagate that work, subject to this License. You are not responsible
451for enforcing compliance by third parties with this License.
452
453 An "entity transaction" is a transaction transferring control of an
454organization, or substantially all assets of one, or subdividing an
455organization, or merging organizations. If propagation of a covered
456work results from an entity transaction, each party to that
457transaction who receives a copy of the work also receives whatever
458licenses to the work the party's predecessor in interest had or could
459give under the previous paragraph, plus a right to possession of the
460Corresponding Source of the work from the predecessor in interest, if
461the predecessor has it or can get it with reasonable efforts.
462
463 You may not impose any further restrictions on the exercise of the
464rights granted or affirmed under this License. For example, you may
465not impose a license fee, royalty, or other charge for exercise of
466rights granted under this License, and you may not initiate litigation
467(including a cross-claim or counterclaim in a lawsuit) alleging that
468any patent claim is infringed by making, using, selling, offering for
469sale, or importing the Program or any portion of it.
470
471 11. Patents.
472
473 A "contributor" is a copyright holder who authorizes use under this
474License of the Program or a work on which the Program is based. The
475work thus licensed is called the contributor's "contributor version".
476
477 A contributor's "essential patent claims" are all patent claims
478owned or controlled by the contributor, whether already acquired or
479hereafter acquired, that would be infringed by some manner, permitted
480by this License, of making, using, or selling its contributor version,
481but do not include claims that would be infringed only as a
482consequence of further modification of the contributor version. For
483purposes of this definition, "control" includes the right to grant
484patent sublicenses in a manner consistent with the requirements of
485this License.
486
487 Each contributor grants you a non-exclusive, worldwide, royalty-free
488patent license under the contributor's essential patent claims, to
489make, use, sell, offer for sale, import and otherwise run, modify and
490propagate the contents of its contributor version.
491
492 In the following three paragraphs, a "patent license" is any express
493agreement or commitment, however denominated, not to enforce a patent
494(such as an express permission to practice a patent or covenant not to
495sue for patent infringement). To "grant" such a patent license to a
496party means to make such an agreement or commitment not to enforce a
497patent against the party.
498
499 If you convey a covered work, knowingly relying on a patent license,
500and the Corresponding Source of the work is not available for anyone
501to copy, free of charge and under the terms of this License, through a
502publicly available network server or other readily accessible means,
503then you must either (1) cause the Corresponding Source to be so
504available, or (2) arrange to deprive yourself of the benefit of the
505patent license for this particular work, or (3) arrange, in a manner
506consistent with the requirements of this License, to extend the patent
507license to downstream recipients. "Knowingly relying" means you have
508actual knowledge that, but for the patent license, your conveying the
509covered work in a country, or your recipient's use of the covered work
510in a country, would infringe one or more identifiable patents in that
511country that you have reason to believe are valid.
512
513 If, pursuant to or in connection with a single transaction or
514arrangement, you convey, or propagate by procuring conveyance of, a
515covered work, and grant a patent license to some of the parties
516receiving the covered work authorizing them to use, propagate, modify
517or convey a specific copy of the covered work, then the patent license
518you grant is automatically extended to all recipients of the covered
519work and works based on it.
520
521 A patent license is "discriminatory" if it does not include within
522the scope of its coverage, prohibits the exercise of, or is
523conditioned on the non-exercise of one or more of the rights that are
524specifically granted under this License. You may not convey a covered
525work if you are a party to an arrangement with a third party that is
526in the business of distributing software, under which you make payment
527to the third party based on the extent of your activity of conveying
528the work, and under which the third party grants, to any of the
529parties who would receive the covered work from you, a discriminatory
530patent license (a) in connection with copies of the covered work
531conveyed by you (or copies made from those copies), or (b) primarily
532for and in connection with specific products or compilations that
533contain the covered work, unless you entered into that arrangement,
534or that patent license was granted, prior to 28 March 2007.
535
536 Nothing in this License shall be construed as excluding or limiting
537any implied license or other defenses to infringement that may
538otherwise be available to you under applicable patent law.
539
540 12. No Surrender of Others' Freedom.
541
542 If conditions are imposed on you (whether by court order, agreement or
543otherwise) that contradict the conditions of this License, they do not
544excuse you from the conditions of this License. If you cannot convey a
545covered work so as to satisfy simultaneously your obligations under this
546License and any other pertinent obligations, then as a consequence you may
547not convey it at all. For example, if you agree to terms that obligate you
548to collect a royalty for further conveying from those to whom you convey
549the Program, the only way you could satisfy both those terms and this
550License would be to refrain entirely from conveying the Program.
551
552 13. Use with the GNU Affero General Public License.
553
554 Notwithstanding any other provision of this License, you have
555permission to link or combine any covered work with a work licensed
556under version 3 of the GNU Affero General Public License into a single
557combined work, and to convey the resulting work. The terms of this
558License will continue to apply to the part which is the covered work,
559but the special requirements of the GNU Affero General Public License,
560section 13, concerning interaction through a network will apply to the
561combination as such.
562
563 14. Revised Versions of this License.
564
565 The Free Software Foundation may publish revised and/or new versions of
566the GNU General Public License from time to time. Such new versions will
567be similar in spirit to the present version, but may differ in detail to
568address new problems or concerns.
569
570 Each version is given a distinguishing version number. If the
571Program specifies that a certain numbered version of the GNU General
572Public License "or any later version" applies to it, you have the
573option of following the terms and conditions either of that numbered
574version or of any later version published by the Free Software
575Foundation. If the Program does not specify a version number of the
576GNU General Public License, you may choose any version ever published
577by the Free Software Foundation.
578
579 If the Program specifies that a proxy can decide which future
580versions of the GNU General Public License can be used, that proxy's
581public statement of acceptance of a version permanently authorizes you
582to choose that version for the Program.
583
584 Later license versions may give you additional or different
585permissions. However, no additional obligations are imposed on any
586author or copyright holder as a result of your choosing to follow a
587later version.
588
589 15. Disclaimer of Warranty.
590
591 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
600 16. Limitation of Liability.
601
602 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610SUCH DAMAGES.
611
612 17. Interpretation of Sections 15 and 16.
613
614 If the disclaimer of warranty and limitation of liability provided
615above cannot be given local legal effect according to their terms,
616reviewing courts shall apply local law that most closely approximates
617an absolute waiver of all civil liability in connection with the
618Program, unless a warranty or assumption of liability accompanies a
619copy of the Program in return for a fee.
620
621 END OF TERMS AND CONDITIONS
622
623 How to Apply These Terms to Your New Programs
624
625 If you develop a new program, and you want it to be of the greatest
626possible use to the public, the best way to achieve this is to make it
627free software which everyone can redistribute and change under these terms.
628
629 To do so, attach the following notices to the program. It is safest
630to attach them to the start of each source file to most effectively
631state the exclusion of warranty; and each file should have at least
632the "copyright" line and a pointer to where the full notice is found.
633
634 <one line to give the program's name and a brief idea of what it does.>
635 Copyright (C) <year> <name of author>
636
637 This program is free software: you can redistribute it and/or modify
638 it under the terms of the GNU General Public License as published by
639 the Free Software Foundation, either version 3 of the License, or
640 (at your option) any later version.
641
642 This program is distributed in the hope that it will be useful,
643 but WITHOUT ANY WARRANTY; without even the implied warranty of
644 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 GNU General Public License for more details.
646
647 You should have received a copy of the GNU General Public License
648 along with this program. If not, see <http://www.gnu.org/licenses/>.
649
650Also add information on how to contact you by electronic and paper mail.
651
652 If the program does terminal interaction, make it output a short
653notice like this when it starts in an interactive mode:
654
655 <program> Copyright (C) <year> <name of author>
656 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 This is free software, and you are welcome to redistribute it
658 under certain conditions; type `show c' for details.
659
660The hypothetical commands `show w' and `show c' should show the appropriate
661parts of the General Public License. Of course, your program's commands
662might be different; for a GUI interface, you would use an "about box".
663
664 You should also get your employer (if you work as a programmer) or school,
665if any, to sign a "copyright disclaimer" for the program, if necessary.
666For more information on this, and how to apply and follow the GNU GPL, see
667<http://www.gnu.org/licenses/>.
668
669 The GNU General Public License does not permit incorporating your program
670into proprietary programs. If your program is a subroutine library, you
671may consider it more useful to permit linking proprietary applications with
672the library. If this is what you want to do, use the GNU Lesser General
673Public License instead of this License. But first, please read
674<http://www.gnu.org/philosophy/why-not-lgpl.html>.
6750
=== modified file 'Frogger/README'
--- Frogger/README 2010-01-29 23:57:26 +0000
+++ Frogger/README 2010-03-12 10:44:17 +0000
@@ -1,49 +1,69 @@
1Frog Game is (C) Daniel Bell <daniel.bell@saraclan.com>, 2009-2010.1Copyright (C) 2009, 2010 Daniel Bell <daniel.bell@saraclan.com>
22
3About:3BACKGROUND:
44Frog Game is a fun survival/rescue game loosely based upon the awesome arcade game: Frogger.
5Frog Game is a fun survival game based upon the awesome arcade game: Frogger.5
6This game was originally created by Daniel Bell as a University project for a first year module in 2009.6This game was originally created by as a University project for a module in the first year.
7It was created using Visual Studio 2008 and the objective was to create a prototype game, 7It was created using Visual Studio 2008 and the objective was to create a prototype game,
8after the module I decided that I actually wanted to convert the prototype into an actual game8to demonstrate the game concepts of the design to the class. After completing the module
9that people can run on all platforms (Linux, Mac OSX and Windows).9I decided that I actually wanted to play this game on my system. (Visual Studio creates
10windows applications, and since I use Linux and Mac OSX the version created by Visual
11Studio was not suitable). Frog Game is now using Python as its platform and uses the
12pygame library (http://pygame.org). As a result Frog Game now has support on Windows,
13Linux and Mac OSX - and any other operating system where python and pygame are supported).
1014
11You can find more information about the prototype version of Frog Game:15The following links have more information about the prototype version of Frog Game:
12 * http://saraclan.com/portfolio/project/Frogger16 * http://saraclan.com/portfolio/project/Frogger (My Portfolio - holding details of the project)
13 * http://git.saraclan.com/index.php?p=frogger.git17 * http://git.saraclan.com/index.php?p=frogger.git (GIT repository of the prototype)
1418
15Information about the current project can be found here:19Information about the current project can be found here:
16 * https://launchpad.net/frogger20 * https://launchpad.net/frogger
1721
18Artwork:22GAME OBJECTIVES:
1923The objectives of Frog Game are to rescue the lost baby frogs and to get them home safe!
20The artwork of frog game was created by Daniel Bell (C) 2009-2010.24
2125As a player you control the Big Frog and it is your job to collect the frogs one at a time
22Game Code:26and bring them back to the start. Avoiding the obstacles and hazards on the way is essential
2327for maximum point scoring as when you die the frog you were rescuing dies also.
24The game code for Frog Game was written by Daniel Bell (C) 2009-2010.28
25Frog Game is a python application and utilises the pygame library (http://pygame.org) - LGPLv2 licenced.29The scoring system takes into account how fast it took you to rescue the baby frog and
26Frog 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.30your past deaths (if any).
2731
28Running the game:32A new level begins when there are no baby frogs left to save and you have at least 1 life still
2933remaining.
30To run this game, you require a version of Python (http://python.org) of at least 2.5 or 2.6 (other versions may work,34
31but 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, but35ARTWORK:
32cannot be supported.)36The artwork of frog game was created by Daniel Bell Copyright (C) 2009, 2010.
3337
34You can run this game via the command-line by running the following command: python frogger.py38RUNNING FROM SOURCE:
35You can also right click the frogger.py script and open it with the Python Interpreter.39Frog Game has the following dependencies:
3640 * Python - 2.5+ (Tested it on 2.5 and 2.6 - lower versions may be supported)
37There are intallers and binaries available at http://launchpad.net/frogger41 * Pygame library - 1.9+ (Tested it on 1.9.1 - lower versions may be supported)
3842
39Game Licence:43On Windows:
4044 Right click frogger.py and select "open with Python Interpreter".
41Frog Game is licenced under the GNU General Public Licence v3. More details can be found in the LICENCE file45 Double clicking may automatically run the game code.
42if you did not recieve a LICENCE file, you can find more information at the Free Software Foundations website:46On Mac:
43http://www.gnu.org/licenses/gpl-3.0.txt47 Right click and in the Open With menu select Python Launcher
4448On Linux:
45Game Dependencies:49 Using the terminal navigate to the folder containing the source code and run
4650 this command: "python frogger.py"
47As mentioned above, the dependancies for Frog Game are: Python 2.5 or greater, and Pygame 1.9.1.51
48Python can be found at: http://python.org52There are installers and binaries available at http://launchpad.net/frogger
49Pygame can be found at: http://pygame.org53
54LICENSE:
55Frog Game is licensed under the GNU General Public License v3. More details can be found
56in the LICENSE file. If you did not receive a LICENSE file, you can find more information
57at the Free Software Foundations website: http://www.gnu.org/licenses/gpl-3.0.txt
58
59CONTRIBUTING:
60You can help the project in many ways through either submitting art, feature requests, fixing bugs
61and so on. Please see our launchpad project page: https://launchpad.net/frogger and contact
62daniel.bell@saraclan.com
63
64SUPPORT:
65If you come across any issues or abnormalities with Frog Game support is available on our
66launchpad page: https://launchpad.net/frogger on our launchpad page you can file bugs and
67ask questions.
68
69Please don't hesitate to report bugs or ask questions on even the most trivial of issues.
5070
=== removed file 'Frogger/data/fonts/bgrovealtb.ttf'
51Binary 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 differ71Binary 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
=== added file 'Frogger/data/fonts/nibby.ttf'
52Binary 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 differ72Binary 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
=== added file 'Frogger/data/frog-game.desktop'
--- Frogger/data/frog-game.desktop 1970-01-01 00:00:00 +0000
+++ Frogger/data/frog-game.desktop 2010-03-12 10:44:17 +0000
@@ -0,0 +1,10 @@
1#!/usr/bin/env xdg-open
2
3[Desktop Entry]
4Name=Frog Game
5Comment=Fun survival/rescue game!
6Exec=frogger
7Icon=frog-game
8Terminal=false
9Type=Application
10Categories=Game;ArcadeGame;
011
=== added directory 'Frogger/data/icons'
=== added directory 'Frogger/data/icons/16x16'
=== added file 'Frogger/data/icons/16x16/frog-game.png'
1Binary 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 differ12Binary 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
=== added directory 'Frogger/data/icons/22x22'
=== added file 'Frogger/data/icons/22x22/frog-game.png'
2Binary 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 differ13Binary 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
=== added directory 'Frogger/data/icons/24x24'
=== added file 'Frogger/data/icons/24x24/frog-game.png'
3Binary 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 differ14Binary 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
=== added directory 'Frogger/data/icons/48x48'
=== added file 'Frogger/data/icons/48x48/frog-game.png'
4Binary 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 differ15Binary 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
=== added file 'Frogger/data/icons/frog-game.icns'
5Binary 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 differ16Binary 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
=== added file 'Frogger/data/icons/frog-game.ico'
6Binary 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 differ17Binary 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
=== added directory 'Frogger/data/icons/scalable'
=== added file 'Frogger/data/icons/scalable/frog-game.svg'
--- Frogger/data/icons/scalable/frog-game.svg 1970-01-01 00:00:00 +0000
+++ Frogger/data/icons/scalable/frog-game.svg 2010-03-12 10:44:17 +0000
@@ -0,0 +1,68 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:xlink="http://www.w3.org/1999/xlink"
11 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13 id="svg2"
14 version="1.1"
15 inkscape:version="0.47 r22583"
16 width="20"
17 height="17"
18 sodipodi:docname="life.gif">
19 <metadata
20 id="metadata8">
21 <rdf:RDF>
22 <cc:Work
23 rdf:about="">
24 <dc:format>image/svg+xml</dc:format>
25 <dc:type
26 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
27 <dc:title></dc:title>
28 </cc:Work>
29 </rdf:RDF>
30 </metadata>
31 <defs
32 id="defs6">
33 <inkscape:perspective
34 sodipodi:type="inkscape:persp3d"
35 inkscape:vp_x="0 : 0.5 : 1"
36 inkscape:vp_y="0 : 1000 : 0"
37 inkscape:vp_z="1 : 0.5 : 1"
38 inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
39 id="perspective10" />
40 </defs>
41 <sodipodi:namedview
42 pagecolor="#ffffff"
43 bordercolor="#666666"
44 borderopacity="1"
45 objecttolerance="10"
46 gridtolerance="10"
47 guidetolerance="10"
48 inkscape:pageopacity="0"
49 inkscape:pageshadow="2"
50 inkscape:window-width="640"
51 inkscape:window-height="487"
52 id="namedview4"
53 showgrid="false"
54 inkscape:zoom="13.882353"
55 inkscape:cx="10"
56 inkscape:cy="8.5"
57 inkscape:window-x="0"
58 inkscape:window-y="25"
59 inkscape:window-maximized="0"
60 inkscape:current-layer="svg2" />
61 <image
62 xlink:href="file:///home/dbell/Documents/frog-game-0.2.0/life.gif"
63 width="20"
64 height="17"
65 id="image12"
66 x="0"
67 y="0" />
68</svg>
069
=== modified file 'Frogger/data/images/background.png' (properties changed: +x to -x)
1Binary 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 differ70Binary 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
=== modified file 'Frogger/data/images/betterfrog.gif'
2Binary 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 differ71Binary 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
=== added file 'Frogger/data/images/frogcarry.gif'
3Binary 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 differ72Binary 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
=== modified file 'Frogger/data/images/log.gif'
4Binary 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 differ73Binary 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
=== added file 'Frogger/frogger'
--- Frogger/frogger 1970-01-01 00:00:00 +0000
+++ Frogger/frogger 2010-03-12 10:44:17 +0000
@@ -0,0 +1,561 @@
1#!/usr/bin/env python
2
3###BEGIN LICENSE
4# Copyright (C) 2010 Daniel Bell <daniel.bell@saraclan.com>
5#
6#This program is free software: you can redistribute it and/or modify it
7#under the terms of the GNU General Public License version 3, as published
8#by the Free Software Foundation.
9#
10#This program is distributed in the hope that it will be useful, but
11#WITHOUT ANY WARRANTY; without even the implied warranties of
12#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13#PURPOSE. See the GNU General Public License for more details.
14#
15#You should have received a copy of the GNU General Public License along
16#with this program. If not, see <http://www.gnu.org/licenses/>.
17### END LICENSE
18
19import os
20import pygame
21from pygame.locals import *
22import sys
23import time
24
25from lib.sprites import (Leftcar, Rightcar, Homefrog, Log, Life, Frog)
26from lib.engine import *
27
28#Declare global variables:
29global screen
30global resolution #,display_flag, color_depth
31global caption, logo
32global clock
33global level, speed
34global font
35
36resolution = (800,600)
37#display_flag = DOUBLEBUF
38#color_depth = 32
39caption = "Frog Game"
40logo = "data/images/life.gif"
41
42clock = pygame.time.Clock()
43
44level = 1
45
46#Travel speed - logs and cars.
47#Unit is pixels? Remember game runs at 30 fps, so each second unit travels speed*30
48speed = 4
49
50#Initialize pygame, and setup the screen, captions and logo.
51#TODO: Find out if logo actually works in binaries.
52pygame.init()
53pygame.display.set_caption(caption)
54pygame.display.set_icon(pygame.image.load(logo))
55#No longer specifying flag and depth, not required
56#and could restrict the portability of the game by limiting devices.
57screen = pygame.display.set_mode(resolution)
58
59def main():
60 """Main function - handles logic to act out the game.
61 Calls menu() to display the game menu
62 """
63 #Call menu() to display menu to allow game to be played.
64 menu()
65
66def instructions():
67 """ Instruction Screen: call this when you want to display how to play the game
68 """
69 screen = pygame.display.set_mode(resolution)
70
71 #Print text to the screen.
72 font_write("INSTRUCTIONS", 72, True, (0, 0, 255), 0, (150, 100), screen)
73
74 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)
75
76 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)
77 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)
78 font_write("the obstacles and hazards on the way is essential for maximum point", 18, True, (0, 0, 255), 0, (110, 260), screen)
79 font_write("scoring as when you die the frog you were rescuing dies also.", 18, True, (0, 0, 255), 0, (110, 280), screen)
80
81 font_write("The scoring system takes into account how fast it took you to", 18, True, (0, 0, 255), 0, (110, 320), screen)
82 font_write("rescue the baby frog and your past deaths (if any).", 18, True, (0, 0, 255), 0, (110, 340), screen)
83
84 font_write("A new level begins when there are no baby frogs left to save", 18, True, (0, 0, 255), 0, (110, 380), screen)
85 font_write("and you have at least 1 life still remaining.", 18, True, (0, 0, 255), 0, (110, 400), screen)
86
87 font_write("Press <SPACE> to return to Menu", 24, True, (0, 0, 255), 0, (200, 500), screen)
88 font_write("ESC to exit", 18, True, (0, 0, 255), 0, (0, 0), screen)
89
90 pygame.display.flip() #update display - just once not in loop.
91 #Main loop:
92 while 1:
93 #Were looking for certain events only within the game over menu.
94 #ESC or mouse-clicking the 'X' to exit the game
95 #SPACEBAR to start a new game.
96 for event in pygame.event.get():
97 if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
98 sys.exit()
99 if event.type == KEYDOWN and event.key == K_SPACE:
100 menu()
101
102 #We need to ensure game is limited to 30FPS in order to control CPU
103 clock.tick(30)
104
105def game_over_screen(score):
106 """ This method is called when you wish to display the Game Over Screen.
107 Clears the screen and prints data about the past game: score, level
108 and a way to exit or start a new game.
109
110 :param score: The score the player achieved before Game Over.
111 :type score: ``int``
112 :param level: The level the player achieved.
113 :type level: ``int``
114 """
115
116 #Clear the screen so that it can be printed on.
117 screen = pygame.display.set_mode(resolution)
118
119 #Print text to the screen.
120 font_write("GAME OVER", 72, True, (0, 0, 255), 0, (210, 100), screen)
121 font_write("You Scored " + str(score) + " points!", 28, True, (0, 0, 255), 0, (230, 180), screen)
122 font_write("Highest level achieved: " + str(level), 28, True, (0, 0, 255), 0, (230, 210), screen)
123 font_write("Press <SPACE> to Start a New Game", 24, True, (0, 0, 255), 0, (200, 500), screen)
124 font_write("ESC to exit", 18, True, (0, 0, 255), 0, (0, 0), screen)
125
126 pygame.display.flip() #update display - just once not in loop.
127 #Main loop:
128 while 1:
129 #Were looking for certain events only within the game over menu.
130 #ESC or mouse-clicking the 'X' to exit the game
131 #SPACEBAR to start a new game.
132 for event in pygame.event.get():
133 if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
134 sys.exit()
135 if event.type == KEYDOWN and event.key == K_SPACE:
136 game()
137
138 #We need to ensure game is limited to 30FPS in order to control CPU
139 clock.tick(30)
140
141def menu():
142 """ This method is called when you wish to display the STARTUP menu.
143 This menu is the entry point to the game, it contains logic that
144 allows the player to play the game, exit (and so on).
145 """
146 #Clear screen.
147 screen = pygame.display.set_mode(resolution)
148
149 #Print text to screen.
150 font_write("FROG GAME", 72, True, (0, 0, 255), 0, (210, 200), screen)
151 font_write("Welcome To", 32, True, (0, 0, 255), 0, (305, 175), screen)
152 font_write("Press <I> for Instructions", 24, True, (0, 0, 255), 0, (240, 480), screen)
153 font_write("Press <SPACE> to Continue", 24, True, (0, 0, 255), 0, (247, 500), screen)
154 font_write("ESC to exit", 18, True, (0, 0, 255), 0, (0, 0), screen)
155
156 pygame.display.flip()
157 #Main loop:
158 while 1:
159 for event in pygame.event.get():
160 if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
161 sys.exit()
162 if event.type == KEYDOWN and event.key == K_SPACE:
163 game()
164 if event.type ==KEYDOWN and event.key == K_i:
165 instructions()
166
167 clock.tick(30)
168
169def game():
170 #starting game needs to be on level 1.
171 global level, speed
172 level =1
173 speed = 4
174 """ This method contains all the logic for the actual game.
175 This is to be called when the player wants to play the game.
176 """
177 #Clear screen.
178 screen = pygame.display.set_mode(resolution)
179
180 #Setup the background.
181 backgroundImage = 'data/images/background.png'
182 background = pygame.image.load(backgroundImage).convert()
183 screen.blit(background, (0,0))
184 pygame.display.update()
185
186 #Create player character.
187 player = Frog()
188
189 #Create the cars that travel in the left direction.
190 leftcars = [
191 Leftcar(0, 285),
192 Leftcar(280, 285),
193 Leftcar(560, 285),
194 Leftcar(100, 375),
195 Leftcar(380, 375),
196 Leftcar(660, 375),
197 ]
198 #Create the cars that travel right direction.
199 rightcars = [
200 Rightcar(200, 330),
201 Rightcar(480, 330),
202 Rightcar(760, 330),
203 Rightcar(60, 420),
204 Rightcar(300, 420),
205 Rightcar(580, 420),
206 ]
207 #Create babyfrogs
208 babyfrogs = [
209 Homefrog(30, 15),
210 Homefrog(258,15),
211 Homefrog(482,15),
212 Homefrog(720,15),
213 ]
214 #Create logs that travel left.
215 leftlogs = [
216 Log(0, 60),
217 Log(234, 60),
218 Log(468, 60),
219 Log(702, 60),
220 Log(0, 150),
221 Log(234, 150),
222 Log(468, 150),
223 Log(702, 150),
224 ]
225 #Create logs that travel right.
226 rightlogs = [
227 Log(0, 105),
228 Log(234, 105),
229 Log(468, 105),
230 Log(702, 105),
231 Log(0, 195),
232 Log(234, 195),
233 Log(468, 195),
234 Log(702, 195),
235 ]
236 #Create life images.
237 lives = [
238 Life(10, 570),
239 Life(38, 570),
240 Life(66, 570),
241 ]
242
243 #Create sprite group - all.
244 #Using pygame.sprite.OirderedUpdates instead of RenderedUpdates
245 #There is a small performance decrease for using this, but required
246 #to allow frogs to be on top of logs.
247 all = pygame.sprite.OrderedUpdates(
248 leftlogs, rightlogs, player, leftcars, rightcars, babyfrogs, lives)
249
250 #Print level, and score/information on screen.
251 font_write("Level: " +str(level) + " ", 34, True, (0, 0, 255), (0, 0, 0), (3, 510), screen)
252 print_score_data(player.score, player.perfect_score, player.good_score)
253
254 pygame.key.set_repeat(100)
255 #Main loop: (GAME LOOP).
256 while 1:
257
258 #Get input
259 for event in pygame.event.get():
260 if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
261 sys.exit()
262 #Only allow player movement if game is not over - not tech required:
263 #as when its game over a new screen is displayed.
264 #For each movement - reset on_left_log and on_right_log to False
265 #so that there is never a way you could have some ghost movement of the player.
266 if player.game_over != True:
267 if event.type == KEYDOWN and event.key == K_UP:
268 player.rect.top -= 45
269 player.on_left_log = False
270 player.on_right_log = False
271 for frog in babyfrogs:
272 if frog.rect.colliderect(player.rect) and player.collecting ==True:
273 player.rect.top +=45
274 if event.type == KEYDOWN and event.key == K_DOWN:
275 player.rect.top += 45
276 player.on_left_log = False
277 player.on_right_log = False
278 for frog in babyfrogs:
279 if frog.rect.colliderect(player.rect) and player.collecting ==True:
280 player.rect.top -=45
281 if event.type == KEYDOWN and event.key == K_LEFT:
282 player.rect.left -= 20
283 player.on_left_log = False
284 player.on_right_log = False
285 for frog in babyfrogs:
286 if frog.rect.colliderect(player.rect) and player.collecting ==True:
287 player.rect.left +=20
288 if event.type == KEYDOWN and event.key == K_RIGHT:
289 player.rect.left += 20
290 player.on_left_log = False
291 player.on_right_log = False
292 for frog in babyfrogs:
293 if frog.rect.colliderect(player.rect) and player.collecting ==True:
294 player.rect.left -=20
295
296 #move objects
297
298 #Move the left cars:
299 for car in leftcars:
300 if car.rect.right <=0:
301 car.rect.left = 800
302 else:
303 car.rect.left -= speed
304 #Die if they collide
305 if car.rect.colliderect(player.rect):
306 player_died(player, babyfrogs)
307 print_score_data(player.score, player.perfect_score, player.good_score)
308
309 #Move the right cars:
310 for car in rightcars:
311 if car.rect.left >=800:
312 car.rect.right = 0
313 else:
314 car.rect.left += speed
315 #player dies if they collide
316 if car.rect.colliderect(player.rect):
317 player_died(player, babyfrogs)
318 print_score_data(player.score, player.perfect_score, player.good_score)
319
320 #Move the left logs:
321 for log in leftlogs:
322 if log.rect.right <=0:
323 log.rect.left = 800
324 else:
325 log.rect.left -=speed
326 #if log collides, set player variable on_left_log to True.
327 if log.rect.colliderect(player.rect):
328 player.on_left_log = True
329
330 #Move the right logs:
331 for log in rightlogs:
332 if log.rect.left >=800:
333 log.rect.right = 0
334 else:
335 log.rect.left +=speed
336 #If right logs collides with frog, set player variable on_right_log to True.
337 if log.rect.colliderect(player.rect):
338 player.on_right_log = True
339
340 #Check if the player picks up a frog:
341 #Set player variables: collecting to True, and collecting_number to babyfrog picked up.
342 #Hide the frog from view.
343 for frog in range(len(babyfrogs)):
344 if babyfrogs[frog].rect.colliderect(player.rect):
345 if player.collecting == False:
346 player.collecting = True
347 player.collecting_number = frog
348 babyfrogs[frog].collected = True
349 babyfrogs[frog].rect.left = -100
350 babyfrogs[frog].rect.top = -100
351 player.carry_frog(player.rect.left, player.rect.top)
352
353 #Water Area: if the frog is in between these positions
354 #the frog must be on a log to survive.
355 #if frog is on a log, then the system needs to automate the movement.
356 if player.rect.top <=195 and player.rect.top >=40:
357 if player.on_left_log == True:
358 player.rect.left -=speed
359 elif player.on_right_log == True:
360 player.rect.left +=speed
361 #Not on a log: die and update.
362 else:
363 player_died(player, babyfrogs)
364 print_score_data(player.score, player.perfect_score, player.good_score)
365
366 #When its game over - display a game over screen.
367 if player.game_over:
368 game_over_screen(player.score)
369
370 #Handle the positioning of life icons.
371 if player.lives == 2:
372 lives[2].rect.left = -50
373 if player.lives == 1:
374 lives[1].rect.left = -50
375
376 #If all babyfrogs are saved, then start a new level :)
377 if babyfrogs[0].saved == True:
378 if babyfrogs[1].saved == True:
379 if babyfrogs[2].saved == True:
380 if babyfrogs[3].saved == True:
381 new_level(player, babyfrogs, lives)
382
383
384 #Clear sprite
385 all.clear(screen, background)
386
387 #Update sprites
388 all.update()
389 player_boundaries(player, babyfrogs)
390
391 #Redraw sprites
392 all.draw(screen)
393 pygame.display.flip()
394
395 #Maintain frame rate
396 #using 30 FPS
397 clock.tick(30)
398
399def print_score_data(score, perfect, good, time=None):
400 """This method is used to print Score details to the screen.
401 It prints score and the current score modifier.
402 :param score: The players score
403 :param type: ``int``
404 :param perfect: value of players perfectScore
405 :param type: ``boolean``
406 :param good: value of players goodScore
407 :param type: ``boolean``
408 :param time: time taken to score
409 :param type: ``int``
410 """
411 #Print to screen.
412 font_write("Score: " +str(score) + " ", 28, True, (0, 0, 255), (0, 0, 0), (3, 540), screen)
413 if perfect:
414 font_write("Score Modifier: x3 ", 28, True, (0, 0, 255), (0, 0, 0), (535, 510), screen)
415 elif good:
416 font_write("Score Modifier: x2 ", 28, True, (0, 0, 255), (0, 0, 0), (535, 510), screen)
417 else:
418 font_write("Score Modifier: x1 ", 28, True, (0, 0, 255), (0, 0, 0), (535, 510), screen)
419 if time!=None:
420 font_write(
421 "Last Frog saved in: " +str(time) + " seconds! ", 28, True, (0, 0, 255),
422 (0, 0, 0), (380, 550), screen)
423
424def player_died(player, babyfrogs):
425 """This method should be called if when the player died and acts out everything that is
426 required to happen when a player dies: loosing of lives, ensuring babyfrog goes back correctly
427 and so on.
428 :param player: The player
429 :param type: ``Frog`` - send through an instance of Frog Class.
430 :param babyfrogs: The babyfrogs
431 :param type: ``Homefrog`` - send through an instance of Homefrog Class.
432 """
433 #Reset timer
434 player.startTime = time.time()
435 #if we die, then the frog we hold needs to be reset.
436 babyfrog_reset(babyfrogs, player.collecting_number)
437 #Reset some player variables.
438 player.good_score = False
439 player.perfect_score = False
440 player.on_left_log = False
441 player.on_right_log = False
442 player.collecting = False
443 player.collecting_number = None
444 player.not_carry_frog(player.rect.left, player.rect.top)
445 #Reset player position.
446 player.rect.left = player.starting_left
447 player.rect.top = player.starting_top
448 #Remove one from life.
449 player.lives -= 1
450 if player.lives <= 0:
451 player.game_over = True
452
453def player_boundaries(player, babyfrogs):
454 """This method should be called when you want to ensure frog is within boundaries
455 :param player: The player.
456 :param type: ``Frog`` - send through an instance of Frog Class
457 :param babyfrogs: The babyfrogs.
458 :param type: ``Homefrog`` - send through an instance of Homefrog Class
459 """
460 #If not on any logs:
461 if player.on_left_log != True and player.on_right_log != True:
462 if player.rect.top >=510:
463 player.rect.top -=45
464 if player.rect.top <=0:
465 player.rect.top +=45
466 if player.rect.left <=0:
467 player.rect.left +=20
468 if player.rect.right >=800:
469 player.rect.left -=20
470 #this is home spot - so check if we should score.
471 if player.rect.top ==465:
472 player_scored(player, babyfrogs)
473 #If were on a log boundaries and handled differently.
474 else:
475 if player.rect.right <=0:
476 player_died(player, babyfrogs)
477 if player.rect.left >=800:
478 player_died(player, babyfrogs)
479
480def babyfrog_reset(babyfrog, collecting_number):
481 """ This method should be called when you want to reset the position of the babyfrog specified
482 it sets the saved variable of a babyfrog in the list to true, the frog that is reset depends
483 on what is send through.
484 :param babyfrogs: The babyfrogs.
485 :param type: ``Homefrog`` - send through an instance of Homefrog Class
486 :param collecting_number: The babyfrog you want to reset.
487 :param type: ``int``
488 """
489 #Make sure the frog we are trying to reset has a number (error prevention)
490 #Use the default left, top that were assigned on creation to reset position
491 if collecting_number!=None:
492 #babyfrog[collecting_number].rect.left = babyfrog[collecting_number].left
493 #babyfrog[collecting_number].rect.top = babyfrog[collecting_number].top
494 #now just sets saved to true, so frog can no longer be captured.It dies with big frog.
495 babyfrog[collecting_number].saved = True
496def player_scored(player, babyfrogs):
497 """ This method should be called when the player has scored.
498 It acts out things required when a player scores.
499 :param player: The player.
500 :param type: ``Frog`` - send through an instance of Frog Class
501 :param babyfrogs: The babyfrogs.
502 :param type: ``Homefrog`` - send through an instance of Homefrog Class
503 """
504 #Since we can start at the scoring position, we only want to act out this
505 #if we are collecting a frog, (and as error prevention so we cannot attempt to score when
506 #list is "None" make sure there is a value in collecting_number.
507 #Reset player variables: collecting, collecting_number
508 #Set babyfrogs variables: saved - True (we've just saved frog)
509 #Add score and print.
510 if player.collecting == True and player.collecting_number !=None:
511 player.collecting = False
512 babyfrogs[player.collecting_number].saved = True
513 babyfrogs[player.collecting_number].collected = False
514 player.collecting_number = None
515 player.not_carry_frog(player.rect.left, player.rect.top)
516 player.add_score()
517 print_score_data(player.score, player.perfect_score, player.good_score, player.end_time)
518
519def new_level(player, babyfrogs, lives):
520 """ This method should be called when you want a new level to begin.
521 It resets the game so that a new level can begin - and then increments level and speed.
522 :param player: The player
523 :param type: ``Frog`` - send through an instance of Frog Class.
524 :param babyfrogs: The babyfrogs
525 :param type: ``Homefrog`` - send through an instance of Homefrog Class.
526 """
527 global level, speed
528 level +=1 #add 1 to level
529 speed +=1 #add 1 to speed
530 #Reset position of frog.
531 player.rect.left = player.starting_left
532 player.rect.top = player.starting_top
533 #Reset position of babyfrogs, and reset collected, saved variables.
534 for frog in babyfrogs:
535 frog.collected = False
536 frog.saved = False
537 frog.rect.left = frog.left
538 frog.rect.top = frog.top
539 #Before we add lives check if we have 3: Remember if you have three lives when you complete
540 #a level you get a good_score = true.
541 if player.lives ==3:
542 player.good_score = True
543 else:
544 player_add_life(player, lives)
545 #reprint stuff to screen.
546 font_write("Level: " +str(level) + " ", 34, True, (0, 0, 255), (0, 0, 0), (3, 510), screen)
547 print_score_data(player.score, player.perfect_score, player.good_score, player.end_time)
548
549def player_add_life(player, lives):
550 """ This method to be called when you wish to add a life to the player.
551 Handles the life images and so forth.
552 """
553 #revalidates that player doesn't already have 3 lifes: 3 is max.
554 if player.lives <3:
555 player.lives +=1
556 if player.lives==3:
557 lives[2].rect.left = 68
558 if player.lives==2:
559 lives[1].rect.left = 38
560
561if __name__ == '__main__': main()
0562
=== removed file 'Frogger/frogger.py'
--- Frogger/frogger.py 2010-02-09 19:44:03 +0000
+++ Frogger/frogger.py 1970-01-01 00:00:00 +0000
@@ -1,356 +0,0 @@
1#!/usr/bin/env python
2"""
3Frog Game (C) Daniel Bell, 2010.
4Frog Game is released under the General Public License Version 3. See LICENSE for details.
5Frog Game is a fun survival game, that is based upon the classic arcade game: Frogger.
6"""
7try:
8 import sys
9 import os
10 import pygame
11 import time
12 from pygame.locals import *
13 from sprites import *
14except ImportError, err:
15 print "Failure loading module. %s" % (err)
16 sys.exit(2)
17
18"""
19Image Loading Function
20"""
21global screen
22screen = pygame.display.set_mode((592,774), DOUBLEBUF, 32)
23
24def levelIndicator(level):
25 fontNormal = pygame.font.Font('data/fonts/bgrovealtb.ttf', 28)
26 levelText = fontNormal.render("Level: " + str(level), True, (0, 0, 255), (181, 230, 29))
27 screen.blit(levelText, (250, 15))
28 pygame.display.update()
29
30def scoreIndicator(score, time, perfect, good):
31 fontNormal = pygame.font.Font('data/fonts/bgrovealtb.ttf', 18)
32 scoreText = fontNormal.render("Score: " + str(score), True, (0, 0, 255), (0, 0, 0))
33 if time != 0:
34 scoreTime = fontNormal.render("Last Frog Scored in: " + str(time) + " seconds!", True, (0, 0, 255), (0, 0, 0))
35 screen.blit(scoreTime, (300, 745))
36
37 if perfect == True:
38 modifier = fontNormal.render("Score Modifier: (x3)", True, (0, 0, 255), (0, 0, 0))
39 screen.blit(modifier, (422, 715))
40
41 elif good == True and perfect == False:
42 modifier = fontNormal.render("Score Modifier: (x2)", True, (0, 0, 255), (0, 0, 0))
43 screen.blit(modifier, (422, 715))
44
45 else:
46 modifier = fontNormal.render("Score Modifier: (x1)", True, (0, 0, 255), (0, 0, 0))
47 screen.blit(modifier, (422, 715))
48
49 screen.blit(scoreText, (5, 745))
50 pygame.display.update()
51
52def gameOverScreen(score, level):
53 pygame.init()
54 pygame.display.set_caption('Frog Game')
55 logo = pygame.image.load("data/images/logo.png")
56 pygame.display.set_icon(logo)
57
58 screen = pygame.display.set_mode((592,774), DOUBLEBUF, 32)
59
60 pygame.display.update()
61
62 """
63 Menu
64 """
65 fontTitle = pygame.font.Font('data/fonts/bgrovealtb.ttf', 72)
66 fontNormal = pygame.font.Font('data/fonts/bgrovealtb.ttf', 28)
67 fontExit = pygame.font.Font('data/fonts/bgrovealtb.ttf', 18)
68
69 title = fontTitle.render("GAME OVER", True, (0, 0, 255))
70 caption = fontNormal.render("You Scored: " + str(score), True, (0, 0, 255))
71 caption2 = fontNormal.render("Level: " + str(level), True, (0, 0, 255))
72 play = fontNormal.render("Press <SPACE> to Start a New Game", True, (0, 0, 255))
73 esc = fontExit.render("ESC to exit", True, (0, 0, 255))
74
75 screen.blit(caption, (150, 160))
76 screen.blit(caption2, (150, 200))
77 screen.blit(title, (100,50))
78 screen.blit(esc, (0, 0))
79 screen.blit(play, (60, 700))
80 pygame.display.update()
81 clock = pygame.time.Clock()
82 while 1:
83
84 #Get input
85 for event in pygame.event.get():
86 if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
87 sys.exit()
88 if event.type == KEYDOWN and event.key == K_SPACE:
89 game()
90 #using 30 FPS
91 clock.tick(30)
92def main():
93 pygame.init()
94 pygame.display.set_caption('Frog Game')
95 logo = pygame.image.load("data/images/logo.png")
96 pygame.display.set_icon(logo)
97
98 screen = pygame.display.set_mode((592,774), DOUBLEBUF, 32)
99
100 pygame.display.update()
101
102 """
103 Menu
104 """
105 fontTitle = pygame.font.Font('data/fonts/bgrovealtb.ttf', 72)
106 fontNormal = pygame.font.Font('data/fonts/bgrovealtb.ttf', 28)
107 fontExit = pygame.font.Font('data/fonts/bgrovealtb.ttf', 18)
108
109 title = fontTitle.render("FROG GAME", True, (0, 0, 255))
110 caption = fontNormal.render("Welcome To", True, (0, 0, 255))
111 play = fontNormal.render("Press <SPACE> to Continue", True, (0, 0, 255))
112 esc = fontExit.render("ESC to exit", True, (0, 0, 255))
113
114 screen.blit(caption, (220, 175))
115 screen.blit(title, (100,200))
116 screen.blit(esc, (0, 0))
117 screen.blit(play, (120, 700))
118 pygame.display.update()
119
120 clock = pygame.time.Clock()
121 while 1:
122
123 #Get input
124 for event in pygame.event.get():
125 if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
126 sys.exit()
127 if event.type == KEYDOWN and event.key == K_SPACE:
128 game()
129 #using 30 FPS
130 clock.tick(30)
131def game():
132
133 #Initialise pygame, icons and captions.
134 pygame.init()
135 pygame.display.set_caption('Frog Game')
136 logo = pygame.image.load("data/images/logo.png")
137 pygame.display.set_icon(logo)
138
139 #Initialise the screen, resolution: 592x774 (which is the size of the current background).
140 #TODO: Make the screen size smaller by default, or allow scrolling to occur in the game.
141
142 screen = pygame.display.set_mode((592,774), DOUBLEBUF, 32)
143
144 #Make background
145 backgroundImage = 'data/images/background.png'
146 background = pygame.image.load(backgroundImage).convert()
147 screen.blit(background, (0,0))
148 pygame.display.update()
149
150
151 #Keep track of sprites
152 player = Frog()
153 leftcars = []
154 """
155 0 & 1 = Row 1, 2 & 3 = Row 3, 4 & 5 = Row 5
156 """
157 leftcars.append(Leftcar(400, 616)) # 0
158 leftcars.append(Leftcar(100, 616)) # 1
159 leftcars.append(Leftcar(400, 526)) # 2
160 leftcars.append(Leftcar(100, 526)) # 3
161 leftcars.append(Leftcar(400, 436)) # 4
162 leftcars.append(Leftcar(100, 436)) # 5
163
164 rightcars = []
165 """
166 0 & 1 = Row 1, 2 & 3 = Row 3, 4 & 5 = Row 5
167 """
168 rightcars.append(Rightcar(200, 571)) # 0
169 rightcars.append(Rightcar(500, 571)) # 1
170 rightcars.append(Rightcar(200, 481)) # 2
171 rightcars.append(Rightcar(500, 481)) # 3
172 rightcars.append(Rightcar(200, 391)) # 4
173 rightcars.append(Rightcar(500, 391)) # 5
174
175 homefrogs = [Homefrog(-10,-10), Homefrog(-10,-10), Homefrog(-10,-10), Homefrog(-10,-10), Homefrog(-10,-10)]
176
177 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)]
178 rightlogs = [Log(-20, 256), Log(180, 256), Log(380, 256), Log(-20, 166), Log(180, 166), Log(380, 166)]
179
180 lives = [Life(10, 710), Life(38, 710), Life(66, 710)]
181
182 speed = 4
183
184 """
185 Using pygame.sprite.OrderedUpdates instead of pygame.sprite.RenderedUpdates due to the need to have the the frog ONTOP of the logs.
186 There is a small performance hit using this function.
187 """
188 all = pygame.sprite.OrderedUpdates(leftlogs, rightlogs, player, leftcars, rightcars, homefrogs, lives)
189
190 #Keep track of time
191 clock = pygame.time.Clock()
192
193 levelIndicator(player.level)
194 scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
195 #Game Loop
196 while 1:
197
198 #Get input
199 for event in pygame.event.get():
200 if event.type == QUIT or (event.type == KEYDOWN and event.key == K_ESCAPE):
201 sys.exit()
202 if player.gameOver != True:
203 if event.type == KEYDOWN and event.key == K_UP:
204 player.rect.top -= 45
205 player.onLeftLog = False
206 player.onRightLog = False
207 if event.type == KEYDOWN and event.key == K_DOWN:
208 player.rect.top += 45
209 player.onLeftLog = False
210 player.onRightLog = False
211 if event.type == KEYDOWN and event.key == K_LEFT:
212 player.rect.left -= 20
213 player.onLeftLog = False
214 player.onRightLog = False
215 if event.type == KEYDOWN and event.key == K_RIGHT:
216 player.rect.left += 20
217 player.onLeftLog = False
218 player.onRightLog = False
219
220 #move objects
221 for car in leftcars:
222 if car.rect.right <=0:
223 car.rect.left = 600
224 else:
225 car.rect.left -= speed
226 if car.rect.colliderect(player.rect):
227 player.loseLife()
228 scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
229
230 for car in rightcars:
231 if car.rect.left >=600:
232 car.rect.right = 0
233 else:
234 car.rect.left += speed
235 if car.rect.colliderect(player.rect):
236 player.loseLife()
237 scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
238
239 for log in leftlogs:
240 if log.rect.right <=0:
241 log.rect.left = 600
242 else:
243 log.rect.left -=speed
244 if log.rect.colliderect(player.rect):
245 player.onLeftLog = True
246
247 for log in rightlogs:
248 if log.rect.left >=600:
249 log.rect.right = 0
250 else:
251 log.rect.left +=speed
252 if log.rect.colliderect(player.rect):
253 player.onRightLog = True
254
255 if player.rect.top <=301 and player.rect.top >=121:
256 if player.onLeftLog == True:
257 player.rect.left -=speed
258 elif player.onRightLog == True:
259 player.rect.left +=speed
260 else:
261 player.loseLife()
262 scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
263
264 if player.rect.top <=100:
265
266 if player.rect.left >=12 and player.rect.right <=104 and player.frogsHome[0] != True:
267 player.scored()
268 scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
269 homefrogs[0].rect.left = 35
270 homefrogs[0].rect.top = 70
271 player.frogsHome[0] = True
272
273 elif player.rect.left >=132 and player.rect.right <=224 and player.frogsHome[1] != True:
274 player.scored()
275 scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
276 homefrogs[1].rect.left = 155
277 homefrogs[1].rect.top = 70
278 player.frogsHome[1] = True
279
280 elif player.rect.left >=252 and player.rect.right <=344 and player.frogsHome[2] != True:
281 player.scored()
282 scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
283 homefrogs[2].rect.left = 275
284 homefrogs[2].rect.top = 70
285 player.frogsHome[2] = True
286
287 elif player.rect.left >=372 and player.rect.right <=464 and player.frogsHome[3] != True:
288 player.scored()
289 scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
290 homefrogs[3].rect.left = 395
291 homefrogs[3].rect.top = 70
292 player.frogsHome[3] = True
293
294 elif player.rect.left >=492 and player.rect.right <=584 and player.frogsHome[4] != True:
295 player.scored()
296 scoreIndicator(player.score, player.endTime, player.perfectScore, player.goodScore)
297 homefrogs[4].rect.left = 515
298 homefrogs[4].rect.top = 70
299 player.frogsHome[4] = True
300
301 else:
302 player.loseLife()
303 scoreIndicator(player.score, 0, player.perfectScore, player.goodScore)
304
305 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:
306 player.frogsHome[0] = False
307 player.frogsHome[1] = False
308 player.frogsHome[2] = False
309 player.frogsHome[3] = False
310 player.frogsHome[4] = False
311 homefrogs[0].rect.left = -10
312 homefrogs[0].rect.top = -10
313 homefrogs[1].rect.left = -10
314 homefrogs[1].rect.top = -10
315 homefrogs[2].rect.left = -10
316 homefrogs[2].rect.top = -10
317 homefrogs[3].rect.left = -10
318 homefrogs[3].rect.top = -10
319 homefrogs[4].rect.left = -10
320 homefrogs[4].rect.top = -10
321 if player.lives == 3:
322 player.goodScore = True
323 if player.lives <3:
324 player.lives +=1
325 if player.lives == 2:
326 lives[1].rect.left = 38
327 elif player.lives == 3:
328 lives[2].rect.left = 66
329 player.level +=1
330 speed +=1
331 levelIndicator(player.level)
332
333 if player.gameOver:
334 gameOverScreen(player.score, player.level)
335
336 if player.lives == 2:
337 lives[2].rect.left = -50
338 if player.lives == 1:
339 lives[1].rect.left = -50
340
341
342 #Clear sprite
343 all.clear(screen, background)
344
345 #Update sprites
346 all.update()
347
348 #Redraw sprites
349 dirty = all.draw(screen)
350 pygame.display.update(dirty)
351
352 #Maintain frame rate
353 #using 30 FPS
354 clock.tick(30)
355
356if __name__ == '__main__': main()
3570
=== added directory 'Frogger/lib'
=== added file 'Frogger/lib/__init__.py'
=== added file 'Frogger/lib/engine.py'
--- Frogger/lib/engine.py 1970-01-01 00:00:00 +0000
+++ Frogger/lib/engine.py 2010-03-12 10:44:17 +0000
@@ -0,0 +1,69 @@
1#!/usr/bin/env python
2
3###BEGIN LICENSE
4# Copyright (C) 2010 Daniel Bell <daniel.bell@saraclan.com>
5#
6#This program is free software: you can redistribute it and/or modify it
7#under the terms of the GNU General Public License version 3, as published
8#by the Free Software Foundation.
9#
10#This program is distributed in the hope that it will be useful, but
11#WITHOUT ANY WARRANTY; without even the implied warranties of
12#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13#PURPOSE. See the GNU General Public License for more details.
14#
15#You should have received a copy of the GNU General Public License along
16#with this program. If not, see <http://www.gnu.org/licenses/>.
17### END LICENSE
18
19
20import os
21import pygame
22from pygame.locals import *
23
24global font
25global font_write
26
27def load_image(name, colorkey=None):
28 fullname = os.path.join('data/images/', name)
29 try:
30 image = pygame.image.load(fullname)
31 except pygame.error, message:
32 print 'Cannot load image:', fullname
33 raise SystemExit, message
34 image = image.convert()
35 if colorkey is not None:
36 if colorkey is -1:
37 colorkey = image.get_at((0,0))
38 image.set_colorkey(colorkey, RLEACCEL)
39 return image, image.get_rect()
40
41def font_write(message, size, aaliasing, color, background, coordinates, screen):
42 """ This Method is used to print messages to the screen.
43 You can call this method, and with parameters messages will be displayed on the screen.
44
45 :param message: The message you wish to display on the screen.
46 :type message: ``String``
47 :param size: The size of font you wish to use.
48 :type size: ``int``
49 :param aaliasing: Whether or not anti-aliasing should be enabled.
50 :type aaliasing: ``boolean``
51 :param color: Color of the message
52 :type color: ``int`` - in format of (red, green, blue)
53 :param background: Color of background.
54 :type background: ``int`` - 0 results in transparent otherwise format (red, green, blue)
55 :param coordinates: Coordinates of where the message should be displayed.
56 :param type: ``int`` - format (x, y)
57 :param screen: The screen you wish to print on
58 :param type: ``pygame.display``
59 """
60 #Define font
61 font ='data/fonts/nibby.ttf'
62 font = pygame.font.Font(font, size)
63 #Check if background is defined or not.
64 if background==0:
65 print_message=font.render(message, aaliasing, color)
66 else:
67 print_message=font.render(message, aaliasing, color, background)
68 screen.blit(print_message, coordinates)
69 #pygame.display.update()
070
=== added file 'Frogger/lib/sprites.py'
--- Frogger/lib/sprites.py 1970-01-01 00:00:00 +0000
+++ Frogger/lib/sprites.py 2010-03-12 10:44:17 +0000
@@ -0,0 +1,136 @@
1#!/usr/bin/env python
2
3###BEGIN LICENSE
4# Copyright (C) 2010 Daniel Bell <daniel.bell@saraclan.com>
5#
6#This program is free software: you can redistribute it and/or modify it
7#under the terms of the GNU General Public License version 3, as published
8#by the Free Software Foundation.
9#
10#This program is distributed in the hope that it will be useful, but
11#WITHOUT ANY WARRANTY; without even the implied warranties of
12#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13#PURPOSE. See the GNU General Public License for more details.
14#
15#You should have received a copy of the GNU General Public License along
16#with this program. If not, see <http://www.gnu.org/licenses/>.
17### END LICENSE
18
19#Sprite module: Contains all the sprites/objects.
20
21
22import sys
23import os
24import pygame
25import time
26
27from pygame.locals import *
28from lib.engine import *
29
30class Leftcar(pygame.sprite.Sprite):
31 """ This is the Leftcar class - contains logic required for
32 anything related to the leftcar.
33 Leftcar is a subclass of pygame.sprite.Sprite
34 """
35 def __init__(self, left, top):
36 pygame.sprite.Sprite.__init__(self)
37 self.image, self.rect = load_image('bettercar2.gif', -1)
38 self.rect.left = left
39 self.rect.top = top
40
41class Rightcar(pygame.sprite.Sprite):
42 """ This is the Rightcar class - contains logic required for
43 anything related to the Rightcar.
44 Rightcar is a subclass of pygame.sprite.Sprite
45 """
46 def __init__(self, left, top):
47 pygame.sprite.Sprite.__init__(self)
48 self.image, self.rect = load_image('bettercar.gif', -1)
49 self.rect.left = left
50 self.rect.top = top
51
52class Homefrog(pygame.sprite.Sprite):
53 def __init__(self, left, top):
54 self.left = left
55 self.top = top
56 pygame.sprite.Sprite.__init__(self)
57 self.image, self.rect = load_image('life.gif')
58 self.rect.left = self.left
59 self.rect.top = self.top
60 self.collected = False
61 self.saved = False
62
63class Log(pygame.sprite.Sprite):
64 def __init__(self, left, top):
65 pygame.sprite.Sprite.__init__(self)
66 self.image, self.rect = load_image('log.gif')
67 self.rect.left = left
68 self.rect.top = top
69
70class Life(pygame.sprite.Sprite):
71 def __init__(self, left, top):
72 pygame.sprite.Sprite.__init__(self)
73 self.image, self.rect = load_image('life.gif')
74 self.rect.left = left
75 self.rect.top = top
76
77class Frog(pygame.sprite.Sprite):
78 """Contains all the functions and information regarding the Frog,
79 player controllable character
80 """
81 def __init__(self):
82 pygame.sprite.Sprite.__init__(self)
83 self.default_image = load_image('betterfrog.gif', -1)
84 self.carry_image = load_image('frogcarry.gif', -1)
85 self.image, self.rect = self.default_image
86 self.starting_left = 374
87 self.starting_top = 465
88 self.rect.left = self.starting_left
89 self.rect.top = self.starting_top
90 self.lives = 3
91 self.score = 0
92 self.game_over = False
93 self.on_left_log = False
94 self.on_right_log = False
95 self.perfect_score = True
96 self.good_score = True
97 self.start_time = time.time()
98 self.end_time = None
99 self.collecting = False
100 self.collecting_number = None
101
102 def carry_frog(self, left, top):
103 self.image, self.rect = self.carry_image
104 self.rect.left = left
105 self.rect.top = top
106
107 def not_carry_frog(self, left, top):
108 self.image, self.rect = self.default_image
109 self.rect.left = left
110 self.rect.top = top
111
112 def add_score(self):
113 """ This method generates score for the user based on time taken to save the frog.
114 """
115 #Generate time taken to score:
116 self.end_time = time.time() - self.start_time
117 self.end_time = int(self.end_time)
118
119 #Generate base score:
120 if self.end_time <10:
121 self.base_score = 30
122 elif self.end_time >=11 and self.end_time <20:
123 self.base_score = 20
124 else:
125 self.base_score = 10
126
127 #Generate actual score:
128 if self.perfect_score == True:
129 self.score += (self.base_score)*3
130 elif self.good_score == True:
131 self.score += (self.base_score)*2
132 else:
133 self.score += self.base_score
134
135 #Reset timer.
136 self.start_time = time.time()
0137
=== added file 'Frogger/setup.py'
--- Frogger/setup.py 1970-01-01 00:00:00 +0000
+++ Frogger/setup.py 2010-03-12 10:44:17 +0000
@@ -0,0 +1,110 @@
1#! /usr/bin/env python
2
3###BEGIN LICENSE
4# Copyright (C) 2010 Daniel Bell <daniel.bell@saraclan.com>
5#
6#This program is free software: you can redistribute it and/or modify it
7#under the terms of the GNU General Public License version 3, as published
8#by the Free Software Foundation.
9#
10#This program is distributed in the hope that it will be useful, but
11#WITHOUT ANY WARRANTY; without even the implied warranties of
12#MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
13#PURPOSE. See the GNU General Public License for more details.
14#
15#You should have received a copy of the GNU General Public License along
16#with this program. If not, see <http://www.gnu.org/licenses/>.
17### END LICENSE
18
19###
20# Setup Script for Frog Game: 0.3
21# Works on Mac, Windows and Unix based systems.
22#
23#Usage (Mac OS X):
24# python setup.py py2app
25#
26#Usage (Windows):
27# python setup.py py2exe
28#
29#Usage (UNIX):
30# ./setup.py install
31###
32
33#Import stuff required to do the install. Stuff that could not be carried through gets ignored.
34try:
35from distutils.core import setup
36from distutils.command.install_data import install_data
37from distutils.dep_util import newer
38from distutils.log import info
39import glob
40import os
41import sys
42import py2exe
43from setuptools import setup
44except ImportError:
45 pass
46
47#Check if what we are running (and thus installing on) is MAC OSX.
48if sys.platform == 'darwin':
49 extra_options = dict(
50 setup_requires=['py2app'],
51 app=[frogger],
52 data_files =[
53 ('data/fonts', glob.glob('data/fonts/*.ttf')),
54 ('data/images', glob.glob('data/images/*.png')),
55 ('data/images', glob.glob('data/images/*.gif')),
56 ]
57 #py2app has certain flags/options that can be enabled.
58 #Setting Icon file, so that generated .app has the icon set automatically.
59 options=dict(py2app=dict(iconfile=data/icons/frog-game.icns)),
60 )
61#if we are not using running MAC OSX check if we are running Windows.
62elif sys.platform == 'win32':
63 extra_options = dict(
64 windows = [
65 {
66 "script": "frogger",
67 "icon_resources": [(2, "frog-game.ico")]
68 }
69 data_files =[
70 ('data/fonts', glob.glob('data/fonts/*.ttf')),
71 ('data/images', glob.glob('data/images/*.png')),
72 ('data/images', glob.glob('data/images/*.gif')),
73 ]
74 )
75#when its not MAC OSX or Windows we can assume its some sort of UNIX
76#based system.
77else:
78 extra_options = dict(
79 scripts=['frogger'],
80 data_files =[
81 ('share/applications', ['data/frog-game.desktop']),
82 ('share/icons/hicolor/scalable/apps',
83 glob.glob('data/icons/scalable/*.svg')),
84 ('share/icons/hicolor/16x16/apps',
85 glob.glob('data/icons/16x16/*.png')),
86 ('share/icons/hicolor/22x22/apps',
87 glob.glob('data/icons/22x22/*.png')),
88 ('share/icons/hicolor/24x24/apps',
89 glob.glob('data/icons/24x24/*.png')),
90 ('share/icons/hicolor/48x48/apps',
91 glob.glob('data/icons/48x48/*.png')),
92 ('share/frog-game/data/fonts',
93 glob.glob('data/fonts/*.ttf')),
94 ('share/frog-game/data/images',
95 glob.glob('data/images/*.png')),
96 ('share/frog-game/data/images',
97 glob.glob('data/images/*.gif')),
98 ],
99 )
100
101setup(
102 version='0.2',
103 description='Fun survival/rescue game!',
104 long_description="The baby frogs are lost! Can you rescue them?",
105 author='Daniel Bell (dbell)',
106 author_email='daniel.bell@saraclan.com',
107 url='https://launchpad.net/frogger',
108 license='GPL v3',
109 **extra_options
110)
0111
=== removed file 'Frogger/sprites.py'
--- Frogger/sprites.py 2010-02-13 16:37:05 +0000
+++ Frogger/sprites.py 1970-01-01 00:00:00 +0000
@@ -1,141 +0,0 @@
1try:
2 import sys
3 import os
4 import pygame
5 import time
6 from pygame.locals import *
7 import weakref
8except ImportError, err:
9 print "Failure loading module. %s" % (err)
10 sys.exit(2)
11
12def load_image(name, colorkey=None):
13 fullname = os.path.join('data/images/', name)
14 try:
15 image = pygame.image.load(fullname)
16 except pygame.error, message:
17 print 'Cannot load image:', fullname
18 raise SystemExit, message
19 image = image.convert()
20 if colorkey is not None:
21 if colorkey is -1:
22 colorkey = image.get_at((0,0))
23 image.set_colorkey(colorkey, RLEACCEL)
24 return image, image.get_rect()
25
26
27class Leftcar(pygame.sprite.Sprite):
28 """
29 Left Car functions.
30 """
31 def __init__(self, left, top):
32 pygame.sprite.Sprite.__init__(self)
33 self.image, self.rect = load_image('bettercar2.gif', -1)
34 self.rect.left = left
35 self.rect.top = top
36
37class Rightcar(pygame.sprite.Sprite):
38 """
39 Left Car functions.
40 """
41 def __init__(self, left, top):
42 pygame.sprite.Sprite.__init__(self)
43 self.image, self.rect = load_image('bettercar.gif', -1)
44 self.rect.left = left
45 self.rect.top = top
46
47class Homefrog(pygame.sprite.Sprite):
48 def __init__(self, left, top):
49 pygame.sprite.Sprite.__init__(self)
50 self.image, self.rect = load_image('smallerfrog.gif', -1)
51 self.rect.left = left
52 self.rect.top = top
53
54class Log(pygame.sprite.Sprite):
55 def __init__(self, left, top):
56 pygame.sprite.Sprite.__init__(self)
57 self.image, self.rect = load_image('log.gif')
58 self.rect.left = left
59 self.rect.top = top
60
61class Life(pygame.sprite.Sprite):
62 def __init__(self, left, top):
63 pygame.sprite.Sprite.__init__(self)
64 self.image, self.rect = load_image('life.gif')
65 self.rect.left = left
66 self.rect.top = top
67
68class Frog(pygame.sprite.Sprite):
69 """
70 Contains all the functions and information regarding the Frog, player controllable character
71 """
72 def __init__(self):
73 pygame.sprite.Sprite.__init__(self)
74 self.image, self.rect = load_image('betterfrog.gif', -1)
75 self.rect.left = 266
76 self.rect.top= 661
77 self.lives = 3
78 self.score = 0
79 self.level = 1
80 self.gameOver = False
81 self.frogsHome = [False, False, False, False, False]
82 self.onLeftLog = False
83 self.onRightLog = False
84 self.perfectScore = True
85 self.goodScore = True
86 self.startTime = time.time()
87
88 def update(self):
89 #moves the frog
90 self.gameAreaCheck()
91
92 def scored(self):
93
94 self.rect.left = 266
95 self.rect.top= 661
96
97 self.endTime = time.time() - self.startTime
98 self.endTime = int(self.endTime)
99
100 if self.endTime <5:
101 self.baseScore = 30
102 elif self.endTime >=6 and self.endTime <15:
103 self.baseScore = 20
104 else:
105 self.baseScore = 10
106
107 if self.perfectScore == True:
108 self.score += (self.baseScore + (self.level*5))*3
109 elif self.goodScore == True:
110 self.score += (self.baseScore + (self.level*5))*2
111 else:
112 self.score += self.baseScore + (self.level*5)
113
114 self.startTime = time.time()
115
116 def gameAreaCheck(self):
117 if self.onLeftLog != True and self.onRightLog != True:
118 if self.rect.top >=662:
119 self.rect.top -=45
120 if self.rect.left <=0:
121 self.rect.left +=20
122 if self.rect.right >=595:
123 self.rect.left -=20
124 else:
125 if self.rect.right <=0:
126 self.loseLife()
127 if self.rect.left >=600:
128 self.loseLife()
129
130
131 def loseLife(self):
132 self.startTime = time.time()
133 self.goodScore = False
134 self.perfectScore = False
135 self.onLeftLog = False
136 self.onRightLog = False
137 self.rect.left = 266
138 self.rect.top= 661
139 self.lives -= 1
140 if self.lives <= 0:
141 self.gameOver = True

Subscribers

People subscribed via source and target branches

to all changes: