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.

2D All the way! / Hello, Plasma?!

Author
Message
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 12th Aug 2003 08:54
Hi guys. Well, I have some stupid questions: What the hell is a DLL? Is it a kind of "program" that can handle things faster than normal functions in DBPro? I was wondering if it wouldn't be possible change all the pixels on screen that are, let's say, rgb(0,255,255) to rgb(255,x,y) where x and y would have their values changed to create the plasma effect. Of course point(x,y) would do it, but veeeeery slow since it has to check all pixels one by one... I think I messed up things a bit... if you didn't understand, must be because I'm brazilian and here we speak spanish (only kidding, its portuguese!). Anyway if could help I'd be thankful (did I spell it right?).
998 hit combo 520% damage
keeblerElf
20
Years of Service
User Offline
Joined: 11th Jun 2003
Location: United States
Posted: 12th Aug 2003 09:20
Direct Link Library...think of it as functions written in c/c++

Live life and play video games
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 12th Aug 2003 09:56
Look up "LOCK PIXELS" in the help if you aren't already using it.
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 12th Aug 2003 10:32
Even with lock pixels... it's too slow! Couldn't it be faster with a DLL?

998 hit combo 520% damage
keeblerElf
20
Years of Service
User Offline
Joined: 11th Jun 2003
Location: United States
Posted: 13th Aug 2003 07:38
Doubt it...Probably make it slower

Live life and play video games
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 17th Aug 2003 04:38
So, wouldn't it be possible to make sprites like in some (if not most) games like... Mario, where the sprites have a fix number of colors and their images are only data which informes which color to use in each pixel, so you don't change the color after drawing on the screen, you change before they're draw? I think it would be possible with a memblock, but how do I avoid draw the image using dot (it's too slow)?

998 hit combo 520% damage
HZence
20
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 17th Aug 2003 04:45
"Direct Link Library"

That's dynamic link library...

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 17th Aug 2003 04:53
Everybody errrs.

998 hit combo 520% damage
HZence
20
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 17th Aug 2003 04:57
Errrs?

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 17th Aug 2003 04:58
See? it was an error!

998 hit combo 520% damage
HZence
20
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 17th Aug 2003 07:35
Oh, I get it...

SW Games - www.freewebs.com/swgames

Yeah, I know, I only have one game. Yeah, I know it sucks. But I made it! Me!
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 17th Aug 2003 08:34
But nobody answered my question (above, far above)

998 hit combo 520% damage
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Aug 2003 04:18
Yes it is possible using a memblock.

1) Convert your original image to a memblock
2) Scan the memblock image data for the colours you want to change, and change them
3) Convert the memblock back to a new image (not overwriting the original) and use it (sprite or paste image?)

32bit mode would be easy, 16bit mode would be a little harder, but not impossible.
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 18th Aug 2003 04:53
I understood, but what about some exemples, please!

998 hit combo 520% damage
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Aug 2003 23:03
Ok, this is the function - 32bit images only!



The full test code is in the source button ... a lot of the code is just to ensure that I have a predictable set of colours.

Sprite/image 1 is the original, and Sprite/image 2 is the newly created copy with a changed colour.
Andy Igoe
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 19th Aug 2003 00:32
IanM beat me to the solution but yes that's basically the answer.

Sadly even a DLL would have to do pretty much the same thing so you may aswell stay with the native command set. DLLs are only faster by virtue of being written in C++, but DBPro is also very fast at most tasks when your code is structured and optimised correctly.

Sadly the palette indexing on PC's makes plasma effects very much a thing of silicon heaven, but given that most of them where 16 or 32 base colour for the effect i'm sure they could now be worthy of a comeback.

Long live the Amiga and it's indexed but somewhat cumbersome pixel access!

Pneumatic Dryll
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 24th Aug 2003 20:18
Hey I made a program that edits colors that may be used by sprites... well let me explain, I hope you understand (again, I'm brazilian...)
With this code below you can save 8 different colors but not in rgb, you make numbers that can be used to change color in images using memblocks (only 16 bit). For example the number of bytes you use to make a pixel be white are 255 and 255 (2 bytes per pixel). Then you load these values to easily change the colors of a image (you can change all pixels that are for example 0,0 to 255,255).
I know it looks useless, but change the colors in 16 bit is not easy, saving the colors will save a lot of time. Besides that I don't know any other way to choose the rgb color you want with only two values, and my program handles it!
here are the instructions:
-press the number keys (from 1 to 8) to choose the color you want to edit.
-press r, g, or b to change the values (after pressing, you may press shift to increase faster the value, or control to decrease it)
-a image will apear. It uses the color values you have chosen and it changes it every frame (Plasma!!!)
-press s to save.

Again, it ONLY works in 16 bit. What do you think?

998 hit combo 520% damage
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 31st Aug 2003 06:28
Ok, if don't want to give a opnion...

998 hit combo 520% damage
Dreamora
21
Years of Service
User Offline
Joined: 20th Sep 2002
Location: Switzerland
Posted: 3rd Sep 2003 10:07 Edited at: 3rd Sep 2003 10:08
sorry but you are about 18 years to late ... we aren't in the 16 / 256 time anymore where palette change was standard behavior. today we have graphic cards with 64 to 1024 mb ram so we can afford making different high detail textures for such effekts or in the worst case use pixel shaders.
MK1 Noob Saibot
20
Years of Service
User Offline
Joined: 11th May 2003
Location:
Posted: 7th Sep 2003 04:00
Sorry! Why don't you go back to your 1024mb graphics card and make some games to your mother!!! Oh, by the way, if its so easy you could buy one for me, its very difficult to find this kind of hardware for a price that I can afford here I Brazil...

998 hit combo 520% damage

Login to post a reply

Server time is: 2024-02-24 21:43:50
Your offset time is: 2024-02-24 21:43:50