• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
riuthamus

In game Minimap Issue

13 posts in this topic

So, we are attempting to make an in game minimap. Right now we have it fully working but the issue is we are unable to add sprites to it for some reason ( for waypoints and such ). We want to add the ability for a player, or the system, to add sprites on top of the map as guidance markers. In doing so we are getting the following issue:

[img]http://ft.trillian.im/0140e49785b1ade2059f928a34d262ef0d32d9cc/6blLPMfsxbnF9S0ZfzTTdKE95gVIz.png[/img]

Some more information that might help you:[list]
[*]im rendering a textured quad and its not showing up
[*]depth-read is off
[*]backface culling is off
[/list]
Any thoughts?
0

Share this post


Link to post
Share on other sites
Is there by chance front face culling and you've ordered the vertex's wrong? Or maybe you've left it with a projection matrix rather than an orthographic matrix? Edited by odrega
1

Share this post


Link to post
Share on other sites
It could either be a problem with:
- Backface / Frontface Culling
- Scissor Rectangles
- Depth / Stencil State and / or -Buffer
- The Viewport

My guess is, that your viewport might be wrong or not assigned at all.
1

Share this post


Link to post
Share on other sites
[quote name='joeblack' timestamp='1350031699' post='4989393']
your w component is 0
cant this be problem ?
[/quote]

Indeed, it was! great job... thank you for the help
0

Share this post


Link to post
Share on other sites
Eh, one more issue...

how to position it (wavepoints) based on world coordinates without being affected by the orthographic camera's "zoom level"
0

Share this post


Link to post
Share on other sites
Sounds like you're essentially in need of a picking solution, just not with the "main" camera as the owner of the matrices used for the screen-to-world unproject call. Off-the-cuff, I would guess you need to first calculate what the "screen" (relative to the minimap as the screen) position of the clicked point is based on zoom level (i.e. the bounds of the clicked area represent smaller ranges at higher zoom levels), and then unproject that screen point into world coordinates.
1

Share this post


Link to post
Share on other sites
We're not placing the waypoints on the map by clicking it. The issue is the orthographic transform affects the display size of the waypoint. If you zoom out, the waypoint is really tiny, if you zoom in, its huge. We would like the size of the waypoint to remain constant.
1

Share this post


Link to post
Share on other sites
Ah, ok, I misunderstood the question.

There's two quick options I can think of:
1) Calculate the relationship between zoom level and scale, and apply a scaling matrix based on that function to the waypoint marker. Though I already don't like that option as much as...

2) Calculate the screen position the waypoint should be at based on zoom level, and then render it using a different, static ortho matrix (unaffected by zoom) with a translation matrix applied to the waypoint so that it's always in the right spot on the minimap.
1

Share this post


Link to post
Share on other sites
So if I understand correctly, you're using an orthographic "camera" set above the terrain in worldspace that looks down on the minimap/player. And you move this camera closer to, or further from, the ground to render the minimap content. Currently, your waypoint marker, which sits out in worldspace, is seen by the camera in the render pass of the terrain. If that's incorrect, disregard everything I'm about to say.

Moving the camera closer to the ground changes the range of the minimap boundaries (i.e. at "normal" zoom, you can encompass 100x100 world-space units, and at "max" zoom it encompasses 10x10 units). If a waypoint is sitting at (10,10) and the minimap is centered over the origin, then the waypoint's draw position on the minimap will be at 10% up and 10% right if you're at normal zoom, but it'll be 100% up and 100% right at max zoom. That's the calculation I'm talking about for determining the waypoint's draw location. Granted this is slightly more work if you're using a smooth-step zoom function, versus fixed increment zoom levels.

As for the rendering scale: obviously the camera moving closer to the terrain (where the waypoint marker sits) will make the marker appear larger. So if you want the waypoint to appear the same size, it can't be rendered with the same view*projection matrix that the minimap camera uses. I'd just make a one-off view*projection matrix that's fixed above the waypoint's object-space coordinates and either set it high enough over the waypoint model that it gives the waypoint the right scale, or scale the waypoint model down for the draw. The translation matrix applied to the waypoint should be calculated so that the waypoint is drawn at the correct position on the minimap render target based on the minimap's zoom level and the minimap camera's position, as mentioned above.

I'll come back and edit with a graphic in a minute, I realize it's kind of a visual thing. Also, this is just how I would accomplish it (had to do something similar for my map editor to draw brush borders and translation grips) but isn't [i]the[/i] way to do it.

Edit:
[attachment=11802:waypoint_example.jpg]
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0