Duke4.net Forums: Scaling Issue - Duke4.net Forums

Jump to content

Hide message Show message
Welcome to the Duke4.net Forums!

Register an account now to get access to all board features. After you've registered and logged in, you'll be able to create topics, post replies, send and receive private messages, disable the viewing of ads and more!

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Scaling Issue

User is offline   xMobilemux 

  • 881

#1

I'm often on and off with trying my hand at making maps for Duke 3D but the one thing that always puts me off is putting loads of effort into the environments and making them to scale with the size of the sprites in the editor then loading the map and seeing that Duke, all the enemies and pick ups look like they were hit with the shrink ray compared to the level.

Example:

I placed a Trooper and some pick ups in the room and then made a desk that was to scale with them.
Posted Image

But when I load up the map in the game, Duke, the trooper and the pick ups are way smaller.
Posted Image


It's always been something that has put me off making maps for Duke 3D, is there any way to make the sprites default editor size the same as the ingame size?

Posted Image
1

User is offline   Paul B 

  • 292

#2

View PostxMobilemux, on 03 January 2017 - 09:57 PM, said:

I'm often on and off with trying my hand at making maps for Duke 3D but the one thing that always puts me off is putting loads of effort into the environments and making them to scale with the size of the sprites in the editor then loading the map and seeing that Duke, all the enemies and pick ups look like they were hit with the shrink ray compared to the level.

Example:

I placed a Trooper and some pick ups in the room and then made a desk that was to scale with them.
Posted Image

But when I load up the map in the game, Duke, the trooper and the pick ups are way smaller.
Posted Image


It's always been something that has put me off making maps for Duke 3D, is there any way to make the sprites default editor size the same as the ingame size?


In 3D Mode try putting your cursor on a sprite object and pressing the key "/" Actually while that restores the sprite object to their default size in Mapster their default size appears too large compared to in game. Also your screenshots reveal a potential bug as well. Notice in Mapster the Alien Trooper is Blue but in the Game he takes on a green palette. I just noticed this now while testing this exact same thing. I wonder if this palette change has something to do with the new palettes required for World Tour?

It looks like the sprite classifies the size of the sprite by its repeat value 0,0. There must be a config file where you can set the default size you want for the tilesart number. I checked most of the config files and the only area that can manipulate the sprite object was the tiles.cfg but that looks to only modify the color of the object and not the physical size. I'll keep looking.

This is a good question, there is no way this setting would be in a con file because the actors are the proper size in game. So there must be some type of size adjustment that happens within mapster itself.

Long live Duke!

This post has been edited by Paul B: 03 January 2017 - 11:02 PM

1

User is offline   xMobilemux 

  • 881

#3

View PostPaul B, on 03 January 2017 - 10:01 PM, said:

In 3D Mode try putting your cursor on a sprite object and pressing the key "/"

Just says Sprite and Panning reset, sprite stays the same size.

Posted Image
0

User is offline   MusicallyInspired 

  • 2,021

#4

View PostPaul B, on 03 January 2017 - 10:01 PM, said:

Also your screenshots reveal a potential bug as well. Notice in Mapster the Alien Trooper is Blue but in the Game he takes on a green palette. I just noticed this now while testing this exact same thing. I wonder if this has something to do with the new palettes required for World Tour?


It's always been that way all the way back to DOS BUILD. The blue colour and the sprite sizes. I just learned to live with it as I've guessed many others have. Never thought about fixing it. Is there a reason for it being that way though? Hendricks? TX?


This post has been edited by MusicallyInspired: 03 January 2017 - 10:25 PM

0

User is offline   RunningDuke 

  • 186

#5

If I'm not mistaken, when you place a sprite in Mapster, it spawns at size 64 but in game some sprites get resized such as weapons and most of the enemies. The only enemies that don't get resized are EGG, RECON and sometimes the NEWBEAST (Protector Drone) if you place it in a certain position. If you place NEWBEAST in crouched position, it will appear big at map start but when it sees you, it gets resized. This is something that has been bothering me in some user maps where when I see the drone appear big but after seeing you, gets resized.

As for blue trooper, that was the original color of the enemy but it seems like they decided to apply palette 22 in game for the assault trooper because they thought it was looking cooler and also because they don't have to go back to modify all the sprites that way. And maybe also for the fact that blue is the color that you can apply a different palette for it.
1

User is offline   Trooper Dan 

  • Duke Plus Developer
  • 1,697

#6

