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.

DarkBASIC Discussion / Dark Noob Games HQ

Author
Message
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 18th Nov 2008 04:42
Quote: "But the idea was to introduce the finished project, so as to attract programmers."


True, but I am thinking we should take a page out of the microsoft book: Release first, then patch.

We have most of the kinks worked out, lets get the file loading in the editor worked out and release it.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 18th Nov 2008 04:49
Agreed!


I download memory.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 18th Nov 2008 10:02
Quote: "True, but I am thinking we should take a page out of the microsoft book: Release first, then patch."


LOL I like that.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 18th Nov 2008 17:20
Looks like the forum has some problems with firefox compatability. The links at the top for the index ONLY work in internet explorer. If you are using this, thats fine, if not, I do have threads at the top of each forum with a link to the main page (or you could just bookmark it or something). Still trying to figure out whats wrong. If you can use the link and have firefox, let me know, so that I can know if it is just me.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Sinani201
16
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 19th Nov 2008 01:58
Quote: "Looks like the forum has some problems with firefox compatability. The links at the top for the index ONLY work in internet explorer. If you are using this, thats fine, if not, I do have threads at the top of each forum with a link to the main page (or you could just bookmark it or something). Still trying to figure out whats wrong. If you can use the link and have firefox, let me know, so that I can know if it is just me."


Really? I'm using Firefox and everything looks fine. The only problem is that sometimes pressing the "Newest post" button takes me to the first post in the thread. THis might be because I'm using Linux, but I'm still using Firefox...


"I reveal my trap card, GEORGE DUBYA BUSH!
America loses 2000 Life Points! America loses." -Deucalion2
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 19th Nov 2008 02:03 Edited at: 19th Nov 2008 02:06
What about when you click on the DarkNOOBS Games Index link? I always get a 404 error.

On topic:
Any other ideas for the next project?

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 19th Nov 2008 02:30 Edited at: 19th Nov 2008 02:35
I was thinking an RPG?

I think it's possible now...

Sinisterstuf?

You there buddy?


I download memory.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 19th Nov 2008 03:24
Rpg would be interesting, but a BIG jump from what we did, not to mention that there are still some coding skills we as a team need to refine (comments, structure, subroutines/functions, etc). I am thinking hold off on anything with a storyline for another project or two.

Who would be managing it? I could, or someone else could (I may even sit in and join in the coding on this one, I am far from perfect with code structure).

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 19th Nov 2008 03:25 Edited at: 19th Nov 2008 03:26
It would be a big jump.
You have any ideas?
Quote: "Who could be managing it?"




I download memory.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 19th Nov 2008 03:29
Sorry, I meant WOULD.

How about a mario type clone. It is generic enough that we don't have to worry about complex dungeons and yet at the same time can get into some REAL game development.

or

AN MMORPG WITH SUPER AWESOME WOW KILLER GRAPHICS AND A PLOT THAT DOESN"T GET OLD AND WE WILL SELL IT TO SOE OR BLIZZARD CAUSE IT IS SUCH AN AWESOME IDEA!!! (had to say it...we are darkNOOBS after all )

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 19th Nov 2008 03:47
Quote: "Sorry, I meant WOULD."

You said that. I was joking.
I'm saying whos capable of managing it, but insane enough to deal with us noobs.
--
Mario type clone would be cool, however, I have no idea how to make scrolling platformers. Perhaps others do.
--
An mmorpg? Seriously dude!? We'll put in like... 40 worlds... each with a 20k players max. I want some insane graphics. And like... a few dozen skills. THAT WOULD BE SO SWEET11111111111!!


I download memory.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 19th Nov 2008 04:10
No...not sweet....it would be 1337!!!!!

The mario clone I think would be simple enough. Will test out an idea I have had for a while and get back here with the results within the next day or so.

Anyone else have any other ideas?

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 19th Nov 2008 05:04 Edited at: 19th Nov 2008 05:09
Quote: "Rpg would be interesting, but a BIG jump from what we did, not to mention that there are still some coding skills we as a team need to refine "

