• 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
JoshuaBaker

System cursor drawing along with DX9 Cursor

10 posts in this topic

II am setting up a DX9 cursor like this...
[CODE]
public void SetHardwareCursor(string fileName) {
_cursorSurface = Surface.CreateOffscreenPlain(Device, 32, 32, Format.A8R8G8B8, Pool.SystemMemory);
Surface.FromFile(_cursorSurface, fileName, Filter.None, 0);
Device.SetCursorProperties(new Point(0, 0), _cursorSurface);
}
[/CODE]

During each render look i am calling ...
[CODE]
Device.ShowCursor = true;
[/CODE]
Otherwise i get nothing, but now it seems like i am drawing the system cursor under my DX9 cursor and they flicker between each other. Iv tried to find any help with this, but to no avail. Any help? Do i need to add more info?
0

Share this post


Link to post
Share on other sites
Iv been able to get rid of the system cursor Form.Cursor.Dispose();, but im still getting some flicker as i move the mouse around. Any clue?
0

Share this post


Link to post
Share on other sites
Hello.
Have you tryed setting the apps window cursor to NULL.
or intercept the message [size="2"][color="#008000"]WM_SETCURSOR[/color][/size]
[size="2"][color="#008000"][size="2"][color="#008000"]case WM_SETCURSOR: [/color][/size][/color][/size]
[size="2"][color="#008000"][size="2"][color="#008000"]{[/color][/size][/color][/size]

[size="2"][color="#008000"][size="2"][color="#008000"]// only change the cursor when it''s within the client area [/color][/size][/color][/size]

[size="2"][color="#008000"][size="2"][color="#008000"]if(LOWORD(lParam) == HTCLIENT) [/color][/size][/color][/size]

[size="2"][color="#008000"][size="2"][color="#008000"] {[/color][/size][/color][/size]

[size="2"][color="#008000"][size="2"][color="#008000"]//base on some onover event for the mouse EG. over a unit or giving a path[/color][/size][/color][/size]

[size="2"][color="#008000"][size="2"][color="#008000"]SetCursor(MainAppPointer);[/color][/size][/color][/size]

[size="2"][color="#008000"][size="2"][color="#008000"] return TRUE;[/color][/size][/color][/size]

[size="2"][color="#008000"][size="2"][color="#008000"] }[/color][/size][/color][/size]

[size="2"][color="#008000"][size="2"][color="#008000"] return FALSE;[/color][/size][/color][/size]

[size="2"][color="#008000"][size="2"][color="#008000"]}break;[/color][/size][/color][/size]
0

Share this post


Link to post
Share on other sites
[quote name='ankhd' timestamp='1340613257' post='4952592']
Hello.
Have you tryed setting the apps window cursor to NULL.
or intercept the message [size=2][color=#008000]WM_SETCURSOR[/color][/size]
[size=2][color=#008000]case WM_SETCURSOR: [/color][/size]
[size=2][color=#008000]{[/color][/size]

[size=2][color=#008000]// only change the cursor when it''s within the client area [/color][/size]

[size=2][color=#008000]if(LOWORD(lParam) == HTCLIENT) [/color][/size]

[size=2][color=#008000]{[/color][/size]

[size=2][color=#008000]//base on some onover event for the mouse EG. over a unit or giving a path[/color][/size]

[size=2][color=#008000]SetCursor(MainAppPointer);[/color][/size]

[size=2][color=#008000]return TRUE;[/color][/size]

[size=2][color=#008000]}[/color][/size]

[size=2][color=#008000]return FALSE;[/color][/size]

[size=2][color=#008000]}break;[/color][/size]
[/quote]

Not sure how to accomplish this in C# with SLimDX, this is starting to bother me, i tried to put off fixing it, but now i really need to get it working.
0

Share this post


Link to post
Share on other sites
Honestly, I've found the DirectX cursor to be glitchy and kindof laggy and I've had better results with the system cursor.

I use LoadImage and SetCursor to load up a full colour custom cursor, created in 'RealWorld Cursor Editor' ([url="http://www.rw-designer.com/cursor-maker"]http://www.rw-design...om/cursor-maker[/url]). I think you'll also need to respond to WM_SETCURSOR for everything to work right. The only problem I'm aware of is a maximum size of 32x32 pixels.
0

Share this post


Link to post
Share on other sites
[quote name='Geoffrey' timestamp='1342180764' post='4958758']
Honestly, I've found the DirectX cursor to be glitchy and kindof laggy and I've had better results with the system cursor.

I use LoadImage and SetCursor to load up a full colour custom cursor, created in 'RealWorld Cursor Editor' ([url="http://www.rw-designer.com/cursor-maker"]http://www.rw-design...om/cursor-maker[/url]). I think you'll also need to respond to WM_SETCURSOR for everything to work right. The only problem I'm aware of is a maximum size of 32x32 pixels.
[/quote]

I looked into that, but i was reading it didnt do full color cursors...i read somethign about it needing to be black and white.

This says one thing
[url="http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor"]http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor[/url]

This says somethign else...
[url="http://msdn.microsoft.com/en-us/library/system.windows.input.cursor"]http://msdn.microsoft.com/en-us/library/system.windows.input.cursor [/url]
0

Share this post


Link to post
Share on other sites
[quote name='JWBaker' timestamp='1342188032' post='4958792']
I looked into that, but i was reading it didnt do full color cursors...i read somethign about it needing to be black and white.
[/quote]

I believe that was the case a *long* time ago. But I've tested a full colour system cursor on Windows 7, Vista, XP and 98 so I don't think you'll have any problems!
1

Share this post


Link to post
Share on other sites
[quote name='Geoffrey' timestamp='1342189128' post='4958800']
[quote name='JWBaker' timestamp='1342188032' post='4958792']
I looked into that, but i was reading it didnt do full color cursors...i read somethign about it needing to be black and white.
[/quote]

I believe that was the case a *long* time ago. But I've tested a full colour system cursor on Windows 7, Vista, XP and 98 so I don't think you'll have any problems!
[/quote]

Ok, ill give it another look, thanks!
0

Share this post


Link to post
Share on other sites
I ended up having to import a native function to do this correctly...Stack Overflow saved me, but not until spending forever searching. Thanks for the help you pointed me int eh right direction
[url="http://stackoverflow.com/questions/6897274/c-how-to-load-cursor-from-resource-file"]http://stackoverflow.com/questions/6897274/c-how-to-load-cursor-from-resource-file[/url]
0

Share this post


Link to post
Share on other sites
Still some issues with this, the mouse is perfect as long as my presentinterval is set to immediate (ie no vsync) but if i enable default or one the the mouse movement becomes unbearably jumpy. Is there a fix for this?
0

Share this post


Link to post
Share on other sites
It seems my issue involves dual monitors :/

[url="http://forums.create.msdn.com/forums/p/98767/588184.aspx"]http://forums.create...767/588184.aspx[/url]

If i turn off my second monitor and/or go into windowed mode everything is perfect...It seems a combo of 2screens and fullscreen causes input events to cause massive slowdown in how the game renders just like the above poster, but i am using SlimDX not XNA 0.o Edited by JWBaker
0

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