View PostRunningDuke, on 04 January 2017 - 12:25 AM, said:

If I'm not mistaken, when you place a sprite in Mapster, it spawns at size 64 but in game some sprites get resized such as weapons and most of the enemies. The only enemies that don't get resized are EGG, RECON and sometimes the NEWBEAST (Protector Drone) if you place it in a certain position. If you place NEWBEAST in crouched position, it will appear big at map start but when it sees you, it gets resized. This is something that has been bothering me in some user maps where when I see the drone appear big but after seeing you, gets resized.

As for blue trooper, that was the original color of the enemy but it seems like they decided to apply palette 22 in game for the assault trooper because they thought it was looking cooler and also because they don't have to go back to modify all the sprites that way. And maybe also for the fact that blue is the color that you can apply a different palette for it.


You are mostly correct. There are two types of resizing that occur: hardcoded resizing and scripted resizing. Hardcoded resizing applies to many of the important sprites that are original to the first release of the game, such as weapons, ammo and many of the enemies. The palette change on LIZTROOP from 0 to 22 is also hardcoded. It will happen at map load time before you see the sprites in game. Scripted resizing happens when a sprite has CON script telling it to be a certain size. That does not occur until after map load, when the sprite "wakes up" in game. This is true of NEWBEAST and some other sprites. With the modern eduke script, it is possible to to make sprites resize at map load time as if they were hardcoded to do so, but that's not something you would want to mess with if you are just building maps. In any case, none of this is considered a bug.
2

User is online   Mark. 

  • Honored Donor
  • 1,556

#7

Even if its not considered a bug it sure would be nice if the mapster placed sprite was the same as in game. What would be the harm in that?
0

User is offline   Mblackwell 

  • Evil Overlord
  • 715

#8

Size it to the correct x/yrepeat and it will be!

Otherwise it potentially breaks the original maps, and decades of mods.

Music: The Rejected Applications (listen now)
EDuke32 || EDuke32 Wiki || Latest EDuke32 Snapshots
I'm getting too old for this shit...
0

User is online   Loke 

  • 434

#9

@xMobilemux

These are the dimensions for the enemies and weapons/ammo/items sprites. Check the link below for more info.

Quote