I agreee.

Mario-clone will be great. I did some experiments with side scrolling on my verion of the map editor, I think the method I used there should work here too.
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 19th Nov 2008 05:16 Edited at: 19th Nov 2008 05:16
Here's an idea:

Stickman Ninja: Destiny's Cavern


I want you Stickman Ninja...

As Stickman Ninja you battle the swarms of foes in Destiny's Cavern... Collect shurikens (star shaped dart like objects thrown by ninjas) and coins, as you attempt to face the hords. Purchase upgrade shurikens, health potions, and more, to better help you destroy your foes. Do not fail me...

--

Again, just an idea.

If you like it, I can create a shop style thing.

My own ninja edition would NOT be associated with this. We'd consider this the first.

I just thought the ninja/RPG element would be fun. The CPU might be quite challenging though.


I download memory.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 19th Nov 2008 06:44
That might be a good next NEXT project, not sure though. Would need some more info regarding gameplay before we could really make a decision on if we are ready to do it this time or next.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 19th Nov 2008 15:57
I think the Computer would be too complicated for our next project.


I download memory.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 19th Nov 2008 18:33
How bout we make a 2d side scroller like mario but replace mario with a ninja that can throw suriken instead of fire balls.

Ofcourse the ninja will be drawn and animated and not be stickman.

I'm also an artist, I can handle alot the graphics if needed.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 19th Nov 2008 20:04
How about no projectiles at first. If we go with the mario clone, the steps would be to first get it working with a normal mario. The only upgrade I would say should be planned on at first, is the mushroom. Then, once we get everything worked out, we can add in projectile upgrades.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 19th Nov 2008 21:02
Would there be enemies?


I download memory.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 19th Nov 2008 21:40 Edited at: 19th Nov 2008 21:43
More Mario Type enemies, that just do the same thing and if they touch you you die (just no football guy...he was annoying)

Quirkyjim you still here? You can suggest some things if you have any ideas.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 20th Nov 2008 00:19
Alright.

Anything I can start with, or do you want to wait?


I download memory.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 20th Nov 2008 01:35
First, lets try to get some more people interested (hopefully people who will see it all the way through). We definitely need some new blood, since the goal is to pull in noobs and teach them.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 20th Nov 2008 01:36
Post the finished program in program announcements?


I download memory.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 20th Nov 2008 02:10
Right. Here is the latest code, try to track down the problem with the editor loading and then go ahead and post it.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?

Attachments

Login to view attachments
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 20th Nov 2008 02:19
Will do.


I download memory.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 20th Nov 2008 05:13 Edited at: 20th Nov 2008 05:16
Found the proplem and fixed. Was an old line in the FileIO.


Explanations:

To be able to search for the file names you'll have to change path to that folder first using.


It use to be that after changing path, we'll stay in that folder until the end of FileIO then change back to source path, but if there's an error and we get boot back to the editor the path doesn't reset and if the program is ran again, there will be a "cannot find file" error.

The codes was then changed to - Change_Path / Find_Files / Change_Path_Back / Run the rest of FileIO.

After the changes was made the line used in the above code was not updated.

It should be corrected to.


This line was neccesary in the first place because we can also type in the file name we wish to load up thus checking if it exist is needed to prevent an error.

---------

There was another error when clicing on "Close" while in the FileIO. It was fixed by adding this line into the Main Code in the "Load:" Subfunction right after checking for "filename$=FileIO(***)".


If you cancel or close while in the FileIO it will return nothing "". This line will just return you to the previous screen.

Attachments

Login to view attachments
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 20th Nov 2008 05:25 Edited at: 20th Nov 2008 15:58
You're the best!

Now we can post it. I was having trouble saving it before.


I download memory.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 20th Nov 2008 06:50 Edited at: 20th Nov 2008 06:55
I started experimenting with the ninja Idea. See if this is usable.

