Duke Nukem 3D making own weapons sprites "Sprites tutorial"
#31 Posted 07 December 2020 - 04:26 AM
But I need some tips:
1. How to set and where position of sprites on screen? like you see on M202 is a rest of N64 rpg (red light and some things on up)
2. I use png with my mode, open with gimp than export to png with transparent background, and change to 256 colors. Once it is works now in Duke I have black background. What's a problem?
I really need someone who can help me set this in all config files
#32 Posted 07 December 2020 - 03:06 PM
setvar digx #
setvar digy #
with # being a coordinate, or rather it seems the amount of pixels, for instance for one of my weapons i use
setvar digx 145
setvar digy 237
for the default weapon pic, just mess with those settings under your state weapondisplay code.
heres a full piece of code for my weapon
state thompson_display switch weaponcount case 0 setvar digz 65536 // fullsize, no scaling setvar digx 145 // X position setvar digy 235 // Y position setvar picnum 2536 // tile number of the weapon setvar orientation 0 // no clue to be honest, used for flags i think, like Cstat etc state initweapondisplay rotatesprite digx digy digz angvar picnum shade pal orientation 0 0 xdim ydim break
#33 Posted 08 December 2020 - 06:19 AM
Still working on make better sprites:
So what I want to do. I want replace (adding more guns can be wait for later), replace only glock, chaingun and rpg with my models.
But, I test it my work on Duke64 mod and on this mod all sprites are in png in separate folder also I have many config files like texture.def or weapons.con. In HRP all textures also in png, 3D models textures also in png, but how to make that I will be have Duke sprites from duke.grp in png in separate folder?
#35 Posted 09 December 2020 - 04:38 AM
0 - HRP will always use its models for weapons, indipendently from which 2d sprites you are using. To remove models and show 2d pictures like what you want, it is needed to remove some lines from one of the ".def" files in the HRP. We will eventually see this in future.
1 - Duke3d screen area is thought as a 320x200 space, for an old 4:3 monitor , indipendently from which resolution you are using. So you can use a 320x200 pixel rectangle for scaling and positioning the weapon sprites as you want.
A 5:4 monitor will use this 4:3 formula anyway, but not widescreen like 16:9 and 16:10. So if you are making these modifies not just for yourself, you HAVE to think it widescreen and work on something like 400x200 rectangle instead.
(It is important that 320/200 is not 4/3 indeed by math, but don't make questions because Duke3D works with that )
2 - Don't touch the code at the moment (i mean CON code), so you can only replace single arts slot you have in ART files.
You are right about 256 colors, but you need them only if you want the same Duke palette which has specified 256 colors. To make that, put your image in a software like ImageAnalyzer and import the palette from a proper .pal file.
Now you have two options:
2A- PNG method
Put a transparent background on your PNG. Then you use two methods: as a general "high-res" texture, with whatever size and colors you want, or if is exactly as an original sprite in the ART files, for which you need 256 colors in duke palette and NO semitransparent pixels at all (or Eduke will render bad colors and alpha channel).
For these two methods, there are two different .def commands: texture (with eventually dummytile for creating a blank space) and tilefromtexture. We will eventually see this in future, but https://wiki.eduke32...ry:DEF_commands you can start read from this.
Also off-centering PNGs as it's done in ART files can be done in def files.
2B- ART method
There are a bunch of software to work on ART files: EDITART (dos, to be used with DosBox eventually), DukeRes, BastART, and maybe i'm forgetting some other.
I use this method, but sure there are better: i put a solid color for background (not the purple), then i change the palette in ImageAnalyzer (it is mandatory in this case), then i copy the picture in the clipboard and paste on DukeRes in the proper ART file slot. Then i open in EDITART and make that solid color "transparent" by filling that area with the 252-0-252 purple you call in EDITART with backspace.
To offset the sprite, I press \ under escape key to offset the sprite in EDITART or use the arrow buttons in DukeRes.
Job done (IIRC )
Important:
me and other people surely saw you have a bad english, that you are approaching duke "modding" now , and that there is a sort of over-enthusiasm (great, but not so much).
But all these are not an excuse to behave like rude/asshole/kid as someone can percept, and be offended or bothered, misunderstandings apart. Good stay :thumbup:
This post has been edited by RichardStorm: 09 December 2020 - 04:42 AM
#36 Posted 09 December 2020 - 05:41 AM
Richard thanks for this tips.
Ok so what I can do:
1. I can do sprites in png format with transparent background like sprites in Duke 64 Mod.
This is best for me at now way to replace sprites.
2. You write biggest size of texture for sprites can be 320x200 or 400x200 (widescreen)
but if I use for example 320x200 sprite on game in 800x600 resolution, weapon sprite covers 1/3 of the screen, if I use size like original (96x92 - pistol sprites D64 mod) the edges are jagged and it looks ugly
Here is good looking DEagle animation gif 234x200
So Is it any way to have sprite size 320x200 but how to set that game scales down or somthing?
2. So if HRP only use 3D wepons models can it possible to add another folder where they will be all original weapons sprites in PNG?
This post has been edited by Nfsfan83: 09 December 2020 - 05:48 AM
#37 Posted 09 December 2020 - 06:01 AM
Quote
no, there is no maximum size... i meant that you use 320x200 as a reference to downscale your sprites, to see how they would result on screen... for example that Deagle would be be good in something like 100x100
Quote
yes but is not needed... you first need to remove the line in the .def file that forces the use of HRP models.
You also have a few problem at proper reading english (where the hell are you from ? ), anyway we try to explain as best as you can understand
This post has been edited by RichardStorm: 09 December 2020 - 06:02 AM
#38 Posted 09 December 2020 - 06:07 AM
I want HRP textures ( new levels textures , skybox), I know I can turn off 3D models (enemies and weapons) will be 2D but I want add my 2D for replace.
So only way to replace original sprites by new is replace they in duke3d.grp?
I would love replace HRP 3D weapons models by my, but this is more for me hard to do it.
I have all models in 3D with textures etc... but I understand you Guys are too busy...and have own works.
This post has been edited by Nfsfan83: 09 December 2020 - 06:13 AM
#39 Posted 09 December 2020 - 06:11 AM
you can turn off models one by one in the def file of the HRP, then add in the HRP the line for whatever PNGyou want.
Adding 3d models for weapons for HUD is way difficult IIRC, i never tried... you have to convert them in MD3 and learn the whole DEF part for 3d models. Avoid that.
This post has been edited by RichardStorm: 09 December 2020 - 06:11 AM
#40 Posted 09 December 2020 - 06:21 AM
Richard tell me one thing in your mod:
https://forums.duke4...8-kickass-duke/
where you add new weapons? to main duke.grp files or to any folder?
This post has been edited by Nfsfan83: 09 December 2020 - 06:21 AM
#41 Posted 09 December 2020 - 06:29 AM
Quote
It's not problem of GRP or folder.
I did by adding new sprites (some in PNGs, some in ART files) and sounds here and there, but with a MASSIVE code part as for quantity as for complexity. I wrote all weapons from scratch, as Duke has not a built-in weapon code.
Just. Forget. It.
This post has been edited by RichardStorm: 09 December 2020 - 06:30 AM
#42 Posted 09 December 2020 - 09:17 AM
For Doom with Gzdoom there are many weapons mods (Brutal Doom and VietDoom for me are the best) and Doom engine is older but now still developed.
I will be still collect best 3D models... maybe in future I find someone to help...
This post has been edited by Nfsfan83: 09 December 2020 - 09:18 AM
#43 Posted 09 December 2020 - 11:03 AM
And cool RPG from HL HD pack: with Nuke sign on lcd
And Displacer Cannon, I love it how it is look
This post has been edited by Nfsfan83: 09 December 2020 - 11:32 AM
#44 Posted 15 December 2020 - 10:47 AM
Remington 870 Police Magnum is one of my favourite shotgun since Turok Dinosaur Hunter
If you need something, jus ask
This post has been edited by Nfsfan83: 15 December 2020 - 10:49 AM