News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

For Foxes Sake WIP

Started by micky4fun, August 19, 2012, 03:54:41 AM

Previous topic - Next topic

micky4fun

Hi all

yep that sounds fine , fish will make it harder ,
Quoteps: i have no idea why that .swf animation is so small
lol so small on mine i cant see it , i have tried link on 3 pc's all have latest flash on them , but will no gfx's at all

mick :)

BlinkOk

would it be a big pain in the arse to make a layer that goes IN FRONT of the player (fox)?

kevin


  it'd be about as hard as setting the capture depth.   CaptureDepth, in other words trivial.

BlinkOk

yeah but has mick implemented it that way? i thought he was using levels to display the various layers

kevin

 yep, it's camera based.

micky4fun

hi all

Quotewould it be a big pain in the arse to make a layer that goes IN FRONT of the player (fox)?
no thats ok , reason i have not expanded level to far yet,
Quoteit'd be about as hard as setting the capture depth.   CaptureDepth
ahh thats handy , did not see this command

ok well spent a day or two mucking about with dog chasing fox thing , i tried so many ways of doing it and all looked pretty rubbish , so i left it this simple way as it was one of the better ones , what do you think will this way do ?
also may need a little advice from Kevin , i was going to do say one level split into 3 , then boss
so about 5 screens per level so i can get in 100 coins , 100 fence pieces without cramping them in to mush ,
now which way should i go , do a level at 15 screens plus boss , of just do them all seperate at 5 each then reload part 2 , 3 etc ?

also at the moment fox dies and goes back to begining , now once level is complete if was thing of doing what they did in mario , the black circle thing where it starts big and goes right in to where mario is and then they switch level and open black circle up again , whould this be ok ? or something else , ?
right just incase this seems ok , is there a easy way of doing this circle thing ?

ok thats about it , heres the dog chasing fox thing

mick :)

kevin

#126
Quote
i was going to do say one level split into 3 , then boss
so about 5 screens per level so i can get in 100 coins , 100 fence pieces without cramping them in to mush ,
now which way should i go , do a level at 15 screens plus boss , of just do them all seperate at 5 each then reload part 2 , 3 etc ?

  I don't think it'd really matter for the block data, as you can create the 'world' as one big long level (of how many layers it has),  then load this all data into memory at the start of the game or start of a new world.

  Now when the player goes to start World #1, Level #1,  you could copy the 'rect' of blocks into the display levels.. and your done.   To make this simpler, i'd add a marker chunk to the block data (in the header). So you can tag  the start (left hard block) of each level.   Assuming they're stored left to right in the editor..

  level 1 within this world will no doubt start at column 0,  level 2 might start at column 250 from the left (i've no idea), level 3 might start at 623 etc etc.     So levels can be as short/wide as they need be.   There's no point externalizing the game data, only to hard coding this stuff into the program.  

  The editor could use the 'level markers'  to tag dropped characters as belonging to each level.  So if you add entity creation to the editor, which personally is a must if you want to have a more than 3 levels.  Which i think people will be expecting.  


Quote
also at the moment fox dies and goes back to begining , now once level is complete if was thing of doing what they did in mario , the black circle thing where it starts big and goes right in to where mario is and then they switch level and open black circle up again , whould this be ok ? or something else , ?


  There's a few ways that come to mind, in the Missile Attack & TwinTrix (from memory)  uses shape to create such an effect.    You plot a circle around the player using Cos()/Sin()  (ie. polar coordinates)  Then link this these coordinates as edges in the shape.    To invert you add one final edge, that's off the screen.

  Could do the same thing with TRI/ GrouaudTri/TextureTri, just by plotting to two circles (inner & outter) at say 10 degree intervals, then connect the coordinates.

PlayBASIC Code: [Select]
  AngleStep#=10

For angle#=0 to 360 step AngleStep#

InnerX#=CenterX#+Cos(Angle#)*InnerRadius
InnerY#=CenterY#+Sin(Angle#)*InnerRadius

OutterX#=CenterX#+Cos(Angle#)*OutterRadius
OutterY#=CenterY#+Sin(Angle#)*OutterRadius

etc
next



   Polygon Ring



    Also, rather than manually drawing font characters,  spent a minutes and make a little conversion program that runs through the characters, make a bitmap font from them and then saves them.     once save you can then just load the crf and use the Print /Text commands to draw stuff.   

   conversion code..

PlayBASIC Code: [Select]
   path$="C:\MicksGames\platform12\gfx\hud\"

; load the font frames into image memory
For lp =1 to 11
LoadFXIMage path$+"FOnt"+Digits$(lp,4)+".png",lp
next

; get the size of the first frame/character
Width =GetImageWidth(1)
Height=GetImageHeight(1)


; -------------------------------------
; Mask colour our images are using
; -------------------------------------
MaskColour = $00ff00ff

; -------------------------------------
; Create Bitmap front from images (FX formated)
; -------------------------------------
CreateBitmapFont 2,Width,Height,4
fontmaskcolour 2,MaskColour

TempImage=NewImage(width,Height,2)
chrlist$="1234567890x"
For lp=1 to 11
RenderToImage TempImage
; clear our temp image..
Cls MaskColour
drawimage lp,0,0,false
Thischr=Mid(chrlist$,lp)
GetFontChr 2,ThisChr,0,0
next

; set the widht of the X characterso it's little thinner
FontChrWidth 2,asc("x"),Width*0.75



rendertoscreen

; demo this mini font
setfont 2
print "01234567879xxx"

; save the font with what ever name
SaveFont Path$+"Hud-Numbers-Font.crf",2


Sync
waitkey





   So the code required in the game is now just.


PlayBASIC Code: [Select]
   path$="C:\MicksGames\platform12\gfx\hud\"

; Load the HUD font.
LoadFont Path$+"Hud-Numbers-Font.crf",2

; Set this is the current output font
setfont 2

; draw some stuff
print "01234567879xxx"

text 200,200,"345234562"

Sync
waitkey








BlinkOk

Quoteso i left it this simple way as it was one of the better ones , what do you think will this way do ?
looks fine to me
Quotethe black circle thing where it starts big and goes right in to where mario is and then they switch level and open black circle up again , whould this be ok ? or something else , ?
that sounds really nifty

is it me or was that last demo a bit choppy?

micky4fun

Hi all

Quoteis it me or was that last demo a bit choppy?

in what way , scrolling ? platforms ? it seems fine for me

mick :)

