Mirage Source

Free ORPG making software.
It is currently Fri Apr 19, 2024 11:58 am

All times are UTC


Forum rules


Make sure your tutorials are kept up to date with the latest MS4 releases.



Post new topic Reply to topic  [ 1212 posts ]  Go to page 1, 2, 3, 4, 5 ... 49  Next
Author Message
PostPosted: Mon Apr 13, 2009 9:11 pm 
Offline
Pro
User avatar

Joined: Sun Aug 05, 2007 2:26 pm
Posts: 547
Ok, so this tutorial will make it so that you can putin any size tilesheet with any width and the game will figure out its width and change TILESHEET_WIDTH accordingly. The first thing we have to do for this is make a horizontal scroll bar for our map editor, otherwise we can't use tilesheets bigger then our map editor.

Go to frmMirage,and add a new horizantle scroll bar under where the map editor tiles are. You may want to move some things down to fit this in.

Name the scroll bar hscrlPicture

now in frmMirage add this sub
Code:
Private Sub hscrlPicture_Change()
    Call MapEditorTileHScroll
End Sub


We might as well also add under this line
Code:
    scrlPicture.Max = (picBackSelect.Height \ PIC_Y) - (picBack.Height \ PIC_Y)


and under this line
Code:
    Call InitTileSurf(scrlTileSet)

Code:
    Call CalcTilePositions


These bits should make more sense later.

Now go to modGameEditors and add this sub
Code:
Public Sub MapEditorTileHScroll()
    With frmMirage
        .picBackSelect.Left = (.hscrlPicture.Value * PIC_X) * -1
        .picScreen.Refresh
    End With
End Sub


we put the picscreen.refresh in because when picbackselect goes behind picscreen it makes an ugly grey box, and its better to just refresh the whole screen. You can remove it if you want.

Now lets do the actual dynamic width part

find
Code:
Public Const TILESHEET_WIDTH As Integer = 7 ' * PIC_X pixels

comment it out, or delete it

now in modGlobals add this at the bottom
Code:
'Tilesheet width
Public TILESHEET_WIDTH As Integer



in modDirectDraw7 in the InitTileSurf sub under this code
Code:
Call InitDDSurf("tiles" & TileSet, DDS_Tile)

put
Code:
    TILESHEET_WIDTH = modDirectDraw7.DDS_Tile.SurfDescription.lWidth \ PIC_X



I hope this works for you!

_________________
GIAKEN wrote:
I think what I see is this happening:

Labmonkey gets mod, everybody loves him, people find out his code sucks, he gets demoted, then banned, then he makes an engine called Chaos Engine.


Top
 Profile  
 
PostPosted: Fri Jul 17, 2009 7:25 pm 
Offline
Regular

Joined: Sun Mar 29, 2009 11:14 pm
Posts: 37
Run time error 11: Devision by zero

It highlights in the modgamelogic module

also in the Public Sub CalcTilePositions()

"MapTilePosition(X, Y).Ground.Top = (Map.Tile(X, Y).Ground \ TILESHEET_WIDTH) * PIC_Y"


Top
 Profile  
 
PostPosted: Fri Jul 17, 2009 7:45 pm 
Offline
Knowledgeable
User avatar

Joined: Sat Jun 09, 2007 3:16 am
Posts: 276
jaheoo wrote:
Run time error 11: Devision by zero

It highlights in the modgamelogic module

also in the Public Sub CalcTilePositions()

"MapTilePosition(X, Y).Ground.Top = (Map.Tile(X, Y).Ground \ TILESHEET_WIDTH) * PIC_Y"

Make your TILESHEET_WIDTH not equal 0 pixels wide then... Or make sure it's named as "tiles"

_________________
Image
Island of Lost Souls wrote:
Dr. Moreau: Mr. Parker, do you know what it means to feel like God?


Top
 Profile  
 
PostPosted: Fri Jul 17, 2009 9:59 pm 
Offline
Regular