Attachments

Login to view attachments
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 20th Nov 2008 16:18
Nice Images! I noticed the controls don't work when the character is moving though. For example, when he's changing in x, he can't jump or do anything else.


I download memory.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 20th Nov 2008 18:27
I was just a test, all I put in was the move left and right and it didn't even mirror the image going left. Was more focused on the coding method not the gameplay.
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 20th Nov 2008 19:49 Edited at: 20th Nov 2008 19:51
I see.

I really love the images...

And it is a good format.


I download memory.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 20th Nov 2008 22:19
Thanks.

I have no experience with platforms and hitbox, hopefully someone's done some befor?
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 20th Nov 2008 23:25
I've tried multiple times. The best I've gotten:

Obviously it has a few (hundred) flaws:




I download memory.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 20th Nov 2008 23:57
That's cool it works
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 21st Nov 2008 00:05
But notice what happens when you hit the blocks in the side.


I download memory.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 21st Nov 2008 08:28
Here is an idea, though, I in no way know if it will work, but if someone wants to experiment, be my guest.

The idea is that each pixel is like the map for our last project. However, instead of 14x14, it is 640x480 (or more for sidescrollers). Use an array to store the data, and use memblocks to read the image data (faster than point by about 1000x). So, you load the image, scan it into the array, then you can just check if the "tile" to the side of the furthest point from the center (the point on the player with the largest difference of x and y in the direction of motion, might need some sin and cos for that one)= anything, then you can just say don't move. If it is open, then move.

If I ever manage to get some free time I will try it out, but I have been REALLY busy as of late. Sorry guys, looks like I am out for running the next project unless a miracle happens.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 21st Nov 2008 18:08
I've never really used memblocks befor, just read about it on the forums. How would we go about using it in really long stages?
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 21st Nov 2008 18:45
Well first you would take the image of the screen, lets call it image one. Then you make a memblock of it (since memblock colors are weird in 16 bit, we will simply use color for blocked and no color for open) using the MAKE MEMBLOCK FROM IMAGE command.

The first 12 bytes (0-11 I believe) contain data about the width height and depth of the image.

Then come the color data reading (if I recall correctly) left->right top->bottom. You read the memblock word (could be wrong, whichever one is 2 bytes). If it is 0 (or the empty color) then the array gets set to 0 at that point, if it is a color, the array is set to 1 at that point. Will try to post some example code if I get the time.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 21st Nov 2008 19:32
Ok I tested the memblock out, only problem is it's kinda slow for me. So I'm testing out the CheckArea() Function that's so popular.

Here's what I got so far. Press up to jump, platform should work.

Attachments

Login to view attachments
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 21st Nov 2008 19:53
The checkarea function might get kinda trick to use later on. Only other problem so far with it is that you can jump through the platforms, just not fall through them. Other than that good work, I will try to get the memblock thing going.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 21st Nov 2008 21:03
If you have the images of the screens ahead of time or you only take a snapshot once or once in a while, it could work. If you take images of the screen and convert them to memblocks in real time with the frequency of a loop iteration, your program will crawl.

There's a simple trick you can use to make 32 bit and 16 bit color reading easier. Without going into great detail, 16 bit color code can be different for every graphics card and thus different in the memblock. There's many ways to do this but here's one:

Setup two maps. Your real map that the user sees on screen and interacts with, and a second map that is just the base colors of the objects on the real map. If there is a wall, maybe it's just a yellow block on the base map. If there is a ladder, maybe it's just a red block or rectangle on the base map etc. All in all for all the components of the map you might have 10 or 20 different colors. It doesn't matter as long as a solid color on the base map is representative of the different features of the real map.

For any bit display, we need a way to determine the colors that will be read from the base map. Create an image of the base colors in a row, convert that image to a memblock and read back each of the color values and store them in an array. Now no matter what graphics card does the reading, the 16 bit colors will be specific to that machine.

