The Wildest West

Started by 3DzForMe, September 13, 2019, 17:35:13

Previous topic - Next topic

3DzForMe

#30
Took me over an hour to get my wagon moving, my powers of coding are weak these days.....

Now I see the cowboys also went left and right with variable gun pointing.....

To be fair - was getting my head around sprites kinda not being entities - no excuse for how I'd to go around the houses just to get the wagon going in

ONE direction and then THE OTHER. Jeez.   :o :-[ ;)


Also, my attention to details slipping - the Wagon should be shifted thru 90 degrees:

On the plus side though - I've just got to make my cacti 1 for 1 scale (like the dudes and the wagon) 8)

No.1 on to do list..... De-rez the sand.
2. Add sound, with a bam! For authenticity.




BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

3DzForMe

Really enjoying just creating Pixilart this morning - should really try and do some coding - after all its less than a month (gulp....)

BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

3DzForMe

#32
Substantial progress today, however, old laptops decided not to turn on. Hmmm. Not great. Edit, hard drive ain't dead though, yay!
BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

3DzForMe

#33
This morning I was hunting around on my son's W10 PC for good old MSPaint - I'd to settle for  Paint3D. Wow, if no ones tried this yet, it has some incredible functionality.

Screen grab of some more progress:

BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

Steve Elliott

I like the characters, but the game now looks like Canon Fodder, they're so small in comparison to the huge wagon.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

3DzForMe

#35
Yeah, that was my daughters first response to, and the way the placeholders move around, it's very akin to cf!

Progress:

First iteration of changing gun angle works - 2nd iteration is currently failing. >:D






Quotethey're so small in comparison to the huge wagon.
-  the wagon was high in the Y plane - another Father Ted comedy moment ;)



cannon fodder for the un-initiated - and no - my game will not be anything like this - imagine how much time.....


Jeez, now I've got the mechanics / engine of the game almost cracked - I've got huge requirements creep in the old imagination going on :-\






Good lord, my brain is melting, time to encourage the biological hardware reset - its Saturday night after all!

Much respect to the engineers back in the 70's who released this - jeez - I was 6!
BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

3DzForMe

#36
Wagons still slightly larg-esque, its so heavy the wheels are sinking into the sand - which still needs DE-rezzing to pixelated land.

At least player1's bullets fly all over the shop and hit Player2 placeholder  ;D

Wanna taxture the bullets with either a 'brass finish' or a 'gold' finish - might add silver tipped bullets for the werewolves.....

Yeah, ok, maybe getting somewhat ambitious.

Was tempted to red-indians setting the wagon alight with arrows, however in this day and age some folks may find that representation of the past as unpalatable. I'm tempted to keep the red-indians out of it - what do people think?

Have been discussing the sound with my resident musician - this is the most fun I've had creating a project in a while. TheBigDarkAdventure ticked a small box for me, but this is pixel-shooter fun beyond compare. Another shout-out to JayEnKai for the ;D 'create 3D printed models from .jpg's' - bloody ace code if I say so myself ;)


This is the code to create a cowboy in Blitz3D from a 32x32 .png:-    (sorry some of the remarks refer to the wagon - tidied it up a bit to remove code that simply wasn't working....)

To use the following code in Blitz3D:

1. make a file called main.bb
2. do a graphics3D,800,600,32 statement
3.  do a while - wend loop
4. put a renderwoprld and an updateworld command in the loop
5. declare an array to hold the image:     'Global Player1Sprite[1024]    :  Dim P1_3IDs(1024): Global P1_3LastId=0: '
6. put the following code in a separate file and 'include' it.

Probably worst tutorial ever - but thats the meat of it. ^-^


img=LoadImage("./12cowleft1.png")

LockBuffer ImageBuffer(img)

pixel=CreateCube()
ScaleMesh pixel,0.5,0.5,0.5

; Spritesheet Info
SpriteWidth=12    ;my cactus is 32x32 pixels
SpriteHeight=12


SpritesX=ImageWidth(img)/SpriteWidth
SpritesY=ImageHeight(img)/SpriteHeight


For sy=0 To SpritesY-1
For sx=0 To SpritesX-1 ; For each sprite (8 x 8 spritesheet of 16x16 pixels
ID=(sy*SpritesX)+sx

;retain the ID of EVERY bit of the wagon so it can be moved elsewhere
P1_3IDs(sy)=ID

;save the Last WagonID number
P1_3LastId=SpritesY-1

Player1Sprite[ID]=CreateMesh()
For yL=0 To SpriteHeight
For xL=0 To SpriteWidth

cx#=Float(xL)-(Float(SpriteWidth)/2.0)
cy#=Float(yL)-(Float(SpriteHeight)/2.0)
cz=0

argb=ReadPixelFast((sx*SpriteWidth)+xL,(sy*SpriteHeight)+yL,ImageBuffer(img))

r=(argb And $00FF0000) Shr 16
g=(argb And $0000FF00) Shr 8
b=(argb And $000000FF)


If r>4 Or g>4 Or b>4 ; Assuming 0,0,0 = transparent
tbrush=CreateBrush(r,g,b)
PaintMesh pixel,tbrush
PositionMesh pixel,cx,cy,cz
AddMesh pixel,Player1Sprite[ID]
PositionMesh pixel,-cx,-cy,-cz
FreeBrush tbrush
EndIf
Next
Next

RotateEntity Player1Sprite[ID],180,90,0

MoveEntity Player1Sprite[ID],3*27,9,0

MoveEntity Player1Sprite[ID],-160,-20,60

UpdateNormals Player1Sprite[ID]

Next
Next

UnlockBuffer ImageBuffer(img)

FreeEntity pixel



BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

3DzForMe

#37
I'm proud of my bullets - not quite the green representations of the old game I'm paying tribute to - however - I might invoke  artistic licence in the latter levels whereby the GREEN bullets make a re-appearance aka Green Lantern style. ;)
BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

RemiD

#38
curious to see what game you will manage to create (in 3d of course) ;D

if you need help with collision detection let me know... (ellipsoids and collidables or linepick and pickables should both work for bullets, but linepick and pickables is better when you plan to detect collisions with turning moving entities...)

3DzForMe

#39
@RemiD - thanks for the offer of help with linepicks and stuff.

For the time being, my x,y and z comparison with target entities seems to be working quite well.

Also - this would work well for shooting the guys hat of - which involves work which I may not have time for, nevertheless it intrigues me.

Working on 19 levels - trying to adopt some procedural level generation -  so many ideas - so little time!

;D

The new level code needs a little more work....


BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

3DzForMe

levels code is getting there....

BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

therevills

#41
Cool! I remember a 10 liner on the Amstrad which had a shoot out cowboy game where if you hit the cactus the bullet would change direction by 90 degrees! Real physics I tell 'ya!

3DzForMe

Quote from: therevills on October 05, 2019, 03:44:01
Cool! I remember a 10 liner on the Amstrad which had a shot out cowboy game where if you hit the cactus the bullet would change direction by 90 degrees! Real physics I tell 'ya!

Intriguing - I might give that some thought! ;D
BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

3DzForMe

#43
Jeez, it 'should' be straight forward to invoke the multiple sprites for Player2 - not so....... :-[

Share of the day - wish I'd found the output window sooner.....
BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1

3DzForMe

thatll do for now.....


BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1