Joined: Sun Mar 29, 2009 11:14 pm
Posts: 37
How do I make sure the TILESHEET_WIDTH is not equal to 0 pixels wide? Through the code or through the properties?

Also I have named the tilesheet Tiles1 because the latest version of mirage has already built in Tiles1 and Tiles 2 you can use.


Top
 Profile  
 
PostPosted: Tue Jul 21, 2009 12:53 am 
Offline
Knowledgeable
User avatar

Joined: Fri Feb 02, 2007 4:50 am
Posts: 263
Location: usa michigan centriville
This may be stupid but why Dynamic tile width why not Dynamic maps which would be much better.

_________________
Fuck? I really joined in 2006.
Spirea, Chat Rooms, Discussions, Help. everything you need in one spot.
http://spirean.com
I love my computer, you never ask for more, you can be my princess or be my whore


Top
 Profile  
 
PostPosted: Tue Jul 21, 2009 6:15 am 
Offline
Persistant Poster
User avatar

Joined: Tue May 30, 2006 2:07 am
Posts: 836
Location: Nashville, Tennessee, USA
Google Talk: rs.ruggles@gmail.com
genusis wrote:
This may be stupid but why Dynamic tile width why not Dynamic maps which would be much better.


Two completely different things.

_________________
I'm on Facebook! Google Plus My Youtube Channel My Steam Profile

Image


Top
 Profile  
 
PostPosted: Tue Jul 21, 2009 12:23 pm 
Offline
Knowledgeable
User avatar

Joined: Fri Feb 02, 2007 4:50 am
Posts: 263
Location: usa michigan centriville
im just saying since Dynamic tiles seem kind of pointless XD.

_________________
Fuck? I really joined in 2006.
Spirea, Chat Rooms, Discussions, Help. everything you need in one spot.
http://spirean.com
I love my computer, you never ask for more, you can be my princess or be my whore


Top
 Profile  
 
PostPosted: Tue Jul 21, 2009 10:28 pm 
Offline
Knowledgeable

Joined: Sun Jul 29, 2007 12:23 am
Posts: 199
How is it pointless? Its purpose is that you don't have to edit your tile sheets to fit the size Mirage uses. I don't find it pointless.


Top
 Profile  
 