For this example there are only three major colors that will be used in the base map - blue green and yellow. An image can be made using the dot command or in a paint program and loaded. It should just be a row of pixels of the base colors. We convert this image to a memblock and read the depth (DWORD at byte 8) to determine the number of bytes to read for each color. We store the colors in an array so we can reference them later:



This code will store your base colors for 16 or 32 bit. You use this information to compare the position of your character with the color on the screen relative to the base map (which of course is relative to the real map) and react appropriately.

If the size of your objects that make up the real map - ladders, blocks, whatever, are all the same size, each item on your base map can be represented by a single pixel. Therefore, the entire map can easily be stored in an array. When comparing your character to the position on screen to your base map, just divide it by the size difference. If your full map is 640x480 and each block is 32x32, then your characters position on the base map is screenx/32 and screeny/32. You compare the value in the base map array against your base color array, and you know where and what your character is on, or next to.

If everything is uniform and laid out in blocks, there's no real advantage to this because eveything could just be done with arrays. However, using this method, you could draw a map freehand any which way you want but have a few color keys to determine impassable areas or conveyances. In which case you may not have a base map but you'd still need to convert the color keys to 16 bit values if necessary. I'm rambling - hope this is slightly understandable.

Enjoy your day.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 21st Nov 2008 23:18 Edited at: 21st Nov 2008 23:33
@Latch
you gave me an idea to use with an array.

I made an array that would be used like the memblock would have. Made a MapKey(100*32,20*32) array, during the Load Map subroutine while loading the data into the map(x,y) array, I'll also load up colors into the MapKey() using a For Next.

It seems to work right now.

Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 21st Nov 2008 23:50
We should change the name since I'm still on the team.

DarkNOOB Games

This stuff is far too complicated for my wee little brain.


I download memory.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 22nd Nov 2008 00:39
Lol, true. This was just sorta a spitball idea while we decide on the next project.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 22nd Nov 2008 01:44
Sorry! To simplify the idea, think of a memblock as a container. The container is divided up into small pieces called bytes. Each byte stores a single number. In DBC, colors are generally stored as 2 bytes (16 bit) or 4 bytes (32 bit). If in full screen mode you had used SET DISPLAY MODE 640,480,16 then anytime you create a memblock from an image, the colors in the memblock would be 2 bytes. So if in full screen mode you had used SET DISPLAY MODE 640,480,32 the colors in a memblock made from an image would be 4 bytes. That means each pixel from your image would be stored as either 2 bytes or 4 bytes. You can convert these combinations of bytes to a single number by either reading back a WORD for 2 bytes or a DWORD for 4 bytes (DWORD stands for Double WORD).

You can look at an image in a memblock as already being an array to the pixel data. All you have to do is point to the correct position in the memblock. BN2's original premise is right on. You could effectively create code that points to the postion in the memblock and reads the pixel and compares it to where you are on the screen. If the pixel is a certain color, then do something.

I was proposing that you create a second map that is a simplified version of the real map with just solid block colors that represented the objects or pieces that make up the real map. As I was typing, I realized the second map doesn't have to be the same size as the real map if the objects are all the same size. Each square of the second map could be represented by a single pixel. Then I realized, if you made the second map a single pixel, you don't need a second map at all, you could just store the block positions in an array.

Now if your objects are different sizes, the memblock method comes in pretty handy. It would be faster than checking the area within type code and WAAAAYYYY faster than using POINT().

@Ashingda 27
Your idea looks good. The sizes of your array have me a little confused. I don't understand multiplying the indexes * 32. If the whole map is divided into blocks - bricks, ladders, trees, etc. the index of the array should be sized according to the number of blocks in the map. So if a map was the size of the screen (640,480) and each block was 32x32 then the index might be dim map(20,15) where (x,y)=block type . But maybe you are trying pixel perfect collision so you are storing each color of the 32x32 block in a single index? Therefore the * 32 ?

