Forum Replies Created
-
AuthorPosts
-
Thanks Guys
Yep that looks perfect Jesse – I’ve done this sort of thing before in BlitzMax but couldnt work it out! Looks like I was doing everything clockwise instead of anticlockwise, not sure about the 90 degree turn though you do (Pi / 2)?
@pixelpaladin – that would be great!
@anatol – I really dont have any idea what I’m doing with shaders at the moment, never played with them in the past
Strange when I copy and paste the shaders from here I get the “Can’t find ‘//@renderpasses’ tag” error…
I now get:
Monkey123Invalid uniform type 0 expecting 1Edit:
Got it to work now… no idea what was going on…Thanks Mark, I’ll have a look
Yep they both work (MojoShaders_07_CRT and MojoShaders_08_BeamCRT) although had to resize them
Still running at 1920×1080
Now we need it in real time
@ethernaut, just downloaded the git master zip and I cant compile examples 4, 7 and 8:
4:
Monkey12345678910111213141516Failed to link program:C:\fakepath(61,12-36): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect themC:\fakepath(42,11-43): error X3507: '_plot': Not all control paths return a valueWarning: D3D shader compilation failed with default flags. (ps_5_0)Retrying with skip validationC:\fakepath(61,12-36): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect themC:\fakepath(42,11-43): error X3507: '_plot': Not all control paths return a valueWarning: D3D shader compilation failed with skip validation flags. (ps_5_0)Retrying with skip optimizationC:\fakepath(42,11-43): error X3507: '_plot': Not all control paths return a valueWarning: D3D shader compilation failed with skip optimization flags. (ps_5_0)Failed to create D3D shaders.7:
Monkey12345Failed to compile fragment shader:ERROR: 0:51: '-' : wrong operand types no operation '-' exists that takes a left-hand operand of type 'const int' and a right operand of type 'uniform highp float' (or there is no acceptable conversion)ERROR: 0:51: 'mix' : no matching overloaded function foundERROR: 0:51: '=' : cannot convert from 'const float' to 'highp 4-component vector of float'8:
Monkey12345678910Parsing...Semanting...C:/Users/therevills/Downloads/tests/testMaterial.monkey2 [240] : Error : Internal declaration 'ShaderDefs' cannot be accessed from here.C:/Users/therevills/Downloads/tests/testMaterial.monkey2 [243] : Error : Identifier 'defs' Not foundC:/Users/therevills/Downloads/tests/testMaterial.monkey2 [245] : Error : Identifier 'defs' Not foundC:/Users/therevills/Downloads/tests/testMaterial.monkey2 [248] : Error : Identifier 'defs' Not foundC:/Users/therevills/Downloads/tests/testMaterial.monkey2 [253] : Error : Identifier 'defs' Not foundThis is using v1.1.08…
Hmmm… I’ve got no idea how to use that with real time graphics – lol!
November 20, 2017 at 7:39 am in reply to: [ANDROID] Build Error – DIDDY2 and Building Module Errors. #11845Yep you got it!
I’ve only created a few constants for the most common screens:
- Const EMPTY_SCREEN:String = “EmptyScreen”
Const EXIT_SCREEN:String = “ExitScreen”
Const GAME_SCREEN:String = “GameScreen”
Const TITLE_SCREEN:String = “TitleScreen”
Const OPTIONS_SCREEN:String = “OptionsScreen”
Const GAME_OVER_SCREEN:String = “GameOverScreen”
Const LEVEL_SELECT_SCREEN:String = “LevelSelectScreen”Cool! I’ll have a play soon! Thanks!
November 19, 2017 at 12:08 am in reply to: [ANDROID] Build Error – DIDDY2 and Building Module Errors. #11811Amon, I recommend you dont build Diddy2 as a module just yet… just import the main Diddy2 file in your file:
Monkey1#Import "../diddy2/diddy2"Here is a Diddy template:
Monkey1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192Namespace game#Import "assets/"#Import "../diddy2/diddy2"#Import "<mojo>"#Import "<std>"Using diddy2..Using mojo..Using std..Function Main()New MyDiddyApp("My Super Game", 1024, 768, 1024, 768)EndClass MyDiddyApp Extends DiddyAppMethod New(title:String, width:Int, height:Int, virtualResolutionWidth:Int, virtualResolutionHeight:Int, filterTextures:Bool = True)Super.New(title, width, height, virtualResolutionWidth, virtualResolutionHeight, filterTextures)LoadAssets()CreateScreens()Start(GetScreen(Screen.TITLE_SCREEN))EndMethod LoadAssets()AssetBank.LoadImage("title.png")EndMethod CreateScreens()AddScreen(New TitleScreen(Screen.TITLE_SCREEN))AddScreen(New GameScreen(Screen.GAME_SCREEN))EndEndClass TitleScreen Extends ScreenField titleImage:ImageField mxImage:ImageMethod New(title:String)Super.New(title)EndMethod Load() OverrideAssetBank.LoadImage("monkey2logo.png")EndMethod Start() OverridetitleImage = AssetBank.GetImage("title.png")mxImage = AssetBank.GetImage("monkey2logo.png")EndMethod Render(canvas:Canvas, tween:Float) Overridecanvas.DrawImage(titleImage, Window.VirtualResolution.X / 2, Window.VirtualResolution.X / 4)canvas.DrawImage(mxImage, Window.VirtualResolution.X - (mxImage.Width / 2) - 2, Window.VirtualResolution.Y - (mxImage.Height / 2) - 2)canvas.DrawText("Press Space to Play!", Window.VirtualResolution.X / 2, Window.VirtualResolution.Y - canvas.Font.Height * 2, .5)EndMethod Update(delta:Float) OverrideIf Keyboard.KeyDown(Key.Escape)MoveToScreen(ScreenBank.GetScreen(Screen.EXIT_SCREEN))EndIf Keyboard.KeyDown(Key.Space)MoveToScreen(ScreenBank.GetScreen(Screen.GAME_SCREEN))EndEndEndClass GameScreen Extends ScreenMethod New(title:String)Super.New(title)EndMethod Load() OverrideEndMethod Start() OverrideEndMethod Render(canvas:Canvas, tween:Float) Overridecanvas.DrawText("Game Screen!", Window.VirtualResolution.X / 2, Window.VirtualResolution.Y / 2, .5)EndMethod Update(delta:Float) OverrideIf Keyboard.KeyDown(Key.Escape)MoveToScreen(ScreenBank.GetScreen(Screen.TITLE_SCREEN))EndEndEndAnd have your folder structure as such:
Monkey1234567891011|-Projects|----|----diddy2|----|------|----diddy2.monkey2|----|----YourGame|----|------|----assets|----|------|------|----graphics|----|------|------|----sounds|----|------|------|----fonts|----|------|----game.monkey2Perfect thanks Peter!
I was disabling filtering on just the images…
Do you have to do it per frame? Edit: yep you do…
November 17, 2017 at 11:40 pm in reply to: Home Run Tri Peaks Solitaire – Out Now on Google Play for Android #11783Thanks nerobot
On my rig* I can run 10k without it dropping frames.
I also changed the controls to:
[/crayon]Monkey12345678[crayon-5cba9ce0bf018435660579 inline="true" ]If event.Button = MouseButton.Left_len = 10Elseif event.Button = MouseButton.Right_len = 1000Elseif event.Button = MouseButton.Middle_len = -100End* 7700K, Geforce 1080, 16GB
“..” isn’t intuitive though and seems like going backwards to me as Monkey 1 had And / Or.
-
AuthorPosts