About Monkey 2 › Forums › Monkey 2 Projects › Fixed Shooter
This topic contains 21 replies, has 8 voices, and was last updated by 
 Jesse
 2 years ago.
- 
		AuthorPosts
 - 
		
			
				
March 4, 2017 at 7:39 pm #7378
This is a game I made a couple of years ago in Monkey1 for a Mochi contest. It’s an old style game ala Space Invaders and Galaga. I have made the source available here for any body to use, modify and/or Rip.
https://github.com/legionnairex3/PromptInvasion/tree/master
Please let me know if there are any problems.
March 5, 2017 at 6:44 am #7379Thanks very much!
One question: is it programmed for a specific MX2 version?
I tried to compile the source code with MX2 1.0.5 and I got errors
[/crayon]Monkey12345[crayon-5cba154cd4c5d985081278 inline="true" ]mx2cc version 1.0.5***** Building app 'E:/PromptInvasion-master/PromptInvasion.monkey2' *****Parsing...E:/PromptInvasion-master/PromptInvasion.monkey2 [1734] : Error : Expecting expression but encountered ']'there are some errors in the ‘assets’
background.png (missed data/)
hit.mpr
hita.mprshould be hit.ogg, hita.ogg
March 5, 2017 at 9:38 am #7380here on W7 mx2 1.1.03
[/crayon]Monkey12345678[crayon-5cba154cd8918265553282 inline="true" ]Parsing...Semanting...C:/mx2_shortpath/PromptInvasion-master/PromptInvasion.monkey2 [1656] : Error : Super class 'std.collections.List<default.Special>.Node' has no default constructorC:/mx2_shortpath/PromptInvasion-master/PromptInvasion.monkey2 [1653] : Error : Can't find overload for 'new[Void(default.Special),Void(default.Special,std.collections.List<default.Special>.Node)]' with argument types ()C:/mx2_shortpath/PromptInvasion-master/PromptInvasion.monkey2 [2484] : Error : Super class 'std.collections.List<default.ParticleA>.Node' has no default constructorC:/mx2_shortpath/PromptInvasion-master/PromptInvasion.monkey2 [2477] : Error : Super class 'std.collections.List<default.ParticleA>.Node' has no default constructorC:/mx2_shortpath/PromptInvasion-master/PromptInvasion.monkey2 [751] : Error : Super class 'std.collections.List<default.Entity>.Node' has no default constructorMarch 5, 2017 at 6:47 pm #7381Sorry guys I was trying some modifications to the code to make it simpler and I forgot that I had modified the List node class module. If you all want to give it another try, it should be ok now.
I am not sure but I think that it only works with the latest v1.1.03
March 6, 2017 at 5:10 am #7391Just tried, and I’m also getting “no default constructor” errors with V1.1.03.
[/crayon]Monkey123456[crayon-5cba154cde822894441466 inline="true" ]: Error : Super class 'std.collections.List<default.Special>.Node' has no default constructor: Error : Super class 'std.collections.List<default.Special>.Node' has no default constructor: Error : Super class 'std.collections.List<default.ParticleA>.Node' has no default constructor: Error : Super class 'std.collections.List<default.ParticleA>.Node' has no default constructorMarch 6, 2017 at 2:59 pm #7397did you download the V1.1.03 from Github?
And did you download the latest game update from the repository?
It might be that you don’t have the latest game update. those errors seem to be because of some dependancies I had implemented to the Node class. which I have take out in the latest update.
March 7, 2017 at 8:13 am #7402I’m getting the same errors, v1.1.03
March 7, 2017 at 2:15 pm #7405I had to try it in previous version to fix the problem because apparently when I rebuilt the models without the changes apparently the changes didn’t go through. I had forgotten to remove some code from the game source code and it failed to recognized them as errors. Now I know it works in v1.1.01 and it should work in most previous versions.
I understand if no one want’s to give a try anymore but I would appreciate it. Thanks.I don’t understand, if I removed the additions to the modules and rebuild the modules why the changes were not recognized when I recompiled the code. I guess I am going to have to stop messing with the modules.
March 8, 2017 at 5:55 am #7411Works now. Thanks!
Is it gonna be added as one of the “bananas” examples?March 8, 2017 at 11:17 am #7413The source now compiles and runs, but there seems to be a couple of bugs. The invaders just march off the right side of the screen and don’t return. Can’t shoot any of the asteroids.
March 8, 2017 at 2:36 pm #7419@ethernaut, I have no idea if Marks want’s to add it to the bananas examples but if he wants to he can.
The invaders just march off the right side of the screen and don’t return.
I don’t know why they are doing that, they don’t do that on my computer, never have. they just move left to right and right to left.
anybody else having that problem? Please, let me know.
about the asteroids, they are just meant for background decoration/distraction, not intended to be shot at.
March 9, 2017 at 10:53 am #7434Odd, when I do an emscriptem build, everything works fine. A PC desktop build, and I have the bug of the invaders running off screen.
HP 15-f100dx laptop. AMD A8 6410 APU with Radeon R5 Graphics 2.0ghz, 4GB ram, Windows 10 Home 64 bit OS.
March 9, 2017 at 5:08 pm #7437I get the issue here on PC with the invaders going off the side of the screen. Which bit of the code tells them to some back and I can try and debug?
March 9, 2017 at 7:29 pm #7438I have a suspicion that Pi is not initialized in some systems windows maybe
can somebody on windows try this with the latest build V1.1.03:[/crayon]Monkey12345678910111213[crayon-5cba154cf2581938733911 inline="true" ]Namespace myapp#Import "<std>"Using std..Const pii := PiFunction Main()Print piiEndif I am right some of them should give the result of 0.0
if it does
can you replace this code on line 33 of the source code:
[/crayon]Monkey123[crayon-5cba154cf2587096031657 inline="true" ]Const ATR := Pi/180.0to thi:
[/crayon]Monkey123[crayon-5cba154cf258d921093543 inline="true" ]Const ATR := 3.14159265/180.0i believe it has to do with line 1918 in the source code:
[/crayon]Monkey1234[crayon-5cba154cf2592906190011 inline="true" ]angle += 1*ATR 'speedMarch 9, 2017 at 8:51 pm #7439Yep that was it. Pi does contain the right value, but assigning it to another value outside of the main function doesn’t work:
Monkey1234567891011121314151617181920Namespace myapp#Import "<std>"Using std..Global pii := PiFunction Main()Print pii 'prints 0Print Pi 'Prints PiConst Piii := PiPrint Piii 'Prints PiEnd - 
		AuthorPosts
 
You must be logged in to reply to this topic.