PostPosted: Wed Dec 01, 2021 8:52 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
audiobookkeeper.rucottagenet.rueyesvision.rueyesvisions.comfactoringfee.rufilmzones.rugadwall.rugaffertape.rugageboard.rugagrule.rugallduct.rugalvanometric.rugangforeman.rugangwayplatform.rugarbagechute.rugardeningleave.rugascautery.rugashbucket.rugasreturn.rugatedsweep.rugaugemodel.rugaussianfilter.rugearpitchdiameter.ru
geartreating.rugeneralizedanalysis.rugeneralprovisions.rugeophysicalprobe.rugeriatricnurse.rugetintoaflap.rugetthebounce.ruhabeascorpus.ruhabituate.ruhackedbolt.ruhackworker.ruhadronicannihilation.ruhaemagglutinin.ruhailsquall.ruhairysphere.ruhalforderfringe.ruhalfsiblings.ruhallofresidence.ruhaltstate.ruhandcoding.ruhandportedhead.ruhandradar.ruhandsfreetelephone.ru
hangonpart.ruhaphazardwinding.ruhardalloyteeth.ruhardasiron.ruhardenedconcrete.ruharmonicinteraction.ruhartlaubgoose.ruhatchholddown.ruhaveafinetime.ruhazardousatmosphere.ruheadregulator.ruheartofgold.ruheatageingresistance.ruheatinggas.ruheavydutymetalcutting.rujacketedwall.rujapanesecedar.rujibtypecrane.rujobabandonment.rujobstress.rujogformation.rujointcapsule.rujointsealingmaterial.ru
journallubricator.rujuicecatcher.rujunctionofchannels.rujusticiablehomicide.rujuxtapositiontwin.rukaposidisease.rukeepagoodoffing.rukeepsmthinhand.rukentishglory.rukerbweight.rukerrrotation.rukeymanassurance.rukeyserum.rukickplate.rukillthefattedcalf.rukilowattsecond.rukingweakfish.rukinozones.rukleinbottle.rukneejoint.ruknifesethouse.ruknockonatom.ruknowledgestate.ru
kondoferromagnet.rulabeledgraph.rulaborracket.rulabourearnings.rulabourleasing.rulaburnumtree.rulacingcourse.rulacrimalpoint.rulactogenicfactor.rulacunarycoefficient.ruladletreatediron.rulaggingload.rulaissezaller.rulambdatransition.rulaminatedmaterial.rulammasshoot.rulamphouse.rulancecorporal.rulancingdie.rulandingdoor.rulandmarksensor.rulandreform.rulanduseratio.ru
languagelaboratory.rulargeheart.rulasercalibration.rulaserlens.rulaserpulse.rulaterevent.rulatrinesergeant.rulayabout.ruleadcoating.ruleadingfirm.rulearningcurve.ruleaveword.rumachinesensible.rumagneticequator.rumagnetotelluricfield.rumailinghouse.rumajorconcern.rumammasdarling.rumanagerialstaff.rumanipulatinghand.rumanualchoke.rumedinfobooks.rump3lists.ru
nameresolution.runaphtheneseries.runarrowmouthed.runationalcensus.runaturalfunctor.runavelseed.runeatplaster.runecroticcaries.runegativefibration.runeighbouringrights.ruobjectmodule.ruobservationballoon.ruobstructivepatent.ruoceanmining.ruoctupolephonon.ruofflinesystem.ruoffsetholder.ruolibanumresinoid.ruonesticket.rupackedspheres.rupagingterminal.rupalatinebones.rupalmberry.ru
papercoating.ruparaconvexgroup.ruparasolmonoplane.ruparkingbrake.rupartfamily.rupartialmajorant.ruquadrupleworm.ruqualitybooster.ruquasimoney.ruquenchedspark.ruquodrecuperet.rurabbetledge.ruradialchaser.ruradiationestimator.rurailwaybridge.rurandomcoloration.rurapidgrowth.rurattlesnakemaster.rureachthroughregion.rureadingmagnifier.rurearchain.rurecessioncone.rurecordedassignment.ru
rectifiersubstation.ruredemptionvalue.rureducingflange.rureferenceantigen.ruregeneratedprotein.rureinvestmentplan.rusafedrilling.rusagprofile.rusalestypelease.rusamplinginterval.rusatellitehydrology.ruscarcecommodity.ruscrapermat.ruscrewingunit.ruseawaterpump.rusecondaryblock.rusecularclergy.ruseismicefficiency.ruselectivediffuser.ruсайтsemifinishmachining.ruspicetrade.ruspysale.ru
stungun.rutacticaldiameter.rutailstockcenter.rutamecurve.rutapecorrection.rutappingchuck.rutaskreasoningtechnicalgrade.rutelangiectaticlipoma.rutelescopicdamper.ruhttp://temperateclimate.rutemperedmeasure.rutenementbuilding.rutuchkasultramaficrock.ruultraviolettesting.ru


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:13 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Econ


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:14 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
92.6


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:16 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Bett


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:17 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Bett


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:18 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Greg


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:19 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Jewe


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:20 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
West


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:21 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Dant


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:22 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
XVII


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:23 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Mich


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:24 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
What


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:26 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Samb


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:27 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Appl


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:28 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Colu


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:29 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
John


Top
 Profile  
 
PostPosted: Tue Jan 04, 2022 7:30 am 
Online
Mirage Source Lover

Joined: Sun Jul 04, 2021 4:04 am
Posts: 479017
Else


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1212 posts ]  Go to page 1, 2, 3, 4, 5 ... 49  Next

All times are UTC


Who is online

Users browsing this forum: wanai and 16 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group