pixeltroid
Member
I followed a tutorial for a map that creates a minimap based on actual positions of in-game objects. It works great to an extent because:
a) It automatically renders itself when I go to a new room.
and
b) It shows the real time positions of doors, and when I unlock a door, the door stops showing up on the minimap.
The only problem is that it very poorly renders the wall and ground objects. It looks really shabby and is not something I would want to show.
Here's the code of the minimap object:
Create
Draw
I was wondering if theres a way to add a screenshot of the actual room to the code for the minimap object?
Maybe by taking screenshots of the walls of the entire room from the room editor, shrinking it down to a small sprite and having it appear on the map? But I'm worried because each room is a different size and I may end up wasting time trying to align and scale things for every rooms map.
I also thought of just using clean screenshots of the entire room and having them pop up as a map. But then, it wont show things in real-time, so doors will still show up even when I've opened them, and might confuse things for a player. This kind of bothers me.
Is there an easier way to render all walls and floors neatly without manually taking screenshots, indexing them and coding them in???
Do you have any advice for me?
a) It automatically renders itself when I go to a new room.
and
b) It shows the real time positions of doors, and when I unlock a door, the door stops showing up on the minimap.
The only problem is that it very poorly renders the wall and ground objects. It looks really shabby and is not something I would want to show.
Here's the code of the minimap object:
Create
Code:
xp = 120
yp = 68
height = 120
width = 68
xscale = width/room_width
yscale = height/room_height
Code:
xp = view_xview[0] +350
yp = view_yview[0] + 10
//half faded black bg
draw_set_alpha(0.3)
draw_rectangle(xp, yp, xp+width, yp+height, false)
//count doors
draw_set_color(c_yellow)
draw_set_alpha(.80)
var doorcount;
doorcount; = instance_number(obj_door)
for (k=0; k<doorcount; k=k+1) {
doorid = instance_find(obj_door,k)
var wherex = xp+doorid.x*(xscale)
var wherey = yp+doorid.x*(yscale)
draw_circle(wherex,wherey,2,false)
Maybe by taking screenshots of the walls of the entire room from the room editor, shrinking it down to a small sprite and having it appear on the map? But I'm worried because each room is a different size and I may end up wasting time trying to align and scale things for every rooms map.
I also thought of just using clean screenshots of the entire room and having them pop up as a map. But then, it wont show things in real-time, so doors will still show up even when I've opened them, and might confuse things for a player. This kind of bothers me.
Is there an easier way to render all walls and floors neatly without manually taking screenshots, indexing them and coding them in???
Do you have any advice for me?