Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [STICKY] Some usefull 2D and 3D tools effects and snippets

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 4th Aug 2018 21:11 Edited at: 4th Aug 2018 22:13
3D Neon Glow Shader With help from Santman finalizing it


Example code on how you use it no media required
fubar
puzzler2018
User Banned
Posted: 4th Aug 2018 21:47
Awesome - very good at your shaders now well done
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Aug 2018 21:06 Edited at: 10th Dec 2018 19:58
Thanks Puzzler2018
Edited fixed a bug which it got when the back buffer wasn't cleared properly

A simple 2D Lunar Lander template using color detection for collisions no media needed



Instructions
Left and Right Arrows steer
Space Thrusts
Land on green you score 100
Land on red you score 200
Don't thrust enough you crash and burn
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 10th Aug 2018 22:30 Edited at: 11th Aug 2018 06:13
For those that remember the Carnival Shooting games at shows I created this
Its not much of a game at present but it does demonstrate picking a 3d object
with a mouse and rotating it



Needs allot of work but Carnival Time Shooting

fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 11th Aug 2018 17:54 Edited at: 14th Aug 2018 11:27
Supernova Shader



Three 2D Circuit Shaders
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 12th Aug 2018 05:40 Edited at: 12th Aug 2018 14:11
Scanlines Shader


2D Pixelate Shader

you could change SetShaderConstantByName(2,"pixels",1024/5,768/5,0,0) //the bigger the numbers the more pixels
to this SetShaderConstantByName(2,"pixels",1024/timer(),768/timer(),0,0) //the bigger the numbers the more pixels
for effect
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Aug 2018 06:27 Edited at: 14th Aug 2018 06:58
2D Fireball Shader


2D Basic Fractal Shader


2D Flame Shader

fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 14th Aug 2018 07:52 Edited at: 15th Aug 2018 23:03
Heres a variation on the 2D Basic Fractal that makes use of the texture images colors


2D Lightning Shader
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 18th Aug 2018 00:08 Edited at: 31st Mar 2020 07:40
A 2D Checkerboard effect I have been working with that I believe would be good while you are creating your gameworld great for pixelated games or perhaps Minecraft

There are setting that you may wish to play around with


Amiga plasma effect


Heated Flames with smoke and sparks try playing around with sprite 1 transparency and use a proper background image for sprite 2

fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Aug 2018 22:03 Edited at: 25th Aug 2018 23:20
11 Different Shaders all in one program press space to change (no media required)
2 types of spirals both shown with and without textures, one paralax scrolling one, 2 types of static, one with and one without texture
and a kaleidoscope effects one with texture and one without and easily changed by uncommenting lines in the shader