BlinkOk

ok it's prolly me but i can't check right now. will prolly muck about with it tomorrow

micky4fun

#130
Hi all

ok heres where i am now , kinda got a levels in 6 screens width , want to keep them not to long per part level , as you can see there are plenty of coins in this first level
so what i may do as other levels will have platforms in sky , is have maybe only 50 coins on some and have the counters for coins and flowers and carrots and fence count backwards so how mant left rather than got.
this is the first level so only coins and fences , will start to add others in other levels , no gamekeep in this first level
once you get to end of level nothing happens , but will do level pt1 complete and then carry on

BlinkOk no rush on end of level boss , i have got extra front layer in game now and can use capturedepth as well

Kevin thanks for helping with black circle thing i would have no idea how to do this , now in game but just black

hope this plays ok
mick :)

BlinkOk

sounds cool mick.
should we do something at the end of the level? a house or something?
maybe when you get all the coins a key appears somewhere and you collect the key and it lets you in the house.

anyway i got distracted working up another tilemap for a spooky level;


gotta do something about that far background. the platforms don't pop out enough.

ps: tried to demo again and it's fine. i must have had something running in the background

Vee

This project looks really amazing!
Good work guys :)
On my Computer there are issues with the graphics though. I see the pink parts that should be transparent and when i cross the first bridge, the level disappears but i can still see the background and the enemies.
I'm using Version V1.64i. Any ideas?

Looking forward to seeing how this comes along!

kevin

#133
QuoteI'm using Version V1.64i. Any ideas?

  Yep.. here's a few  (Scroll down)



Mick,

   The new versions good, spent a while jumping from the platform to platform only to find there's nothing to actually get to.     I'd still look at detaching  the camera from the player.   Like so,  curvevalue edges one value towards another.  The bigger the divider the smaller the step.  Gives it a cheap inertia feel, could do the same for the player.

PlayBASIC Code: [Select]
      if player_dead=false 
CameraX#=curvevalue(playerx#,camerax#,20)
PositionCamera 1,CameraX#-(GetScreenWidth()/2)-40,0
endif





micky4fun

Hi all

Quoteshould we do something at the end of the level? a house or something?
maybe when you get all the coins a key appears somewhere and you collect the key and it lets you in the house.

yep that sounds the ticket ,

spooky level looks great , so level one as is , with normal kinda house at end of level ,
then level 2 spooky level with spooky house at end , or something like that

Thanks knieb , yep you need to upgrade to get it to run properly

Quotespent a while jumping from the platform to platform only to find there's nothing to actually get to.
i take it you mean at end of level , yep still goto do a bit on that

QuoteI'd still look at detaching  the camera from the player
yep your code lmakes it look better thanks

mick :)