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.

Author
Message
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 4th Apr 2005 07:40
Ahhhhh (refreshing ahh), my next game after the too complex sidescroller that I tried (in which I did learn a lot about 2D and programming in general), I'm making a new game, simpler, 3D game called Poxies, based off the simple internet game, Pixies. I'm making this thread for all my problems and for everyone else to learn and help with me as I go through the process.

Well that's the intro, now to start, the game Poxies has a simple, and eventually addicting style of gameplay. You aren't a particular character, just the general entity in a puzzle/strategy game. In the game, there is a matrix where there is a green area taking up a certain amount of squares. There are many small spheres bouncing around this matrix, and when you click on a square of the matrix a cube is placed on that square. The cubes are placed around the field and the objective is to get all the bouncing spheres into that green area. (note: the spheres also bounce off the cubes as you place them)

Now for the first problem.

1. How do I place the cubes on the matrix places and only the boxes?, not so it just places where i click, but on the exact matrix square in which I click

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
Mr Pointless
19
Years of Service
User Offline
Joined: 17th Oct 2004
Location: Stuck in the UK
Posted: 4th Apr 2005 08:30
Slightly off subject, do you still want me to send you more of that sidescroller story?

Iwata: "YOU'RE NOT HIM! YOU'RE NOT SUMIYOSHI! EEEEYAAAAAA!"
Sumiyoshi: "Who am I then?
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 5th Apr 2005 11:19
Yes, it's still going to be done, our team just sidetracked to do something a little smaller to learn a little more before we tackle that big thing. We still want your story and are eagerly awaiting it.

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 7th Apr 2005 20:14
So, does anyone know hot to put a cube on just the square of the matrix, so it doesn't overlap even if I place it off center?

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 7th Apr 2005 20:29
Dunno quite what you mean, m8.

Still, when you said 'Poxies', at first I thought it was going to be some weirdo (possibly wierdo) trying to make a proxy system in DB

Seriously, I think the OMGWTFBBQN00Bs are getting to me...

MY BRAIN!!! MKY BEAUTIFUL BRAINARRRGGGGGHhhhhh.......

Mr Blanky - This Time, It's Personal
Neil19533
21
Years of Service
User Offline
Joined: 30th Aug 2003
Location: England
Posted: 7th Apr 2005 22:14 Edited at: 7th Apr 2005 22:14
the way i would go about doing it is to make a sphere and position it where the camera is. i would then send it forward or use the intersect command to see if it has collided with the matrix. when the mouse was clicked it would return the x and z cordinants i would then use a some simple maths and alot of if statments to see what segment of the matrix it was over then place a cube there.
eg: (i dont know if it will work as i havent tested it but it would be something like this.)
If xpos>0<50
if zpos>0<50
position object 1,0,get matrix height(1),0
endif
endif

Any spelling mistakes are totally In tensional.
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 8th Apr 2005 04:37
Here's a start for you to get some concepts. It shows you can create a 3D 'cursor' to get the position on the matrix. Just move the cursor in steps of 20 (or whatever your matrix tile size is).



"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 8th Apr 2005 08:02
Slight mod to above code so you place cubes at matrix tiles properly. It will work whatever camera angle is aswell.



Boo!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 8th Apr 2005 16:19
Nice Spooky!

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 9th Apr 2005 10:07
Yes, very nice, thanks a lot, I'm adapting it to make the cube dissapear if it already exists and you click, not to hard with spooky's code. Now that that's done, when I hide the Newcube, I also wan't it to become intangible, so the spheres don't bounce off of it when it's hidden. What should I do for that?

Edit: I can't seem to get the cube to dissapear with the second mouse click.

There's the code, any advice.

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
The Game Programmer
19
Years of Service
User Offline
Joined: 4th Dec 2004
Location: Sitting, and waiting, and staring, and..
Posted: 15th Apr 2005 09:25
Any help?

Well, I'm trying aren't I.....

When Life gives you lemons make orange juice. Then sit back and wonder how it was done.
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 16th Apr 2005 06:08 Edited at: 16th Apr 2005 06:10
I'm not quite sure if this is what you are trying to do, but here's a stab at it.

A simple work-around to tracking flags in a ton of variables for a ton of objects is to simply change the size. Then read the size (using Object Size Y() or something) to determine how the flag is set. Since you have 3 dimensions to work with, you can set 3 flags using this method. Just make the size difference very small so that it's not noticible to the viewer, but DBPro will still track it.

Example

Scale Object obj,100,99.5,100

This won't be a noticible change in size for most objects. Then you can do whatever you need based on the size data like this:



This is just an example, but the applied concept should work for what you need.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II

Login to post a reply

Server time is: 2024-09-23 17:22:59
Your offset time is: 2024-09-23 17:22:59