Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Map Movement Example
#1
A couple years ago I got this code from Felippe and made a cave shooter game with it as well as a gold hunting game. Today I decided to use Felippe's original example and add my own funny little game map to it. You use the arrow keys to move your guy around the map I drew. The map itself moves unless you are near an edge of the map. This is just an example but feel free to use any or all of the code as well as my map but please keep my "SierraKen" name on the bottom right corner of the map. I'm no artist as you can see, but I like it. Attached is the zip file called Map Movement Example.zip with the .bas and the .jpg files inside. Put both in the same directory. Tell me what you think, thanks.


Attached Files
.zip   Map Movement Example.zip (Size: 725.78 KB / Downloads: 71)
Reply
#2
Great example, @SierraKen.  Nice small code, and easy to understand.  Thanks for sharing. 

- Dav

Find my programs here in Dav's QB64 Corner
Reply
#3
(05-22-2022, 11:55 PM)Dav Wrote: Great example, @SierraKen.  Nice small code, and easy to understand.  Thanks for sharing. 

- Dav

Welcome, and you can use it for just using plain graphics and not a picture file. That is how I made my gold hunting game. I don't know the code off-hand though but I have it.
Reply
#4
Great job with the panning function. I like how that works with a very large image.

You know, it reminds me of one I did back in the old forum that I called Grid-a-pic. A sort of image utility that let you superimpose a square or hex grid over an image, and then save the subsequent grid overlayed image with Steve's SaveImage library. I envisioned it as a role playing map or art tracing aid. I used the same object type and camera AS object setup, which I suspect I got from Felippe as well.

It had a smaller thumbnail navigation window for larger images, then a larger window that displayed the fully zoomed section outlined in the thumbnail.

The only thing I had issues getting it to do was to pan around the larger window via mouse drag properly. Your work inspires me, I might have to dust that one off and try working with it again. I'll have to repost it, if I can get the mouse dragging part working right.
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
Reply
#5
Awesome OldMoses! Yeah how I implemented games with it is by using the POINT command so when your character moves over, or shoots, a certain color on the map, something happens. Smile
Reply




Users browsing this thread: 3 Guest(s)