Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SmartBoy16

Pages: 1 ... 3 4 [5] 6 7 ... 40
61
this is the code for making the tiles.
Code: [Select]
public Form1()
        {
            InitializeComponent();

            for (int Row = 0; Row < Gh; Row++) // draws grid
            {
                for (int Col = 0; Col < Gw; Col++)
                {
                    Grid[Row, Col] = new Label();
                    Grid[Row, Col].Size = new Size(19, 19);
                    Grid[Row, Col].Location = new Point(50 + Col * 20, 50 + Row * 20);
                    Grid[Row, Col].BackColor = Color.Aqua;
                    Grid[Row, Col].BorderStyle = BorderStyle.FixedSingle;

                    Controls.Add(Grid[Row, Col]);
                }
            }
        }


wait, did i mention that this is being done on a Windows Form?

62
Projects / Re: Codename: Midnight
« on: 2010-02-28, 10:32:32 PM »
Just a quick update.

*Blocks are now placed using the Left mouse button, Once for a solid block, Twice for a downhill block, Three times for an uphill block, and Once more to delete the block. Right mouse button deletes it anyways. Blue blocks cannot be changed.
*You can change the position of the water stream by using the middle button. (Although I did create a smaller blue block so I can figure out where the stream is coming from.)
*Changing directions is more "limited" to four levels each direction.

I've started to design the level designer....kinda. In the map editor, you can use blue blocks to prevent them from being changed later on.

Can anyone figure out the built in puzzle? (Post the solution when you get it)


Here's some questions I demand to be answered:  :P

1. How can I check for a certain tile at the beginning of the game and have the stream start automatically from there?
2. Is there a way to have a tile behave like some kind of container, like only entering from the top and not being able to exit from any direction but from the top again?
3. Is there a way to embed a text file into the .sgdk2 file?
4. Do have any suggestions that I should add to this? I've already got a "rotating-wheel-with-water-buckets" idea.


I'm also thinking of entering this into the 2011 Independent Games Festival later this year.


box.net link: http://www.box.net/shared/ye5d4pj925
YouTube Channel: http://youtube.com/MidnightMascott

Thanks for trying it out.

SmartBoy16 :)

63
1. The question is, Is there an easier way to do this? (forgot to put that in there)

2. it was the way i was taught.
   is there a way i can check once I push u/d/l/r, like in the KeyDown function?

64
This is somewhat related, but i am having a few issues for solidity.

I am making a Diver-dives-into-water-to-get-the-treasure-and-avoid-sharks game for a final. the game is made up of Windows form labels, a "lblPlayer" label as the player "sprite", and a "Grid[Row, Col]" resembling tiles. so far this is what i have to detect solidity.
Code: [Select]
// Move Player
            x += dx;
            y += dy;
            PixelX = Convert.ToInt32(x);
            PixelY = Convert.ToInt32(y);

bool HitSolid = false;
            // Tile Interactions
            for (int Row = 0; Row < Gh; Row++)
            {
                for (int Col = 0; Col < Gw; Col++)
                {
                    if (lblPlayer.Bounds.IntersectsWith(Grid[Row, Col].Bounds))
                    {
                        //if (Grid[Row, Col].BackColor == Color.Gold) DONT DELETE THIS!!! THIS IS FOR GETTING THE TREASURE!!!
                        //{
                        //    btnMap.Enabled = true;
                        //}
                        if ((Grid[Row, Col].BackColor == Color.Gray) || (Grid[Row, Col].BackColor == Color.SandyBrown)) // if the color of the tile is gray (rock) or SandyBrown (ground)
                        {
                            HitSolid = true;
                            //Check Vertical Collision
                            if (dy != 0) //if moving up or down
                            {
                                if (y + 20 > Grid[Row, Col].Bounds.Top && dy > 0) // if passed the top and moving downward
                                {
                                    y = Grid[Row, Col].Bounds.Top - 22;
                                    break;
                                }
                                else if (y < Grid[Row, Col].Bounds.Bottom && dy < 0) // else if passed the bottom and moving upward
                                {
                                    y = Grid[Row, Col].Bounds.Bottom + 2;
                                    break;
                                }
                            }
                            //Check Horizontal collision
                            if (dx != 0)  // if moving left or right
                            {
                                if (x + 20 > Grid[Row, Col].Bounds.Left && dx > 0) // if passed the Leftside and moving right
                                {
                                    x = Grid[Row, Col].Bounds.Left - 22;
                                    break;
                                }
                                else if (x < Grid[Row, Col].Bounds.Right && dx < 0) // else if passed rightside and moving left
                                {
                                    x = Grid[Row, Col].Bounds.Right + 2;
                                    break;
                                }
                            }
                        }
                    }
                }
                if (HitSolid) break;
            }
            if (HitSolid)
            {
                PixelX = Convert.ToInt32(x);
                PixelY = Convert.ToInt32(y);
            }



            // Draw Player
            lblPlayer.Location = new Point(PixelX, PixelY);