Enjoy your day.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 22nd Nov 2008 02:21 Edited at: 22nd Nov 2008 02:23
32x32 is the size for the tiles. This was supose to be a sidescroller platform game so MapKey(20,15) will not be big enough that's where the map(100,20) came from. but only 20x15 or so will be drawn onto the screen as we slide through.

The MapKey() array is supose to be large enough to hold the whole map image but only the color keys. That's why it needs to be large enough to fit all the pixels therefor multiplied by 32.

So when drawn onto the screen we will see "LEFT" but while checking for collision we will be checing "RIGHT".



I chose to test this out cause I found a way to load it up in the same time loading the map() array. So far it seems to work, but I'm sure there are better ways. I also dont know how much an array can hold so I just picked 100,20 x32.

Attachments

Login to view attachments
Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 22nd Nov 2008 02:31
never thought of it like that ashingda 27. the mapkey() array. can you explain what it should do in more detail?

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
Irojo
15
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 22nd Nov 2008 02:39 Edited at: 22nd Nov 2008 02:39
Okay, it's starting to click.

What numerals are in a byte? like 0-9, or just 0 and 1?

And how do you know what the color is then?


I download memory.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 22nd Nov 2008 04:41
A byte ranges from 0 to 255 . It is an 8 bit number. A color has three components : red, green, and blue. Each component ranges from 0 to 255. The color bytes are placed next to each other in memory. In a bitmap file that is saved on your harddisk, the order of the bytes for a single color is blue green red . In a memblock, it is red green blue . The combination of these numbers is what determines the final color.

The value of the red position is 65536 * (0 to 255)
The value of the green position is 256 * (0 to 255)
The value of the blue position is 1 * (0 to 255)

So if we were reading a color out of a 32 bit memblock (4 bytes), we would use a DWORD to read it. If the color was white, the 4 bytes in the memblock would look like 255 255 255 0 . So the actual value of the DWORD is
65536*255
256*255
1*255
0
Add these together and that is the color value (16777215). This is based on 24 bit (3 bytes) or 32 bit (4 bytes where we don't count the last byte for color in DB - if it's other than 0, the whole value changes...) .

In 16 bit, that's only 2 bytes, the graphics card has to perform an in between calculation to divide 2 bytes into 3 color components. It may divide the two bytes into 5 bits 6 bits and 5 bits, because it only has 16 bits to work with, for the three color components.

Enjoy your day.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 22nd Nov 2008 05:01 Edited at: 22nd Nov 2008 08:56
Quote: "never thought of it like that ashingda 27. the mapkey() array. can you explain what it should do in more detail?"


[Note] This is not a tutorial, this is just an explanation of why I do what I did. I'm a Noob after all.

I read a tutorial somewhere on this forum about making buttons for menus, a very well written tutorial I might add. It explained 3 ways how to set up buttons that can be clicked on.

1) Was the CheckArea() Function

2) Was to use a Bitmap with Point()

3) Was to use sprite collision.

This is similar to the (2) using bitmap and Point() where it checks the color on the screen to see if you clicked on it.
It's useful in making button that are abnormal in shape, take a Star or Cirlce for example.
On the main screen you'll have the image button but in the second bitmap you get a duplicate of the button but it will all be in one color. Each button will have a different colorkey.

Instead of checking the Bitmap with Point() "Which is SLOW as HECK" each pixel that was supose to be on the bitmap is stored into an array, that would be the MapKey() or what ever name suits it.
While checking to see if I'd landed on a platform of hit a wall I'd check the MapKey() array instead.

I'm sure this is not indepth and not well written but it's the best I can explain it. My REMs might be more helpful than my writings


[Edit]

-Update-
Added a mapmaker and a new map. Got it to Scroll as you move and fixed the jump a bit, but the dude still keeps on getting stuck on the walls every now and then, I'm having a rought time figuring that out.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-02-21 06:43:30
Your offset time is: 2024-02-21 06:43:30