Enemy Sprites:

  • RAT (#1267) = [48,48]
  • SHARK (#1550) = [60,60]
  • LIZTROOP (#1680) = [40,40]
  • LIZTROOPRUNNING (#1681) = [40,40]
  • LIZTROOPSTAYPUT (#1682) = [40,40]
  • LIZTROOPSHOOT (#1715) = [40,40]
  • LIZTROOPJETPACK (#1725) = [40,40]
  • LIZTROOPONTOILET (#1741) = [40,40]
  • LIZTROOPJUSTSIT (#1742) = [40,40]
  • LIZTROOPDUCKING (#1744) = [40,40]
  • OCTABRAIN (#1820) = [40,40]
  • OCTABRAINSTAYPUT (#1821) = [40,40]
  • DRONE (#1880) = [40,40]
  • COMMANDER (#1920) = [40,40]
  • COMMANDERSTAYPUT (#1921) = [40,40]
  • TANK (#1975) = [60,60] (must "see" the player before it will autosize)
  • PIGCOP (#2000) = [40,40]
  • PIGCOPSTAYPUT (#2001) = [40,40]
  • PIGCOPDIVE (#2045) = [40,40]
  • LIZMAN (#2120) = [40,40]
  • LIZMANSTAYPUT (#2121) = [40,40]
  • LIZMANSPITTING (#2150) = [40,40]
  • LIZMANFEEDING (#2160) = [40,40]
  • LIZMANJUMP (#2165) = [40,40]
  • ROTATEGUN (#2360) = [40,40]
  • GREENSLIME (#2370) = [40,40]
  • ORGANTIC (#2420) = [40,40] (sprite shrinks from [40,40] to [32,32] upon sight of the player)
  • BOSS1 (#2630) = [80,80] in Boss form; [40,40] in Mini-Boss form (i.e. with palette)
  • BOSS1STAYPUT (#2631) = [80,80] in Boss form; [40,40] in Mini-Boss form (i.e. with palette)
  • BOSS2 (#2710) = [80,80] in Boss form; [40,40] in Mini-Boss form (i.e. with palette)
  • BOSS3 (#2760) = [80,80] in Boss form; [40,40] in Mini-Boss form (i.e. with palette)
  • NEWBEAST (#4610) = [40,40] (must "see" the player before it will autosize)
  • NEWBEASTHANG (#4670) = [40,40] (must "see" the player before it will autosize)
  • NEWBEASTHANGDEAD (#4671) = [40,40] (must "see" the player before it will autosize)
  • BOSS4 (#4740) = [80,80] in Boss form; [40,40] in Mini-Boss form (i.e. with palette)
  • BOSS4STAYPUT (#4741) = [80,80] in Boss form; [40,40] in Mini-Boss form (i.e. with palette)

    Weapon/Inventory Sprites:

  • FIRSTGUNSPRITE (#21) = [32,32]
  • CHAINGUNSPRITE (#22) = [32,32]
  • RPGSPRITE (#23) = [32,32]
  • FREEZESPRITE (#24) = [32,32]
  • SHRINKERSPRITE (#25) = [32,32]
  • HEAVYHBOMB (#26) = [9,9]
  • TRIPBOMBSPRITE (#27) = [32,32]
  • SHOTGUNSPRITE (#28) = [32,32]
  • DEVISTATORSPRITE (#29) = [32,32]
  • FREEZEAMMO (#37) = [32,32]
  • AMMO (#40) = [16,16]
  • BATTERYAMMO (#41) = [32,32]
  • DEVISTATORAMMO (#42) = [32,32]
  • RPGAMMO (#44) = [32,32]
  • GROWAMMO (#45) = [32,32]
  • CRYSTALAMMO (#46) = [32,32]
  • HBOMBAMMO (#47) = [32,32]
  • AMMOLOTS (#48) = [32,32] (invisible)
  • SHOTGUNAMMO (#49) = [32,32]
  • COLA (#51) = [32,32]
  • SIXPAK (#52) = [32,32]
  • FIRSTAID (#53) = [32,32]
  • SHIELD (#54) = [32,32]
  • STEROIDS (#55) = [32,32]
  • AIRTANK (#56) = [32,32]
  • JETPACK (#57) = [32,32]
  • HEATSENSOR (#59) = [32,32]
  • ACCESSCARD (#60) = [32,32]
  • BOOTS (#61) = [32,32]
  • ATOMICHEALTH (#100) = [32,32]
  • HOLODUKE (#1348) = [32,32]



http://infosuite.duk...s_compatibility

Just resize them in the editor. You'll get used to it.
4

User is online   Mark. 

  • Honored Donor
  • 1,556

#10

View PostMblackwell, on 06 January 2017 - 09:25 AM, said:

Size it to the correct x/yrepeat and it will be!

Otherwise it potentially breaks the original maps, and decades of mods.

I'll be clearer. I don't want Eduke to resize them and break previous maps. No, I'm suggesting make Mapster place them at Eduke's "in game" size. What purpose is it serving to have Mapster place them oversized? The reason must be so obvious I'm missing it. ;)

This post has been edited by Mark.: 06 January 2017 - 10:27 AM

4

User is offline   xMobilemux 

  • 881

#11

So basically there isn't any way to make the sprites default editor size the same as the ingame size?

Posted Image
0

User is offline   Kawa 

  • 196

#12

CON hooks?

“Laugh it up, fuzzball.” — Han Solo
0

User is online   Hendricks266 

  • EDuke32 Senior Developer
  • 4,632

#13

I'm sure you can do it with M32script.
0

User is offline   Kawa 

  • 196

#14

View PostHendricks266, on 15 January 2017 - 10:12 AM, said:

I'm sure you can do it with M32script.

Yes, that's that what I meant. Thank you, I couldn't recall the name.

“Laugh it up, fuzzball.” — Han Solo
0

User is offline   Paul B 

  • 292

#15

I suppose each item would need to be defined manually in the m32 script file. If the m32 script was called DefaultSize.m32 and contained content for each object such as:

for i allsprites, ifactor LIZTROOP, sizeat 40 40

Then after launching mapster you would have to include the script by typing in console: include scripts\DefaultSize.m32 (Assuming the script was placed in the default script folder). I havent tested this process, feel free to correct me if i am wrong.

If you wanted to get fancy, you could probably group all items that share the same size (values) into an array and process them with a function to optimize the code. Otherwise i can see a lot of repetition. Can someone confirm if this would work?

Long live Duke!

This post has been edited by Paul B: 16 January 2017 - 07:52 PM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All trademarks are property of their respective owners and all comments are owned by their posters. Yes, our forum uses cookies. © 2004-2016 Duke4.net and Voidpoint, LLC

Enter your sign in name and password


Sign in options