CP - Alien Breed Remake - 3

Community Forums/Showcase/CP - Alien Breed Remake - 3

Caff(Posted 2004) [#1]
I like the progress so far!

I'm currently working on some music for this :)


Rimmsy(Posted 2004) [#2]
Yeah, music'll be great. What kind?
We definitely need:
- Slow scary (think AVP menu music(?))
- Intrigue
- Scared & confused rock!!
- Full out rock music, great whilst shooting alien skull.


Rob Farley(Posted 2004) [#3]
Ahah! Thread 3! Ignore my last post on thread 2!

I'm not going to be able to do any more on this for the next 2 weeks as I'm off on holiday! I'm kinda pissed off with this as I'd love to be involved over the next couple of weeks but Spain is a-calling! And given the choice... Spain wins!

Caff, I've written a piece of title music that's perfect for this so if you want to do ingame/inceidental music that'll be cool.

Hopefully by the time I get back I should have title graphics and stuff as I've emailed a bunch of random people who are into the whole alien theme who do amazing fan art (see previous thread) and pixel art for graphics...

Who knows what emails I'll have when I get back and who knows what this game will be like!

Anyway... Have fun guys... Keep these threads going as we're potentially writing the best blitz game ever here!!!


Perturbatio(Posted 2004) [#4]
Will this do for some in game music? I did it a little while ago now.


Rob Farley(Posted 2004) [#5]
Rims, Sent you a bit of music, and a bunch of other emails! This really needs the front end though.


Rimmsy(Posted 2004) [#6]
Have fun on holiday rob. Don't burn, baby.

Antony, how's the lightmapper coming along?


Rob Farley(Posted 2004) [#7]
Cheers man! Time for bed!


Rimmsy(Posted 2004) [#8]
Perturbatio, Rob, Caff: very nice, guys! We've got fantastic music coming out of everywhere. If nothing else, this game'll have the best soundtrack. We'll have to release it on CD.


Perturbatio(Posted 2004) [#9]
we need to have some way of adding in more tiles to the editor without messing up any previously created maps.


Rimmsy(Posted 2004) [#10]
Aren't the tiles numbered sequentially. So appending the tile image won't mess up the previous tiles, will it? Or will it? I'm not sure.


Caff(Posted 2004) [#11]
Sorry Perbuti (arghhh!!) Perturbatio (copy + paste ;) ) - can't download that, I don't know if my browser is broken though...

Ok I'll do some moody in-game stuff, with a sort of cheesy techno-rock feel to it. I was digging about on some alien-breed fansites and found some classic Bjorn Lynne Amiga MODs :D

.MOD or .OGG/MP3? Depends whether we want to keep file sizes down. What do you think?


Perturbatio(Posted 2004) [#12]
Yeah, you could do it that way, I was just thinking about keeping all similar tiles together.


Rimmsy(Posted 2004) [#13]
Mark, coffeebean, perturbatio, and anyone else involved, do you might if I put your email addresses in the readme.txt? Rob advised we should have a "don't use any media or code without permission of the author(s)" section in the readme.

I was just wondering whether you all wouldn't mind me adding your email addresses as I feel a bit egotistical just adding mine and rob's seeing as we all worked on it.


Perturbatio(Posted 2004) [#14]
put mine in as me@...


Perturbatio(Posted 2004) [#15]
oh yeah, enjoy yer holiday Rob :)


Rimmsy(Posted 2004) [#16]
I'd prefer to go with MOD for that retro feel. What does everytone else think?

pert, do you literally want me to put me@ or pert@? Ha! it's late and I'm confused!


Perturbatio(Posted 2004) [#17]
me@


Perturbatio(Posted 2004) [#18]
I don't do MOD's personally, never found a mod tracking program that was as easy to use as Acid Pro is.


Caff(Posted 2004) [#19]
I vote OGG, you can still get a retro feel by using older instruments :) Only problem is the file size?

I'll lay down some grooves, if we decide to go MOD/XM route I'll move everything over to Fasttracker II :D

Will be a bit of fun to boot that up again!


Perturbatio(Posted 2004) [#20]
I like OGG too, file size might be a slight issue, but you can always make the music an optional download.

*EDIT*
Perhaps provide a MOD or two with the basic download and offer the extended media pack seperately


Rimmsy(Posted 2004) [#21]
I agree. I've already seperated the next download into three: music.zip, media.zip and code.zip. Music's really a last minute thing we can always tweak. I think we should discuss the next few steps...

I think we desperately need some graphics (I've talked to a friend who can do us some) before we can really test and implement a new data layer on the map. That's unless we use place-holders. What do we need from the data layer...

- alien spawn points
- looping animation points (for lights, fans)
- script trigger points
- what else?

How complicated do we need the scripting to be? Do we need scripting? What about cut scenes? Too complicated? Simple dialogue? Exactly how will keys be used? What can your credits get you? When do we start writing the save/load functions.

For the editor, is it possible to add rooms en mass rather than individually draw the walls. What I mean to say is, select a tile corner and then drag a rectangle on the map to automatically create a room. This will make creating rooms/corridors/etc 1000% easier. Perhaps a rectangular fill with the current tile?

As rob, our fearless leader would say... discuss.


Perturbatio(Posted 2004) [#22]
Scripting: some sort of simple scripting would be beneficial rather than hard coding all the levels, but I wouldn't know where to start.

Spawn points: slightly on this subject, it would be good to have the aliens bursting out of the walls, floor, or corpses etc.


Hujiklo(Posted 2004) [#23]
Got to admit - seeing the Blitz community working together like this warms me cockles! Awesome stuff! Keep it up!
Wish I had some time to chip in that's all :(


Tracer(Posted 2004) [#24]
warms me cockles


eeehhh... naughty! ;)

Tracer


Rob Farley(Posted 2004) [#25]
- alien spawn points
- looping animation points (for lights, fans)
- script trigger points

Because we're just using integers for the map layers I think we can cram all of this into one additional layer.

I don't think there would be (m)any cases where you want a light, fan, alien spawn and trigger all on the same tile.

Therefore you could have just a bunch of values that mean different things. eg. 1 = Regular alien spawn, 2 = Face hugger spawn, 3 = Regular alien out of the ground, 4 = fan, 5 = fan sound (because the fan is 4 squares big you could have the fan sound next to the fan graphic) etc etc.

Also, I'm not a fan of aliens re-spawning, I like being able to clear out a level and make parts of the level clear. That's just me though, and I think it seems more realistic too.

Scripting... What do you want the scripts to do? Would this be like Objective 1, 2, 3 etc Ie Destory this object, pick up this object etc, if it's as simple as that it would be very straight forward. The fact the to destory object x means you have to adventure through the level open doors solve basic "need key x for door y" puzzles I think keeps the scripts/objectives simple but the game engine nice and rounded.


Rob Farley(Posted 2004) [#26]
What can your credits get you
Guns, lots of guns.

Health packs, armour?, keys, clips.


Rob Farley(Posted 2004) [#27]
The drag and drop room editor sounds great, probably easier to implement by hitting 'r' for the start point of a room (top left) then hitting r again for the end point (bottom right).

Regarding the tiles there are a few blanks in there and I used up a few spares by creating shady tiles, if this light mapper thing get involved the shady tiles will be pointless. There's no reason not to just keep adding to the tile set at the bottom. It may be worth splitting the transparant top layer tiles from the base tile set?


Rob Farley(Posted 2004) [#28]
Exactly how will keys be used?
As I've said, on the data layer we could set a security level of a door, therefore you can pick up a security pass that will allow you through several doors, as we've got the vis in we need to split the level up a lot so having 1 key 1 door is just too clunky. Of course you'll still have red, green and blue keys etc for speicalised doors.
When do we start writing the save/load functions.
I think if there is a save you should only be able to save inside the intex systems, maybe saving will cost you money to stop you saving too often?
But I think you should only save at the end/beginning of each level. Of course this is the easiest solution as you don't need to store the positions of all the aliens, alien states, etc etc etc.

I think the next major jobs that need to be achieved are improving the collision detection with player/alien, bullet/alien, alien/player, alien/wall and player/wall.

Get the credits in (should take about 5 minutes to add a graphic and a type of credits) of course share credits needs to be taken into account with 2 player option.


Perturbatio(Posted 2004) [#29]
Just a thought here, if we're having different guns, are we having different gun graphics? If so would it not be better to seperate the player from the gun?


Shambler(Posted 2004) [#30]
Here's some music I made today for the project.

Free for anyones use just give me credit! ;)

It's in .mp3 format...if someone tells me how to ogg things I'll ogg it ^^

[Edit] See below it's been ogged!


Perturbatio(Posted 2004) [#31]
Just knocked up a quick and simple graphic for the money:



Rob Farley(Posted 2004) [#32]
Just a quick 'hack' to see how the players would look with half the frames of animation is:

	; animation frame control
	If move
		pl\fpause = (pl\fpause+1) Mod 10
		If pl\fpause = 0 Then pl\frame = (pl\frame+2) Mod 15
	EndIf


I think it looks fine (athough a little jumpy as it's 15 frames so doesn't divided by 2 easily! but that can be sorted), and I think adding the extra rotation animations would look much better. Likewise with the aliens too.

This function would need to be changed to:
Function dirdif(angle1,angle2) 

a= ((angle2 - angle1) Mod 16 + 24) Mod 16 - 8 
If a<0 Then a=-1
If a>0 Then a=1
angle1 = angle1 + a
If angle1>15 Then angle1=0
If angle1<0 Then angle1=15

Return angle1
End Function
to deal with 16 frames of rotation rather than 8.

Probably a couple of other bits will need changing too, hopefully not too much though. Oh, there are a bunch of sin(angle*45) scattered around alien.bb and player.bb which would have to be sin(angle*22.5).

Anyway, I'm not suggesting putting any of this in until the media is changed, but I think it'll be an improvement.

Any thoughts on this?


Rob Farley(Posted 2004) [#33]
It's in .mp3 format...if someone tells me how to ogg things I'll ogg it ^^
I assume you've got it in wav format already and converted it to MP3, if you go to http://www.vorbis.com/ and download oggdrop. Then just drop your wav onto oggdrop, you could probably get away with putting the quality virtually at the bottom end of the scale until we're ready for release.

Perturbatio, the alien blood splat in that tile set can go now as it's not used.


Snader(Posted 2004) [#34]
I don't know how far you people are going to take this (great!) project and how faithfull you will be with the original Alien Breed series but I have some ideas. Problem is that I haven't programmed in Blitz for about 2,5 years so implementing it myself will be kind of a problem... (I am following the progress in the hope to learn from you guys and maybe create some code and/or graphics myself)

Maybe you can do something with this, I think it's kinda cool:

1) elevators like in the original Alien Breed, but also the possibility to use the acidblood of the aliens -by shooting them 'on the right tile', to create a passage to a lower level of the 'building'.

2) moveable objects. Barrels for example, to block a pathway for the aliens.

3) some explodable objects. (oilbarrels?) It's always fun to blow something up! Shouldn't be to much of them though.

4) isn't it strange to find money lying around all over the place? Money could be found in some kind of locker/dressingrooms, a safe or at dead bodies.

5) points 1, 2,3 and 4 can be of use to create some solutions to puzzles to advance to the next level or room instead of just using several keys with different colors.


Shambler(Posted 2004) [#35]
Ok thanks Rob here's the .ogg on lowest quality.

This was composed and played on SY22 synth and TG77 expander module, drums on Audigy2...not a fruity loop in sight.

I may extend modify this piece...moving house atm so everything is up in the air -.- or in boxes ^^

http://homepage.ntlworld.com/jm.keay/alienb.ogg


Perturbatio(Posted 2004) [#36]
Regarding the blood, I had considered making it damage the player when they step on it (perhaps making the damage taken relate to the amount of 'life' left in the blood).?


Snader(Posted 2004) [#37]
Depending on the tile beneath it there could be several actions with the blood. Burning through, damaging it, damage the player.


Perturbatio(Posted 2004) [#38]
3) some explodable objects. (oilbarrels?) It's always fun to blow something up! Shouldn't be to much of them though.

The dynamic collision zones I implemented will allow for this.
Any object can be placed with a fixed number of hit points, you can then shoot the object until it is destroyed.


Mark Tiffany(Posted 2004) [#39]
Feel free to put my email addy in there: mark (at) thetiffanys.co.uk

I hope to work on sorting the vis thing tonight, but I've also been thinking today about the comments on the map format. I think we can actually reuse the object layer, and cram everything in there (see Rob's post above that recommends 1 extra layer). What I'm thinking is that for each map we define a set of actions which have various properties:

Image: pointer to the image in the current tileset
Trigger: When to action the script (onenter, onaction (we need an action keypress), every N frames,ondestroy)
Script: the script itself

The editor then sets the current object layer to point to one of these actions instead of simply a tile.

The script for each action is a basic scripting language. Doors have a script that is "opendoor(keyrequired)" and operates as currently. Credits are "credit(100):removeme()". Spawn points are "createalien(type,x,y)". Documents found on the floor are "showdoc(blah blah blah"). Conversations are "showconv(player,how you doing?):showconv(president,are you coming on to me?):removeme()". A sound emitter is "sound(scratch)". A trap located near the scratching noise is "createalien(facehugger,10,10):setmap(10,10,objectlayer,0):removeme()" (i.e. remove the scratch sound from 10,10 as well as the trap itself).

If you understand that, please comment on it! I'll try to write up something better later tonight, but whilst I'm hacking the editor code, I may try to add an action definer and possibly get to amending the object layer...


Mark Tiffany(Posted 2004) [#40]
Oh, and such an approach could do exploding barrels:

set the destructibility low so one shot does it.
set the image to the barrel image
set the action trigger to ondestroy.
set the script to "bigexplosion():removeme()"

Also, I agree with Robs point about re-spawning aliens: I'm not keen on them respawning with no explanation, and like to be able to totally clear a level. We could also reward players who do clear levels. I think all alien respawn points should be obvious and destructible. The scripting idea above could work with two tiles next to each other with actions.

Tile 1 @ 10,10: no image, trigger="onevery(10 seconds)", script="createalien(10,10,facehugger):sound(materialise)"
Tile 2 @10,11: image=Respawn cubicle, destructibility=50, trigger="ondestroy", script="setmap(10,10,objectlayer,0):removeme()"

Neat huh? (if you understand my ramblings that is!)


Rob Farley(Posted 2004) [#41]
That sounds like a really good way of dealing with the events. And it's nice and expandable to any other future ideas. I like it. The parser could be a bit of a tricky one to write, but not too hard.

I think you might want some common scripts though, 'pick up object' [givetoplayer(player): removeme():playoneshot(itempickedup)] for example would be used a hell of a lot.


Mark Tiffany(Posted 2004) [#42]
The parser can be kept simple - all commands separated by | symbol, all commands have brackets even if there are no params. There are certainly a whole bunch of common functions to implement, but most of them replicate stuff already there, so it's probably a case of rejigging some code (like opendoor, picking up keys and ammo).

The neat thing is that by defining action ids, they can be reused in multiple locations on a map. So once you've defined a key / credit / ammo / health / trap / whatever, you can reuse it multiple times on the map. So don't worry about having to write opendoor() or credit(100) for each and every door or credit that you place! And in terms of the editor, I'll be making it as easy as it is currently to drop these tiles on the map. (I'm thinking a whole new screen to define actions, then showing these in place of the existing tileset when editing the object layer).


Rob Farley(Posted 2004) [#43]
More thoughts...

Currently we have a giveweapontoplayer function...

I think we need a sort of middleware function that deals with all objects so we have a

giveobjecttoplayer([objectno],[player])

This function will deal with if it's ammo, clips, credits etc, this way we don't need a special script for credits, keys etc they are all handled by the giveobjecttoplayer function therefore much easier to deal with. So to pick up ANYTHING be it credits keys weapons you would just have a script "giveobjecttoplayer(me,player):removeme()"

Thoughts?


Perturbatio(Posted 2004) [#44]
I like that idea. (the whole scripting idea)


Snader(Posted 2004) [#45]
Yeah, like the idea a lot! Can't wait to design some levels!


Chad(Posted 2004) [#46]
Crew;

I could host the files on my website. If you want, it could at least be the .zips and music files. I have virtually unlimited space with my web host. If your interested please let me know. I can give you access to the FTP and anything else you need. Anything to keep this thing alive.

Chad


Caff(Posted 2004) [#47]
Nice track Shambler :)


Perturbatio(Posted 2004) [#48]
How's this for a door open sound?


Mark Tiffany(Posted 2004) [#49]

Currently we have a giveweapontoplayer function...

I think we need a sort of middleware function that deals with all objects so we have a

giveobjecttoplayer([objectno],[player])

This function will deal with if it's ammo, clips, credits etc, this way we don't need a special script for credits, keys etc they are all handled by the giveobjecttoplayer function therefore much easier to deal with. So to pick up ANYTHING be it credits keys weapons you would just have a script "giveobjecttoplayer(me,player):removeme()"



player should be superfluous, as it's whoever is interacting with the scenery. Anyway, two options: giveobjecttoplayer(me) or addkey(blue).

The former requires that the engine code knows that object id N means a blue key/red key/ammo/whatever. The latter doesn't. This separation of object type from id means that you can give stuff in different situations. For example if you hit the action key at a desk, you might find a key that gains you access to a secret room with loadsa ammo. With the first option, the engine code needs to know that the 'giving' the desk actually means give them a special blue key.

Plus, it's more readable. If you look at a map, and try to interpret lots of "givetoplayer" commands compared to seeing addkey(), addammo(), etc.

Admittedly, it means adding a new command to the scripter for every new type of object we're going to hand over. But is that so bad? You need to write new code in the "givetoplayer" handler if you do it the other way; it's just moving the code. And how many object types might we have? If we have an inventory system and loadsa objects, then I can possibly see this being useful, but only for non-core items. For example a fuse/wire/plug/whatever, as opposed to ammo/credits which shouldn't go in an inventory as separate items. In fact, even if we did that, you'd want givetoplayer(id) anyway, and that's no different to addkey() but less readable.

And in terms of mapping, you'll need to specify the command anyway when creating a new object type...

Also what happens on different levels? You are forced to keep the same action ids for all levels so that the engine code knows what to do with each. I suspect this could become a frustrating overhead.

Sorry if that sounds like a rant - it's simply all the thoughts I've just had on why my way is better. ;-P

I'm hardly likely to get all this up and running quickly (yes, I do plan to write this myself...), so keep throwing up ideas / reasons not to do it that way!

On that note: Rims can you update the todo list at the top to remove the editor todo and replace it with scripting, and stick my name against it? After my map update yesterday, you could stick 'improved map' up there too. And the biggies that need doing soonish:
Collision detection with player/alien, bullet/alien, alien/player
Improved collision with alien/wall and player/wall.

I like that idea. (the whole scripting idea)

Ta. B)))

Yeah, like the idea a lot! Can't wait to design some levels!
Ditto! I can see this being used for some really complex stuff if you want to. Even to the point of re-using the core engine for a Zelda style adventure... ;-)


Rob Farley(Posted 2004) [#50]
Cool, that's fine by me I was just sticking another thought into the pot.

Right... Signing off for 2 weeks... Have fun peeps!


Mark Tiffany(Posted 2004) [#51]
I was beginning to wonder if he'd ever go... ;-)

Okay, here's the vis update. You'll need a new *test.map* for vis to work now. (crappy temp host won't allow direct linking to zips)

Editor updated to place Vis blocks which essentially stop light at, i.e. you will see all up to and including the vis block. It takes a bit of thought to map out a level like this, and maybe impose a couple of niggly constraints on design, but it works. Hold CTRL whilst placing a collision block (dynamic OR static).

Fixed a bug in the destructible stuff - vis wasn't being applied when you destroyed anything other than a door (see example 'cell' in the second room you come to going right. I've used the old splat 'object' to represent what ought to be rubble of something...

And of course, the game engine itself has been updated to use the new vis.

Here are the changes...

editor.bb : in the main loop, replace the collision input stuf with


and replace drawcollision function with:

consts.bb : add these two collision constants
	Const czVisStatic = 3
	Const czVisDynamic = 4 ;multiples of 2 are dynamic

map.bb : replace CheckVis with this, and remove the wall_vis_list type

and in the DamageTile function, add CheckVis to the default case as follows:
			Default 
				Map(x,y,LayerObject) = 0 
				Map(x,y,LayerCollision) = 0	
				CheckVis(x,y)

And finally, in weapons.bb, update the select..case to include the two new constants as follows:
			Select Result
				Case czStatic,czVisStatic  ;bullet hit wall
					ok = False
				Case czDynamic,czVisDynamic  ;bullet hit destructible collision zone
					ok = False
					DamageTile(b\x,b\y,1);change to weapon damage so that different weapons will damage faster or slower?
			End Select

Phew! I'm not going to be around again until Sunday afternoon / evening (UK), when I'll hope to get somewhere with the scripting stuff. I'll need to hack the editor a fair bit then, so it'd be good to have any other updates any wants in by then. Ta!


Perturbatio(Posted 2004) [#52]
I'm getting an array out of bounds error when using this. (I'm using the code in your zip download).
It occurs in GetTile and has an X of -1 I *think* it might be related to the CheckVis code, specifically at the check aliens section.

*EDIT*
the download code is missing the following from gettile:

	If x < 0 Then Return
	If y < 0 Then Return
	If x > 7552 Then Return
	If y > 7552 Then Return



Rimmsy(Posted 2004) [#53]
I'm sorry I've been a little slow. I've been thinking about overhauling the movement method to a quite different car type. So that if you press left and right you change angles and when you press up you move forward. This allows you to substitute the mouse for aiming and also more freedom. Basically, this is the only way we can have less than 45 degree angle changes with the keyboard.

You can't really turn less than 45 degrees with the cursors as you only have up,up-right,right and no in between. But I don't like it. There's something about the simplicity of the four way movement that I'd prefer to keep. Also, it'd be a bitch to write a new version.

Therefore I've added an extra button (right shift). When held down keeps you at the same position but allows you to turn. This will allow you to take attacks from all sides without having to make cumbersome turns. What do you all think? Give it a try. It's in the new code. You'll need to download the new media as well. There's a music download but you don't have to download that to play the game.

What does everyone think about moving the entire game to BlitzPlus? We can make use of its low minimum requirements as well as extra graphics caps. I can't see any reason why we'd want to utilise any kind of 3D because we want to keep it simple.

Also, is it too late to move the entire editor to blitzplus as well? Does everyone working on the editor have blitzPlus? The standard interface would help a great deal. What do you all think? It might be a bit too far down the road to move it, but it might be for the best.

Chad, thanks for the offer but I'm alright at the moment. As soon as my site bandwidth runs out I'll come running. Thanks ;)

Mark, I like the script idea. Is there anything I can give you a hand with?


Perturbatio(Posted 2004) [#54]
I don't have B+ so if it were changed, I wouldn't be able to add anything.

The shift thing seems ok to me.


Matthew Smith(Posted 2004) [#55]
Rims,

I'd prefer to keep it in Blitz3d as I don't have BlitzPlus - but I guess the consensis rules.

The scripting sounds pretty cool.


Rimmsy(Posted 2004) [#56]
Ok, we'll stick with b3d. time to go to bed, I think. Yes, I'm quite tir...zzzzzzzz


Matthew Smith(Posted 2004) [#57]
Made a couple of changes to the collection of items and added health when collected:

Player.bb - Player_UpdateAll:
	; collect objects
	If gettile(pl\x,pl\y,2)>0

		;Determine what the player has collected
		; Don't add ammo to the collected list
		
		objcollect = gettile(pl\x,pl\y,2)
		collectable = True
					
		Select objcollect
			Case 1	;Ammo
				givePlayerAmmo(pl,15)
                                playoneshot(clip_pickup,pl\x,pl\y) ;Change once we get a proper sfx
				collectable = False
				
			Case 2	;Health
				Player_GiveHealth(pl,15)
				playoneshot(health_pickup,pl\x,pl\y)
				
			Case 3,4,5,6
				playoneshot(key_pickup,pl\x,pl\y)
				
			Case 9
				collectable = False
				
		End Select

		puttile(pl\x,pl\y,2,0)
		
		If collectable	
			p.pickedup = New pickedup
			p\player = pl\id ; allowing for multiple players
			p\obj = objcollect				
			
		EndIf
		
	EndIf


and add this function to Player.bb
Function Player_GiveHealth(p.player, h#)
	p\health = p\health + h
	If p\health > 100 Then
		p\health = 100
			
	End If

End Function


Also change the firing check after get input to stop firing animation from processing when you have no ammo:
	If Firing=True And (pl\clip>=0 And pl\ammo>0) Then
		If MilliSecs()>Pl\IsFiringTimer
			Pl\IsFiringTimer=MilliSecs()+25
			pl\IsFiring = Not pl\IsFiring
		EndIf
	Else
		Pl\IsFiring=False
	EndIf


We also need a couple of sounds:
* clicking when player out of ammo
* re-load sound when player collects ammo


Rob Farley(Posted 2004) [#58]
Rims...

Ahhahah! Still not gone... About to leave but had to mention something here! I don't think there's any need to be able to point in the sub 45 degree position I just think it would look better for when you're turning and stuff, because of the turn code the player if you go from up to upleft the turn code will automatically make the player go through the inbetween frame.

Mouse aim sounds like a bad idea to me.

I was beginning to wonder if he'd ever go... ;-)
I'll get my coat... well... shades! Byeee!


Rimmsy(Posted 2004) [#59]
I don't think he's actually gone. He's bluffing.


Caff(Posted 2004) [#60]
Rob's gone?

I see... an internet cafe somewhere on a sunny beach... :)


Rimmsy(Posted 2004) [#61]
Quiet, he can hear us. If we're going to stick with blitz3d, then might we take advantage of the 3d caps? I mean, we could cut our animation frames by 75% by just using a single set and rotating them using something like spriteControl.bb. We could also add animations with alpha in them, alpha'd explosions, etc, etc.

I can't see much that would go against using 3d. Would it complicate it too much? Slowdown? Would it be worth it?

Your thoughts, all.


Phil Newton(Posted 2004) [#62]
I wouldn't be able to play it if it used 3D...no 3D card here :/

Ignoring my crappy laptop, it would add some nice features like lighting, rotation and scaling.


Caff(Posted 2004) [#63]
Ok finished a track, runs to 3 mins 44, so fairly long - I've ogg'ed it @96khz

http://www.roastpork.co.uk/music/incendiary.ogg (2.6mb)

It's called Incendiary, hope you like it!


Perturbatio(Posted 2004) [#64]
although I would like to get some experience of 2D in 3D there are issues with it, one minor one is that it would require a rewrite of the game.
The other is that it increases the minimum specs of the game possibly unnecessarily.

*EDIT*
I suppose one option would be to ensure the graphics part of it can be swapped easily, then a 3D version could be done simultaneously or added later.


Perturbatio(Posted 2004) [#65]
Caff, I think that music will do nicely for more in game ambience.


Perturbatio(Posted 2004) [#66]
I'm going to get my flatmate to reload a gun a few times for the SFX of reloading ammo (or perhaps for picking it up).


Caff(Posted 2004) [#67]
Thanks Pert (t..ur.. never mind), that's what I was aiming for as Rob said he had something ready for the titles etc. I might knock up a short 'end of level' and 'game over' loop as well. If there's anything else I can help with I'd be happy to contribute?


Matthew Smith(Posted 2004) [#68]
I had a look at tidying up the player control into a single set of code (previously it was split depending on the player):

	If control(pright,pl\id) And pl\x<7552 Then mr=True
	If control(pleft,pl\id) And pl\x>0 Then ml=True
	If control(pup,pl\id) And pl\y>0 Then mu=True
	If control(pdown,pl\id) And pl\y<7552 Then md=True
				
	If control(pfire1,pl\id)
		fireWeapon(pl,pl\dir*45)
		firing = True
	EndIf


The only thing missing is where we check the firing the 'force' parameter is no longer used, but it doesn't appear to cause any changes to the control of the player.

Centralised the player collision (walls and doors) into a single area:

Update Players.bb - Player_UpdateAll - replace 'Don't hit walls' and remove 'door objects 7 and 8, opendoor function needs to be replaced with animation stuff'
	; Object Collision (walls, doors etc)
	If mr Then
		If gettile(pl\x+playerradius,pl\y,0)=0 Then
			If control(pstrafe,Player_Count+1)=0 Then pl\x=pl\x+1
			move=True
		ElseIf gettile(pl\x+playerradius,pl\y,2)=7 Then
			If keycheck(pl\id) Then opendoor((pl\x+playerradius)/32,pl\y/32)	
		End If	
		direct=direct+"R"
	End If
	If ml Then 
		If gettile(pl\x-playerradius,pl\y,0)=0 Then 
			If control(pstrafe,Player_Count+1)=0 Then pl\x=pl\x-1
			move=True
		ElseIf gettile(pl\x-playerradius,pl\y,2)=7 Then
			If keycheck(pl\id) Then opendoor((pl\x-playerradius)/32,pl\y/32)	
		End If
		direct=direct+"L"
	End If
	If mu Then
		If gettile(pl\x,pl\y-playerradius,0)=0 Then 
			If control(pstrafe,Player_Count+1)=0 Then pl\y=pl\y-1
			move=True
		ElseIf gettile(pl\x,pl\y-playerradius,2)=8 Then
			If keycheck(pl\id) Then opendoor(pl\x/32,(pl\y-playerradius)/32)	
		End If
		direct=direct+"U"
	End If
	If md Then 
		If gettile(pl\x,pl\y+playerradius,0)=0 Then 
			If control(pstrafe,Player_Count+1)=0 Then pl\y=pl\y+1
			move=True
		ElseIf gettile(pl\x,pl\y+playerradius,2)=8 Then
			If keycheck(pl\id) Then opendoor(pl\x/32,(pl\y+playerradius)/32)	
		End If	
		direct=direct+"D"
	End If


Got to go to Cricket Training, but want to try and get the player/alien collision done when I get home. If anyone else want to do that, feel free!


Matthew Smith(Posted 2004) [#69]
Updated the alien animation code (so when we get some frames) to work - also makes the huggers point in the right direction now. Update the following:

Add the following field to the Alien Type:
Field frameTotal

Alien.bb - Update_Aliens:
		; animation frame control
		If move
			al\fpause = (al\fpause+1) Mod 5
			If al\fpause = 0 Then 
				al\frame = (al\frame+1) Mod al\frameTotal
			End If	
		EndIf


and update Alien.bb - Spawn_Alien:
	al\kind = kind
	Select kind
		Case 0: ; standard alien
			al\radius=20
			al\offset=32
			al\frameTotal = 1
		Case 1: ; face hugger
			al\radius=20
			al\offset=16
			al\frameTotal = 2
	End Select	


To get the hugger animating, I rotated each of the second frames 2 degrees - looked pretty good.


Perturbatio(Posted 2004) [#70]
ok I've just finished recording a couple of reload sounds. My mic isn't brilliant, but I think it did ok.

I recorded a shotgun reload and then realised that the shotgun.wav has a reload on the end of it so I haven't added that in.


Rimmsy(Posted 2004) [#71]
Very nice Perty. I've added your sounds and also your updates, Matt. I'm doing a little work on the editor to get ready for the scripting.

Let's keep it going, guys.


Mark Tiffany(Posted 2004) [#72]
Rims, watch out - I started already! ;-)

I'll upload a couple of bits that I've done this evening and let you carry on (need sleep...)

I'll post a further message in a mo...


Mark Tiffany(Posted 2004) [#73]
Ok, here we go. First, a new map *here* (with VIS this time, honest!) plus a separate .OBJ file. This currently defines all the objects. We could reincorporate it back into the main map in the future, but it seems easiest to keep it separate for now. If you have any of your own maps, you'll need to copy and name the file appropriately else you won't be able to load it into the editor.

I haven't yet implemented a thing in the engine - that's tomorrow's task.

The objects are EXACTLY as is - all I've changed is how they're defined. We'll need an object definer in the editor at some point, but for now, this sorts out the structure.

Okay, code changes! All changes are to editor.bb only. Hint to Rims for the next code update: It would be really neat if the engine and editor used the same map.bb to consolidate loading... ;-)

Replace load() with

replace save() with

In drawmap() update the drawing of the object layer (2)

and just after Dim map(255,255,NumLayers) at the top of editor.bb, add

g'night!


Perturbatio(Posted 2004) [#74]
Typo in consts.bb

change LayerClock to LayerBlock


Perturbatio(Posted 2004) [#75]
in editor.bb add the following somewhere between the "if xpos > -1" so that collisions can be cleared:



Mark Tiffany(Posted 2004) [#76]
Quick update: I'm in the process of updating the engine to use the new object file and basic scripts. I've got most things working (all pickups), but, erm, not doors. yet. Should have an update tomorrow.

For those interested, here's the areas that I've hit so far (so you can avoid them if poss!):

players.bb - significantly updated player_updateall and added RunScript and ParseScript and scriptitem Type
engine.bb - added new objdef array and removed old objects array
map.bb - replacement load, updated drawmap, added objdef type
hud.bb - amended drawhud select case criteria
----EDITOR----
editor.bb - mouse input code and an addition to the load code


Matthew Smith(Posted 2004) [#77]
Sounds good Mark - will wait for your update before continuing any work.


Mark Tiffany(Posted 2004) [#78]
Should have a basic update tonight (have sussed how I want to fix doors after a good nights sleep). I'll probably revert the .OBJ file to a very basic ReadString format such that we can tinker by editing a text file until such time as we build a proper script editor in the editor. And after tonights update (ETA 12 hours from now) it should be much easier to add features through scripting without treading on each others toes...

In the meantime, feel free to make changes anywhere else in the code. I don't think I'll be taking a major swipe at any other functions than those listed above.


Rimmsy(Posted 2004) [#79]
Some people are going to hurt me. I've *copied* the editor to blitzPlus. The blitz3d version still works the same way it used to. I've added some features to the blitzplus version and I've also included an exe for the people who don't have it. Notably, the features I've added are those quick-construction rooms I was talking about earlier. You can specify a template and create from that.

I've added your objdef to it although I haven't implemented anything using them. I'm not quite sure how. You can get everything from my sig, as usual. it's all updated including the music and gfx.

I feela bit bad. I was messing with blitzplus but then it got good and before I knew it I had a fully working version. Honestly if you all don't like it we can just move back to the blitz3d editor version. I don't mind. I just feel more comfortable writing editors in blitzplus's syntax.

Your thoughts?


Caff(Posted 2004) [#80]
B+ version sounds okay to me, as long as we can get a fully working editor compiled and ready to start mapping with soon. :)

Also can you update the music zip with my track and Shamblers
http://www.roastpork.co.uk/music/incendiary.ogg
http://homepage.ntlworld.com/jm.keay/alienb.ogg

Do you need space or bandwidth for these? I can help if you need it

Thanks!


Rimmsy(Posted 2004) [#81]
The version we have now i *almost* ready to use for mapping. We just have to put in the scripting and we can go with some map making. I'll wait to see what mark has done with the scripting in the old editor before adding it to the new editor.

Try out the new editor. It's in the code.zip.


Mark Tiffany(Posted 2004) [#82]
I have BlitzPlus, so provided no-one else objects, I'll move my code into the editor tonight. I don't see much of an argument against having the editor in BlitzPlus, provided we make an exe available for download too.

Agree that we're almost set to start mapping proper - the move to BlitzPlus may mean that I can knock up a basic object/script editor tonight too (I had been somewhat wary of trying to do this tonight in the old version, what with having to build a text entry thing...).

The one thing we probably ought to do if we're using B+ for the editor is make sure the map code is re-used between the two. Currently the load and drawmap code is repeated in editor.bb when it ought to reuse what's in map.bb. I'll try to sort this tonight too. (If we don't, then people are even more likely than currently of updating one but not the other)

Oh, and is it me, or have the aliens disappeared in the 10/09/04 update? They have for me, did I screw something up, or did Rob accidentally pack them in his suitcase?

(cue visions of Rob unpacking in Spain, only to be attacked by an facehugger, and run screaming into the hotel pool...)


Perturbatio(Posted 2004) [#83]
The editor crashed on startup for me (editor.exe encountered a problem and needs to close).


Rimmsy(Posted 2004) [#84]
did you extract the new media.zip to the dir? it contains the tile images it uses.

--
I think I might have turned the alients off temporarily to test something, and it must have stuck as the final version.
My face huggers still point the wrong way. It's my faulty code, and I thought after updating Matt's alien bits that it'd be alright, but they're still skewif.

The plus.bp in inc\editor\ is a bit messy as I've tried not to move stuff to other includes. As for the use of map.bb and others, I moved the load and save functions into map which the editor and engine both use.

Oh, by the way:
- Space is choose the tile under the mouse. Eye dropper type thing.
- ESC is quit.

Mark, you can use:
- openScriptWindow(o.objdef) to open a window with a textarea in it. Have a look at the code. It's more or less ready for the scripting.
This'll need to be added to the userlibs. It's got a mouseOverGadget function.

; Author: JimB
; Source: http://blitzbasic.com/Community/posts.php?topic=35005
; Requirements:
; - Additions To userlibs.
; USERLIBS ---------------------------------------
; .lib "user32.dll"
; api_GetCursorPos% (lpPoint*) : "GetCursorPos"
; api_ClientToScreen% (hWnd%,lpPoint*) : "ClientToScreen"
; ----------------------------------------------

--
Caff: Thanks for the updates on the music. I'm pretty sure I've already got those. Or do I??? yeah. But from where? All the music is currently packed in music.zip in my sig.


Rimmsy(Posted 2004) [#85]
I've added the editor as a standalone executable in my sig. This will be the most updated version without code.


Mark Tiffany(Posted 2004) [#86]
Oddly enough, having just downloaded the code, I find myself preferring the old editor. I wasn't expecting that.

At the very least, how do I move round the map now???

I'll make my updates to the code now - my editor changes since the previous lot are minor, so I'll make sure they work in both versions.


Rimmsy(Posted 2004) [#87]
sorry you don't like it, mark. you move around with the right mouse button. Tell you what, to save bother, we'll just revert to the previous blitz version and leave the blitzplus version for now. It'll mean people without plus can help too. I felt a bit bad about it anyway.

I'll wait for your updates then update the version I have.


Mark Tiffany(Posted 2004) [#88]
I like the idea, most of it's probably a case of getting used to it. I suspect you were hindered a lot by maintaining compatibility...but maybe we are best sticking to vanilla blitz. Who knows, it may even compile in blitzmax - how cool would that be for a first demo? ;-)

Anyway, here we go with tonights updates. Lots of them...

In editor\blitz.bb, at the top of the mouse input code, amend the main layer stuff to:
If xpos>-1
		If MouseDown(1) And (activelayer<>LayerCollision And activeLayer <> LayerHits) Then
			If activelayer=LayerObject Then
				If activetile<NumObjects Then map(xpos,ypos,activelayer)=activetile+1
			Else
				map(xpos,ypos,activelayer)=activetile+1
			End If
		End If


In engine.bb, remove these two separate bits of code
Dim objectname$(9)
and
; object names
Data "Ammo","Health","Generic Key","Red Key","Green Key","Blue Key","V Door","H Door","Alien Blood"
For n=1 To 9
	Read objectname(n)
Next
and add ClearVis() after the load() at the top

In consts.bb, I've moved the map and objectdef arrays in here from map.bb, plus type definitions

And I moved in the LAYER_VISIBLE global from map.bb for neatness

In editor.bp, add an include for "inc\consts.bb"

In map.bb, add the following to the load function between the MAP and OBJ loads
	;load the object file
	For od.objdef=Each objdef
		Delete od
	Next

also, change all ReadInt or ReadStrings in OBJECT *load* and *save* code to ReadLine, and add the following new function
Function ClearVis()
	;set initial visibility for all tiles to none at all
	;we'll set initial player vis when we create the player
	For x=0 To 255
		For y=0 To 255
			map(x,y,LAYER_VISIBLE)=0
		Next
	Next
End Function


You'll need the new OBJ file, straight text for now, so I've just copied it in below: copy, paste and save as test.obj


In players.bb, add the following

and replace Player_updateall with this:

Finally, in hud.bb, drawhud function amend the select case criteria.
			Select Objectdef(pu\obj)\image
				Case 2,3,4,5:		frame=Objectdef(pu\obj)\image
				Default:			ok=False
			End Select

On that note, I think we need to worry about a 'proper' inventory sytstem, although I really don't like the idea of an RPG style inventory. To be discussed once we sort other stuff out methinks...

For reference, I've put together some notes on how I see scripting working below.

Hope that's everything! From now on, scripting changes should just be changes to the scripts held in the OBJ file, and RunScript (although it might well call other existing code), plus a couple of minor additions to other bits of code to support other triggers. But for now, this is it!


Mark Tiffany(Posted 2004) [#89]
Oh, and by the way, this wasn't as painful as I thought it could be - a testament to our combined abilities that the code was well structured enough to slot this in!

*gratuitous pats on backs all round*


Caff(Posted 2004) [#90]
Nice! Perhaps time for a new thread with latest builds at the top?


Rimmsy(Posted 2004) [#91]
I think there may be something wrong with the checkVis() function. I added the clearVIS after the load("map\test"). This piece of code:
For n=1 To 20
	Repeat
		x=Rand(100,2000)
		y=Rand(100,2000)
		
	Until gettile(x,y,0)=0 
	spawnalien(x,y,n,Rand(FACE_HUGGER_ALIEN,STANDARD_ALIEN))
Next
; **

is looping infinitly because there are no valid points on the map to add an alien. Did you update this?

I feel 1000% better about sticking with the old editor. I don't even know why I changed it. I've moved the script functions and the script design notes to script.bb. I'm just going to read over the script notes later. it's looks very interesting. I'm sorry about the crap editor, I feel we're back on track.

I've removed any reference of the old editor and it still works great. I'd like to get the room creator in there still, as I think it'd save us a lot of time.

I won't update until I figure out the alien loop bit.


Matthew Smith(Posted 2004) [#92]
Rims,

Sorry about the alien code - you know when you make changes, and think you have uploaded everything! Doh!

Here is what's missing:
Function Alien_DrawAll()
	Local al.alien
	For al.alien = Each alien
		If al\visible Then 
			DrawImage al\image,al\x-al\offset-screenx,al\y-al\offset-screeny,(al\dir * al\frameTotal) +al\frame
		End If
	Next
End Function


Once we get some more frames with the Aliens, we just set frameTotal as required.


Rimmsy(Posted 2004) [#93]
Thanks Matt. As soon as Mark replies I'll upload the code and start a new thread.


Mark Tiffany(Posted 2004) [#94]
Rims, I didn't touch that bit of code. I can't think how any of my latest changes could have affected it...It's checking the collision layer for zeroes - which is correct, so I can't think why it's not working. What does the map look like in the editor? Have you somehow got a screwed up map where all the tiles are collisions? confused...

Aha, just looked at ClearVis() in my post above: make sure LAYER_VISIBLE is being defined by an included file. Because if it's not defined, it will be setting the entire collision layer (0) to zeroes, instead of the entire vis layer (6) to zeroes! (Although I still can't see why that would make the alien create stuff loop!)


Rimmsy(Posted 2004) [#95]
Yeah, that fixed it. I'd just misplaced it. Player seems to have lost his animation. I've uploaded it anyway. Regard! A new thread!


Clyde(Posted 2004) [#96]
Wonderfull, loved the orignal Team17 game. And this rocks :)

All the best,
Mikey F :)


Rob Farley(Posted 2004) [#97]
Next thread