讲解:Invadem、Java、Java、game mechanicsSQL|ProcessingAssignment 2You are working for a company called PipeDream which produces desktop and mobile games. The companyis currently developing a new game called Invadem. Invadem is a simple shootem up game where the playercontrols a tank that fights off a horde of invading space ships.You have been given the task of building a demo. You will need to implement the tank, barriers, invaders anda single level that will be repeated if the player wins or loses. Additional requirements will be released afteryour milestone submission.An artist has created a simple demonstration of the game and has posted it on your online forum (Ed). Usethis demo to help layout your entities and develop your game mechanics.Project and BuildYou have been given a scaffold which will help you get started with this assignment. You can download thescaffold onto your own computer and invoke gradle build to compile and resolve dependencies.You will be using the Processing library within your project to allow you to create a window and drawgraphics. You can access the documentation from the following linkGame Objects and MechanicsThe project contains a number of entities that will need to be modelled within your application. You havebeen provided some basic test cases to help develop and implement their functionality.TankThis is a player controlled entity that can be moved by pressing the left and right arrow keys on the keyboardand moves at a rate of 1 pixel per a frame . The tank is 22x16 pixels, it starts at the bottom-middle of thedisplay. A tank can fire projectiles which can hit the barriers or enemy invaders. It can shoot multipleprojectiles towards the invaders. In addition to moving the tank with left and right arrow keys, the player canfire projectiles using the space key. If an enemy projectile hits the tank, it will lose a hit point, if the tank is hit 3times, the game should transition to a Game Over screen since the tank has been destroyed.InvaderEach invader has a unique starting position but move in time with every other invader. The invader swarmmoves from the top-middle of the screen to the players barriers. Once an invader has reached the barriers,the game should transition to a Game Over screen.Invaders will move 30 steps in one direction before moving down and heading 30 steps in the other direction.Each sideways step will constitute a movement of 1 pixel, each step is made every two frames. When aninvader moves downward, it will move 8 pixels down and transition to its other sprite.The invaders are part of a larger swarm, the swarm starts with 40 invaders (10 invaders per row, 4 rows). Eachinvader is 16x16 pixels, this will correspond with the size of their sprites. They will have the same collisionarea as their sprites.Once an invader is hit, it is considered to have been destroyed and should no longer be rendered by thegame. When all invaders have been hit, this will result in the player winning the game and transitioning to theNext Level screen.Every 5 seconds, an invader will be randomly selected to fire a projectile downwards.BarrierA barrier is composed of 7 different components, each component can sustain 3 hits. Once a component hasbeen destroyed, it no longer offers protection for the tank. When a barrier sustains a hit, it will change to adifferent sprite, indicating that it has been damaged. The player is provided with 3 barriers, each barrier, leftbarrier is at least 20 pixels away from the left boundary described in the application section, the center barrierstarts in the centre of the screen, right barrier is at least 20 pixels away from the right boundary. Each barrieris at least 10 pixels above the tanks location.A barrier can be hit by the tank and an invader.ProjectileA projectile can be fired by both the tank and an invader, however, an invaders projectile will not hit any otherinvader (only the barrier and tank). The tank can hit the barrier as well as any invader. Once a projectileimpacts with another entity, it will cease to exist.The projectile is 1x3 pixels and travels upwards 1px per frame.Game ConditionsThe goal of the game is for the player to destroy all invaders before either the tank is destroyed or theinvaders land.The player wins when the following conditions have been met:All invaders are destroyed.The computer wins when one of the following conditions have been met:An invader reaches the barriers (10px away from the barriers).The tank is hit 3 times and destroyed.ApplicationYour application will need to adhere to the following specification640 width 480 height window with a black background.Left boundary (tank cannot move past this point) at x 180, Right boundary at x 460.Must maintain a frame rate of 60 frames per second.Your application must be able to compile and run on any the university lab machines using gradlebuild & gradle runFailure to do so, will result in 0% for Final Code Submission.Your program must not exhibit any memory leak, try to load all assets prior to usage.You must use the processing library, you cannot use any other framework such as javafx, awt or jogl.AssetsArtists within the company have produced sprites for your game. You have been provided a /resourcesfolder which your code access directly. These assets are loadable using the loadImage method attached thePApplet type. Please refer to the processing documentation when loading and drawing an image.Algorithms that may come in handy!It is likely you will need to utilise the following algorithms and patterns within your project. You will need toidentify where you will utilise these algorithms and document them in your report.Collision Detection (AABB)Since all entities within the game can contain an axis aligned bounding box. You may implement the followingcollision detection method.Assume the following variables (r1, r2) have the properties: x, y, width, height.AnimationYou have been given sprites to associate to entities. Due to the simplicity of the game there isnt a lot ofanimation that is required but you may find it beneficial to maintain an animation state within each entity.Each entity will contains a list of sprites which can be swapped to.check_collection(r1, r2):if ( r1.x ( (r1.x + r1.width) > r2.x ) and( r1.y ( (r1.height + r1.y) > r2.y )://Collision has been detectedreturn true;else:return falseAnimationData {s代做Invadem、Java编程设计调试、Java语言代写、prites[];currentSpriteIndex;delay;tick() {//Action to take on a draw call//use information to delay a sprite transition//Loop around if index >= length of sprites}}Marking Criteria (12%)Your final submission is due on 10th of November at 11:59PM AEST. Please make sure you submit your codeto Ed and your report to Canvas.Final Code Submission (5%)You will need to have implemented and satisfied requirements listed in this assignment. Make sure youhave addressed the following and any other requirements outlined previously.Window launches and shows black backgroundTank is rendered and can be moved by the userInvaders are rendered, move according to the pattern described and change sprites on movementBarriers are rendered, can be hit by both tank and invaderWin condition can be reached by the playerLoss condition can be reached by the computerEnsure your application does not repeat large sections of logic, try to minimise repetition.Ensure your application code exhibits good OO principles (Utilising inheritance, interfaces andclasses effectively)Additional requirements will be announced after the milestone deadline which will need tobe implementedMilestone (1%)To ensure progress has been made within on your project. You will need to submit a working submissionof your project by Tuesday on October 29th by 11:59pm AEST.You must achieve the following:Draw the tank on the screen.At least one invader is drawn in its starting position.At least one barrier is set up.The tank can be moved using left and right arrow keys.However, try to aim to complete as much as you can so your tutor can provide as much feedback onyour milestone submission.Additional Test Cases (2%) During development of your code, add additional test cases to your projectand test as much functionality as possible. You will need to construct unit test cases within the src/testfolder.To test the state of your entities without drawing, implement a simple game loop that will update thestate of each object but not draw the entity.Some suggestion for test cases you should create:Tank (movement, change sprites, fires projectile, intersection, state changes)Projectile (checks for intersection, travel velocity)Invader (checks movement pattern, projectile firing, state change)Barrier (It can be hit, changes state after hit, can be hit by different entities, its current placement in theapplication)Code coverage, common and corner casesEnsure your test cases cover over 90% of execution paths (Use jacoco in your gradle build)Ensure your test cases cover common cases.Ensure your test cases cover edge cases.Each test cases must contain a brief comment explaining what it is testing.Design, Report and Comments (3%), (400 words minimum, 1200 words maximum) You will need tosubmit a report that elaborates on your application design and development progress. Please include:Documentation on your progress, highlighting what you have identified from the problemdescription, requirements gathering and how you have represented concepts within yourapplication.Provide a high level overview of your implementationFor each class created, state what you used it for and why it was incorporated into your design.Highlight changes you have made after the milestone submission, identifying how your initial designat the milestone hindered or helped your final submission.Reflection, highlight issues that you encountered while modelling your application and anyimprovements you can identify.Your code should be clear, well commented and concise, try not to repeat yourself and utilise OOPconstructs within your application.Your code should be easy to follow, help the reader and avoid distraction. The code and designshould aim provide a cohesive layout and concise comments; well chosen names; and idiomatic useof the Java languageExtension (1%) You really want to impress! Add an additional feature to the game. We have providedsome extension ideas but you are free to implement your own extension, please check with your tutorfor approval.You will need to outline your extension idea within your report so the marker knows what to look for.Some ideas that you can implement:2 Player mode, two players can play the game at the same time on the same computer, this tankwill be using a different sprite to the one provided.Network play, Your game can create a server where two people can play the game from differentcomputers.Add sound effects to your game, make those visual pop with some sound effects.Warning : Any attempts to deceive or disrupt the marking system will result in an immediate zero for theentire assignment. Negative marks can be assigned if you do not properly follow the assignment specification,or your code is unnecessarily or deliberately obfuscated.Academic DeclarationBy submitting this assignment you declare the following:I declare that I have read and understood the University of Sydney Student Plagiarism: Coursework Policy andProcedure, and except where specifically acknowledged, the work contained in this assignment/project is my ownwork, and has not been copied from other sources or been previously submitted for award or assessment.I understand that failure to comply with the Student Plagiarism: Coursework Policy and Procedure can lead to severepenalties as outlined under Chapter 8 of the University of Sydney By-Law 1999 (as amended). These penalties maybe imposed in cases where any significant portion of my submitted work has been copied without properacknowledgement from other sources, including published works, the Internet, existing programs, the work of otherstudents, or work previously submitted for other awards or assessments.I realise that I may be asked to identify those portions of the work contributed by me and required to demonstratemy knowledge of the relevant material by answering oral questions or by undertaking supplementary work, eitherwritten or in the laboratory, in order to arrive at the final assessment mark.I acknowledge that the School of Computer Science, in assessing this assignment, may reproduce it entirely, mayprovide a copy to another member of faculty, and/or communicate a copy of this assignment to a plagiarismchecking service or in-house computer program, and that a copy of the assignment may be maintained by theservice or the School of Computer Science for the purpose of future plagiarism checking.转自:http://www.3daixie.com/contents/11/3444.html

how do java play sql_讲解:Invadem、Java、Java、game mechanicsSQL|Processing相关推荐

  1. java类的讲解_【java 基础】java类的权限讲解

    java类权限有四种,分别是public,protected,private和默认的权限.其中前三个权限是有明确定义的修饰符的,而默认的权限没有明确的修饰符(我们可以称之为default),在定义类, ...

  2. Java的算法讲解以及案例!

    算法是指解题方案的准确而完整的描述,是一系列解决问题的清晰指令,java算法就是采用Java语言来实现解决某一问题的清晰指令. 算法的特征: 输入性:有零个或多个外部量作为算法的输入 输出性:算法产生 ...

  3. Java:comp/env/讲解与JNDI

    转载自   "Java:comp/env/"讲解与JNDI 我们在使用JNDI调用某个对象时,会有下述两种方式 context.lookup("java:comp/env ...

  4. 怎么用java做日历_怎么用java做日历?实例讲解

    Java是一种高级语言,可以用到很多领域中,这不,用java还可以做日历,那么怎么用java做日历?今天我们就给大家讲解一下用java做日历的方法,学会大家也可以做一个日历出来! 我们需要用到两个类: ...

  5. 网络爬虫讲解(附java实现的实例)

    luojinping的专栏 目录视图 摘要视图 订阅 CSDN日报20170219--<程序员的沟通之痛>      [技术直播]揭开人工智能神秘的面纱        程序员1月书讯    ...

  6. java自学——java的基本讲解和变量、字符串、运算符的简单介绍

    java自学--java的基本讲解和变量.数组.字符串.运算符的简单介绍 hello world程序 java程序的结构 java语句的组成介绍 关键字 标识符 标识符的命名规则 分隔符 注释符 空白 ...

  7. Tomcat的配置与讲解(含Java环境配置,tomcat配置,tomcat讲解)

    Tomcat介绍 问题开始之前,我们来对tomcat进行一些简单的介绍,有过web基础的朋友应该会了解到,自己用css,html写的页面只能自己访问,别人无法远程访问到自己写的页面.tomcat作为开 ...

  8. java基础详细讲解

    java基础 java之父:詹姆斯·高斯林(James Gosling) java三大平台版本 J2ME(Java 2 Platform Micro Edition)小型版 是为开发电子消费产品和嵌入 ...

  9. 贪吃蛇大作战代码java,贪吃蛇游戏,贪吃蛇java游戏代码讲解

    贪吃蛇游戏,贪吃蛇java游戏代码讲解 来源:互联网 作者:佚名 时间:2020-06-06 贪吃蛇源代码.txt这世界上除了我谁都没资格陪在你身边. 听着,我允许你喜欢我.除了白头偕老,我们... ...

最新文章

  1. [LintCode] Maximum Subarray 最大子数组
  2. GARFIELD@02-25-2005
  3. warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID
  4. 【文末福利】图论算法:稳定婚姻问题,如何找到最适合自己的另一半
  5. APT linux必知必会
  6. BP神经网络:feedforwardnet版回归预测
  7. POJ 2686 Traveling by Stagecoach 壮压DP
  8. JSP教程第2讲笔记
  9. 华为防火墙笔记-网络地址转化NAT
  10. 设有一个 Student 数据库,包括 数据库,包括 学生 , 课程 , 选修三个关系: 三个关系: 学生 学生:S ( Sno ,Sname ,Ssex ,Sage,Sdept ) 课程 课程:
  11. php实现鼠标悬停显示下拉菜单,jquery实现鼠标滑过显示二级下拉菜单效果
  12. vue做移动端适配最佳解决方案,亲测有效
  13. windows操作系统知识最全
  14. 一般云服务器支持多少并发,一般云服务器支持是多大并发?
  15. 美国心理求助电话暴涨10倍,斯坦福AI聊天机器人抚慰受伤心灵
  16. KVM内存管理(一)—— 设置基本参数
  17. 开学必备好物推荐,电池最耐用的蓝牙耳机分享
  18. 370A. Rook, Bishop and King codeforce题解
  19. springboot+h5页面+微信公众号获取微信用户信息
  20. WordPress 确保您的网站安全

热门文章

  1. ElementUI图片上传 回显
  2. matlab实现移位寄存器,基于matlab的移位寄存器法m序列的产生
  3. 使用.NET 将PDF转成Word
  4. 关于redis多个哨兵sentinel在阿里云的坑 sdown sentinel或者failover-abort-not-elected
  5. Angular项目中使用echarts中国地图
  6. NETALLY LRAT-2000/LRAT-1000/LRAT-2000-KIT有线链路通测试仪2020重磅登场
  7. SpringBoot 监控
  8. 在阿里(02):阿里入职记
  9. 传感器集成温度传感器(DS1820)温度特性实验
  10. Openstack云平台的搭建与部署(具体实验过程截图评论拿)