I'm PRO!!!.... Not -,-

BlitzPlus Forums/BlitzPlus Beginners Area/I'm PRO!!!.... Not -,-

InvincibleWall(Posted 2011) [#1]
well after 3 months of goofing off with code and such I came with a bunch of cool things and figured out a bunch of things NOT to do

and I now have a bunch of questions that I'm not sure belong in the beginners area but I don't think it will matter since its the pros who help out here anyway



1. How is it possible to make these games, where the ground shape is constantly changing, how do you do it while it isn't flat anyway
*EDIT how exactly do you detect collision *EDIT*



2. what is the easiest way to transfer a file from one computer to another using 2 Blitz written programs (not USB, not Network, not Duh answers)
*EDIT* well using a network or internet, just using a Blitz Program, not the Windows Explorer Style *EDIT*

3. HOW DO YOU DO THIS!!! lol I can't draw a simple circle and I'm trying to attempt this:

*EDIT* btw the circle i'm talking about is the green one in the background
where when the 2 circles collide the area where they crossover isn't drawn, and in the seconds where 2 opposing circles collide they are divided evenly with a line *EDIT*

*EDIT* I am trying to draw a simple circle, so that i can figure out how to do this *EDIT*


I tried using an equation for a circle and solving it for y then adding 1 to x until it went all the way around.... this makes a circular set of dots... but even if you get them to connect there are 2 huge gabs on the laft and right side. I could fix this problem by drawing lines from point to point but I want to know a "correct" way to do it also I looked at the algorithms in the code archive, but they weren't commented so I didn't really get what they were doing



PS: A simplified description along with a code example would be AWESOME!

Last edited 2011

Last edited 2011

Last edited 2011

Last edited 2011


Andy_A(Posted 2011) [#2]
The destructible terrain code can be found here:
http://membres.multimania.fr/blitzcoder/cgi-bin/code/Wcdb4ee406b3f7.htm

It's an archive of the old Blitz Coder website. It was posted 7 years ago and I'm pretty sure it could be used for both the terrain and the green circle question.

Another snippet that might help is one written in BlitzMax.
http://blitzbasic.com/codearcs/codearcs.php?code=2295

You mentioned that you tried to draw a circle with out using the 'Oval' command. There are snippets in the code archives that show how to do what you want.

http://blitzbasic.com/codearcs/codearcs.php?code=2817
http://blitzbasic.com/codearcs/codearcs.php?code=2589

To search for stuff on this website use Google like this:
blitzmax.com: Bresenham circle <----Place in search box


InvincibleWall(Posted 2011) [#3]
Thanks for the help, but let me clarify a little on the breakable terain, I don't understand how the physics of it works, I could draw a crazy line all over the screen but I couldn't make a guy walk on it. I can't figure out how to check a collision on a line that isn't straight.

And on the circles, I found those same pieces of code, but they werent commented enough for someone who has no clue how to draw a circle to learn how to draw a circle. I will probably end up altering the circle code till I figure it out. And what I'm trying to do with the circles is to draw two colliding circles (like a vin diagram) but instead of them meshing together they stop and form a line perpendicular to the line made by their center points

Thank For the help you were able to give


Andy_A(Posted 2011) [#4]
This could help you get started.
http://www.blitzmax.com/codearcs/codearcs.php?code=2834

That function gives you all the info needed to do what you want. All you need to do is look up the Atan2() function to use the centers as one point and the intersection coordinates to find the start and ending angles of the arcs you need to draw.


Here's a simple function to draw arcs to get you started.


Last edited 2011