this is all done in the timer with a 1 millisecond interval. (basically, as fast as it can go)
im using a keydown for movement and a keyup to stop the player

this is the link to the program in question: http://www.box.net/shared/6ao5z2qmzu



65
Help, Errors, FAQ / Re: High school import help
« on: 2010-02-25, 03:19:15 PM »
here's what you should do to fix this:


1. Add a Tile Category named "Ladder" and add the Ladder tiles from the SHFL tileset. If you set up your player using the example game, you should now be able to climb up the ladders

2. Create a new "Platform" Sprite. (RightClick Sprite Definitions->New->Simple Platform)


I hope this helps. Let us know if you need any other help




Earth to BlueMonk! This topic belongs in version 2 Help.

66
that's exactly what i did! except for the last else i made a new function, copied the IsMousePressed, and changed the "!=" to "==". it works, but I guess your way is a lot easier.

67
I'm just throwing out a few suggestions for the next release.

For the IsMousePressed function, is there a way to add an "Initial Only" thingy to it?
And how about a IsMouseUp Function?

I've completed both on my own by using a series of flags and if/elseif statements (On my next Midnight release) but it would be nice to have those built in.

68
Projects / Re: Codename: Midnight
« on: 2010-02-21, 03:11:57 PM »
^ haha! that's funny! Total Coincidence

69
Projects / Codename: Midnight
« on: 2010-02-20, 12:43:53 PM »
Guess what? I'm (once again) Starting on another project!!!!

The game is called Codename: Midnight. It is a strategy game. The goal of the game is to guide a water fountain to a cup through an obstacle course.

The YouTube Video. http://www.youtube.com/watch?v=_r8qJVzIOWc

the Box.net Link. http://www.box.net/shared/f0rk694k9z




As for the fate of 2wenty Dungeons....................I've got nothing. Sure, I've got the beginning done, but I having a few troubles with......concept. I decided I should start with something simpler. Afterwards I'll get RANAT ported to SGDK2 since I already know the Story and Concept. 2wenty...........it may be a while.

70
Then afterwards, could it detect if the code has been changed and only change those that have been left alone.

71
Off-Topic / Re: Yay!!
« on: 2010-01-31, 03:59:05 PM »
Congrats! I can't wait to graduate myself (Won't happen until about a year from now)

72
Projects / The RANAT Foundation video uploaded
« on: 2010-01-18, 03:52:22 PM »
just for kicks and giggles, i uploaded a video for this game on my YouTube. if you want to see it, its on my channel, http://youtube.com/SmartBoy16

edit: i checked my box and discovered it got 23 downloads (surprisingly ;D )

73
alright, i think i got the masks/rectangle thing figured out the first time.

but thanks for the pause thing. ;)


74
well, with no thanks to anyone >:(, i figured out some of them.

* i got mapped tiles to appear, but they still won't show in messages

* snakes now face in the right direction

* messages still won't pause the game

* i got collisions figured out, although i am confused about the differences between collision masks and collision rectangles ???

* and i figured out the puzzle thing


things im going to add soon:

* using a boulder to solve puzzle
   and when pushing boulder it always moves 64 pix in one direction

* more enemies

* mini map

* and hopefully a boss

75
Projects / 0.1.2 realeased......with 100's of bugs
« on: 2010-01-12, 07:23:16 AM »
im releasing 0.1.2 simply because of many problems i want to work out.

* first, mapped tiles don't seem to appear. and also are considered "empty" when i try to put them in a category; (they appear just fine in the editor)

* the snake enemies wont face in right direction

* messages won't pause the game (am i missing a line?)

* need basic collision detection (hit a snake, lose one health)

* a puzzle thing when you go north and to the right.
   what is supposed to happen: you step on where a square is and it turns on, you step off and it turns off

oh yeah, i added an area where you swim. (i can figure things out on my own :) )


so....yeah, the link http://www.box.net/shared/1zh0yx1qjc

thanks for your help

Pages: 1 ... 3 4 [5] 6 7 ... 40