Help with side scrolling and character sheets
Help with side scrolling and character sheets
Help with side scrolling and character sheets
Help with side scrolling and character sheets
Help with side scrolling and character sheets
Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets
Help with side scrolling and character sheets Help with side scrolling and character sheets
Help with side scrolling and character sheets
Go Back  Xtreme Visual Basic Talk > > > > Help with side scrolling and character sheets


Reply
 
Thread Tools Display Modes
  #1  
Old 05-31-2006, 09:42 AM
Knoton Knoton is offline
Newcomer
 
Join Date: May 2006
Posts: 4
Default Help with side scrolling and character sheets


How would I go about using a sprite sheet as an anaimation? Also how can I choose just a section of a long bitmap to place on a surface, I would guess it is effectively the same thing as choosing the area on a sprite sheet to put on a surface. Is there a better way of doing side scrolling? Here's my project so far if it helps. You just need to change the paths to wherever you extract it to.

EDIT: btw I am using directdraw
Attached Files
File Type: zip DxMario.zip (162.5 KB, 28 views)

Last edited by Knoton; 05-31-2006 at 05:00 PM.
Reply With Quote
  #2  
Old 06-18-2006, 04:32 AM
ben_dover ben_dover is offline
Freshman
 
Join Date: Apr 2006
Location: Australia
Posts: 38
Default

Hi Knoton, I don't have a clue but I need to learn this for my game also, so if you figure it out can you PM me please and I'll do the same if I figure it out.
Reply With Quote
  #3  
Old 06-20-2006, 02:45 PM
ShadowWolf ShadowWolf is offline
Centurion
 
Join Date: Jan 2006
Location: Finland
Posts: 114
Default

If your doing what I think you are this should be rather simple, but obviously your not because then you would already have figured it out. Anyways, to draw a part of the surface (if you want to draw a part of a bitmap then load it into a surface first) is to specify the part you want to draw using a RECT (DX7) or System.Drawing.Rectangle (DX9). So when you Blt it would be something like this (just a guess):

Code:
With R1 'The source
'Set the source dimensions here
End With

With R2 'The destination
'Obviously this is the size of the backbuffer/screen/rendertarget
End With

bmapSurface.Blt(R1, BackBuffer, R2)
For animations where all images are in one image, do something like this:

Code:
'Variables
Dim ImageIndex As Integer =0

'Animation
With R1
.Top = 0
.Left = <one image witdth> * ImageIndex
.Right = .Left + <one image width>
.Bottom = <one image height>
End With

'Do the Blt
I hope that helps.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Help with side scrolling and character sheets
Help with side scrolling and character sheets
Help with side scrolling and character sheets Help with side scrolling and character sheets
Help with side scrolling and character sheets
Help with side scrolling and character sheets
Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets Help with side scrolling and character sheets
Help with side scrolling and character sheets
Help with side scrolling and character sheets
 
Help with side scrolling and character sheets
Help with side scrolling and character sheets
 
-->