A globe that has towers that shoot at the plane you fly in orbit around a planet (I use the media available in the AppGameKit 3D media pack

Here is its thread where there is a video showing it working https://forum.thegamecreators.com/thread/222833
fubar
puzzler2018
User Banned
Posted: 2nd Sep 2018 17:50
Thought you might like me to add this to the collection



fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 2nd Sep 2018 19:36
Thankyou
fubar
puzzler2018
User Banned
Posted: 3rd Sep 2018 21:33 Edited at: 15th Nov 2019 01:27
3D Letters
Tier 1 Developer
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 5th Sep 2018 00:59
A 3d Atmosphere Background Shader just place on a object plane at the back of your scene
vs shader



ps code


fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 7th Sep 2018 03:53 Edited at: 7th Sep 2018 13:32
3D Exploding Block


Ideally you want several models that are parts of one whole model they would all share the same location, offsets and textures

fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Nov 2018 20:24 Edited at: 1st Nov 2018 21:48
A gyroscopic mouse


very simple piece of code but can be quite handy


you could also change

to this for a 45 degree offset
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Nov 2018 10:28 Edited at: 16th Nov 2018 10:32
Not so usefull to most the people who use this forum
But I wrote a PDF one weekend quite a while ago
Performing PC;s For Dummies
available free here http://users.tpg.com.au/subarpk/Performing%20PC's%20For%20Dummies.pdf


It covers all versions of windows with pretty pics but needs updating for windows 10
fubar
puzzler2018
User Banned
Posted: 16th Nov 2018 14:00
Wow - thats super impressive Fuparpk and would help people a lot make there systems run a bit smoother.

Is it possible to make a slight change? - 1MB equates to 1024 bytes not 1000

But awesome material apart from that
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Nov 2018 15:50
Quote: "1MB equates to 1024 bytes not 1000"


Of ofcourse lol it was thrown together on a weekend maybe I thought it was simpler to understand I don't remember lol
fubar
puzzler2018
User Banned
Posted: 17th Nov 2018 18:15
Hope you dont mind the add

Object / File encrypter



Decrypter


Encrypt object, like a OBJ file

Decrypt - the AGM file - these are the files that should be packaged up to your distributions

It can be tidied up a lot, but this is the principle and though would be useful here instead of the meshmemblock thread


Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 17th Nov 2018 18:19
Thanks Puzzler
fubar
puzzler2018
User Banned
Posted: 18th Nov 2018 17:04 Edited at: 18th Nov 2018 17:05
Here is version 2 (includes a packager)

Encryption module - run this on your media before when your ready to ship - keep a backup of the media



Decrypter - use these functions in your app along with the AGM fiie that the above creates



It will package almost any type of file up...you just require to add the code in for that type of file.. eg. if its a sound file etc


Example AGM included to be used with the decrypter

If need any support, give me a shout and ill help code it in

Enjoy folks!!

Attachments

Login to view attachments
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Dec 2018 08:31 Edited at: 2nd Dec 2018 00:26
A pixelated noise shader could possibly be used for that pixel game while thinking perhaps a pause don't know I use a noise image
but the image makes no difference to how the shader will look so any will do



Edited fixed a silly error
fubar
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Dec 2018 10:25
@fubarpk Nice effect ....it looks like my TV doesn't work
I'm not a grumpy grandpa
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 1st Dec 2018 20:56
Very nice. Might make a nice transition effect
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Dec 2018 21:10 Edited at: 2nd Dec 2018 03:27
Thanks Chafari and Blink

The transistion effect is a good idea perhaps while the world is built behind it
fading its alpha once the world is built


2D Waves Shader HAHAHA two ships sales the seas
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 8th Dec 2018 22:30 Edited at: 11th Dec 2018 18:22
Rubiks Cube Puzzle Game Creates all its own media and now has a json load/save feature

fubar
puzzler2018
User Banned
Posted: 8th Dec 2018 22:34
niiiiiiiiiiiice - good works as usual
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 9th Dec 2018 06:46 Edited at: 9th Dec 2018 08:24
Thanks puzzler
fubar
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 9th Dec 2018 15:26
@fubarpk Nice one ! I hade to put some sleep here and there to have control . You could make a system to work with Mouseclick over row and columns . I remember when I could resolve it long long ago
I'm not a grumpy grandpa
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Dec 2018 20:35 Edited at: 17th Dec 2018 21:45
Traffic Lights Shader

Source obtained here
http://users.tpg.com.au/subarpk/trafficLights.rar

Easy enough to make it red in the other direction while its green but I did it like that for example purposes
fubar
puzzler2018
User Banned
Posted: 16th Dec 2018 20:39
Nice.... Shaders not my thing but can be created without too.

Excellent find.
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 16th Dec 2018 20:42 Edited at: 16th Dec 2018 20:43
Thanks puzzler I added extra textures to my old light shader. So you now can have multiple light colors
usefull for traffic lights

if you want to browse the code without downloading
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Dec 2018 21:52 Edited at: 15th Nov 2019 01:31
3D Score Board
Im only supplying the code below and not the 640*112 image made up of 64*112 numbers but it should be easy enough to create.
I haven't got much online space to host images unfortunately: (:

Edited heres the image
http://users.tpg.com.au/subarpk/fontblu.png
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
puzzler2018
User Banned
Posted: 27th Dec 2018 21:59 Edited at: 27th Dec 2018 22:00
Just tried and fontImg doesnt seem to be known - line 36
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 27th Dec 2018 22:06 Edited at: 27th Dec 2018 22:10
Sorry need to have you own fontimage that's a spritesheet 640*112 made up of 64*112 numbers

try this font image
http://users.tpg.com.au/subarpk/fontblu.png
fubar
puzzler2018
User Banned
Posted: 27th Dec 2018 22:08
doh - i didnt read it fully i was too zoned into Snippets - thats cool though

fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Jan 2019 13:58 Edited at: 15th Jan 2019 17:38
Mesh creator from a image 1.9 where black areas are removed after,


map.png here



There is two height functions

1>smoothHeightFunction(filename$)
2>normalHeightFunction(filename$)
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 1st Jan 2019 22:16
This one wasn't by me but by Chafari but I think its very usefull
Find the VertexData of an Object presently shows the vertex's of a cube but easily changed
fubar
puzzler2018
User Banned
Posted: 1st Jan 2019 22:41 Edited at: 3rd Sep 2019 06:40
LED BOARD
Something else to add to this

Can use your own image if you like to, this currently renders ts own image

Tier 1 Developer
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Jan 2019 22:46
Thanks fubarpk enjoy !
I'm not a grumpy grandpa
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 1st Jan 2019 22:48
Nice effect puzzler...looks like a TV screen !
I'm not a grumpy grandpa
puzzler2018
User Banned
Posted: 1st Jan 2019 22:51
Thanks

Yeah I got inspiration one day with concerts - X Factor - behind the singers is a LED Board displaying what ever

Cheers
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 15th Jan 2019 17:35 Edited at: 15th Jan 2019 17:53
Blitzkrieg


Features
All media created with code
Uses 2D Physics

KEYS
Left Arrow =Rotate Left
Right Arrow=Rotate Right
Space Key =Shoot

Quote: "For those interested puzzler has started a thread for finished games with source at the below link"

https://forum.thegamecreators.com/thread/223468
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Jan 2019 00:51 Edited at: 22nd Jan 2019 00:57
Asteroids

Features
All media created with code

KEYS
Left Arrow =Rotate Left
Right Arrow=Rotate Right
Up Arrow =move forward
Down Arrow = Brake
Space Key =Shoot
fubar
chafari
Valued Member
18
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 22nd Jan 2019 01:02
@fubarpk That is nice !! It moves smooth as a fish in water ...lol I had to remove the (GetWindowWidth/height ) perhaps no decared
I'm not a grumpy grandpa
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Jan 2019 01:23 Edited at: 22nd Jan 2019 01:42
Thanks
Quote: "GetWindowWidth/height "

that's an update and an alternative to getdevicewidth() and getdeviceheight()
fubar
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Jan 2019 04:52 Edited at: 22nd Jan 2019 05:11
Space Invaders Might serve as a template for someone who wants to make a better version


Features
All media created with code
No global variables

KEYS
Left Arrow =Move Left
Right Arrow=Move Right
Space Key =Shoot

Whats not included in this version
The barricades are only for show. (I figure the best way to have working barricades is to use memblocks and delete
chunks of the block as necessary which would require using color collision detection for all collisions like
in my lunar lander)
There isn't a UFO that comes along the top for mystery points
No Sounds and no Animations
fubar
puzzler2018
User Banned
Posted: 22nd Jan 2019 08:10
Some really good old apps here. Well done to bring back to life. Love space invaders brings back some fond memories
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 22nd Jan 2019 08:50
Thanks Puzzler lol I wasn't that good at arcade version I preferred pinball then but did do very well in an Atari space invader
comp on an old Atari cartridge system I made it to the finals but missed out by a few hundred on getting a prize
fubar

Login to post a reply

Server time is: 2024-11-23 09:34:44
Your offset time is: 2024-11-23 09:34:44