Micky4fun's compo 2009 game blog , now finished..

Started by micky4fun, November 10, 2009, 10:16:01 AM

Previous topic - Next topic

micky4fun

Hi all

thought ile better give an update , well level 2 water rescue has been scrapped as it did not play very well,
now re-doing level 1 at little differant ,
and thats about it , times ticking bye..

mick :)

micky4fun

#16
Hi all

well better post an update , well things have been really slow until the last couple of days , as there has been a complete re-work on game , lots have been changed , as you can see by pic's , level one is about 85% complete , level 2 about 50% complete , level 3 well 0% complete
ive been very very lucky and have a lot of gfx's supplied from BlinkOk , as you can see they are a little better than my original gfx's

the game now plays as follows ,
level one , rescue chicks from burning building ,
level two , get them to the hospital on in time ,
level three , get them in an empty bed at the hospital

sorry there is no demo of any level yet , but soon

mick :)

kevin


It's certainly looking slick mick.. Just hope it's not a one horse race...

Deano

"Black holes are a result of God dividing the universe by zero."-Steven Wright

micky4fun

#19
Hi all

well got a little time just to post a non playable demo of level 2 now 75% complete ,
will be interesting to see how it plays on some peoples slightly older machines
think you will all agree BlinkOk has done a great job with all the gfx's

yet to do , complete scoring system and display all levels ,
            , level 1 to level 2 linker
            , start screen , if any?
            , sounds
            , oh yes level 3 , plus other bits n bobs

thanks
mick ;D





kevin

 Both seem to work fine.

One little tip though, you don't actually need 4 different car types. (type Car1, car2,car3 car4)  They're all the same structure. So just declare one common Car structure  (TYPE) and use that for each of typed car arrays.

 So this stuff,



type car1
sprite
y#
x#
speed#
endtype
type car2
sprite
y#
x#
speed#
endtype
type car3
sprite
y#
x#
speed#
endtype
type car4
sprite
y#
x#
speed#
endtype
dim cars1(1) as car1
dim cars2(1) as car2
dim cars3(1) as car3
dim cars4(1) as car4


becomes


Type car
sprite
y#
x#
speed#
Endtype

dim cars1(1) as car
dim cars2(1) as car
dim cars3(1) as car
dim cars4(1) as car
[/quote]


micky4fun

HI all

right thanks kevin , was not to sure so i did it that way
well times going to be really tight now ,
slight update even though its took all day to do ,

level 1 nearly done now , see pic
level 2 some sounds added
level 3 nothing done yet

will try to link level 1 to level 2 if i get time in the next hour or so

thats it , times very tight , i have not even had time to tryout others in compo's latest demo's so i apologize for that
but from what i have read , well times tight to

mick :)

micky4fun

#22
Hi all

well things really hotting up now , into last week , things getting a bit hectic
still loads n loads to do ,
but managed to do some extra bits today ,

title screen now done as pic , thanks to BlinkOk's gfx's
level 1 to level 2 linking done,
no score system yet done ,
and level 3 still not started yet

ran into a few problems that i seemed to overcome , so code not the most eligant , but you are use to that with me , lol

back soon
mick :)

micky4fun

Hi all

ok just 2 hours to go to see if wee have an extension ,
so been tapping away like mad just in case it does'nt

heres level 3 just in early days , about 25% done
the idea about this level is that you have to fling the chick into an open window to get her in the hospital
as its front doors are stuck closed , well would not be much of a game if they were open , would not have much to do otherwise
im sure this happens time to time in real life anyway ,, lol

mick ;D

BlinkOk

yeah! it just happened to me the other day. fun way to get into hospital

micky4fun

#25
Hi all

well was going quite well , but i to have hit a brick wall , dont worrie i have'nt hurt myself , just stuck on part of level 2 for 3 days now ,
its a part that will let bonus items out , but it aint doing what i want it to , its lines 800 to 842 , this if for lanes 1 and 2 , top 2 lanes ,
i want to create a sprite when an image of a lorrie is going to appear far right ready to start coming towards ambulance ,
if i just rem out either item(1) or item(2) parts of code it works , but not with both , get sprite does not exsist , why is this ive done this quite a few ways
all to no avail , any help please !!



thanks
mick :D

update , ive done it another way now , without creating sprites on the fly
i must be doing something wrong there , so ile look into that another day


kevin

#26
  That's some rather difficult code to read.   Seems to be mixing approaches, so i'd expect there to be media clashes sooner or later.

  What's the thinking behind having 4 separate car arrays of for the four lanes ?  


micky4fun

Hi Kevin

QuoteThat's some rather difficult code to read
well you know me , im all over the place , i just cant seem to help it.
im really trying , but then it goes haywire , i will try and load media by getfreeimage , but i find it easier with numbers

QuoteWhat's the thinking behind having 4 separate car arrays of for the four lanes ? 
thats bad planning , ive just been tiding that up , and just 1 car array of 4 now , same with sprite car/ambulance detection
will also sort out some other arrays , i also need to label varibles more clearly

i know i would be in a right tis-was with a lager program , i have trouble reading my own code sometimes , let alone others trying to help me out
after this im going to muck around with the function command , i think this would help me a lot

think this program is going to take me years to learn , but as i said im pretty dum anyway , but getting some nice results out of it , never going to be a pro or nothing
but as i said a million times , this is the best 20quid ive spent in my life thats for sure , ive been here a year , well thats 6p a day so far
wish i was retired , would be on it all day then

mick :)

kevin

Quotewell you know me , im all over the place , i just cant seem to help it.
im really trying , but then it goes haywire , i will try and load media by getfreeimage , but i find it easier with numbers

     Old habits die hard and all that.    Most people see a convention and think 'i'm not sticking to any rules'   -  Without really seeing that what their doing is like driving a car that only turns left..   You soon find yourself running in circles..  By sticking to the 'same old same old'  we're choosing not to learn.   

     Basic programming fundamentals, things like Variables / Arrays() and in particular functions/psubs.  These things  help make programming easier. Not only that, they will allow us to write code  quicker and with less bugs.   One of the ways we can achieve this is by breaking code down into smaller more focused/reusable fragments.    Reusable is key word here.   To make programming easier, we don't want to have to write every project from the a blank page to completion. And we rarely have to.   Generally most people will wrap common blocks of code into a function then when they need this operation (whatever the code block does) we just call the function. 

    This is one area where this program could really benefit from..   For example,   the loading code you're written is all custom.   To load a new sequence of the images we have cut and paste it together.  But really, we could spend 30 seconds a roll a function and never have to do this again!  Not only in this project, but in future one's also.  Where we could just cut and paste our common functions into our new project and we're up and running. 

    So this stuff

 

loadimage "gfx\c0001.png",301
loadimage "gfx\c0002.png",302
loadimage "gfx\c0003.png",303
loadimage "gfx\c0004.png",304
loadimage "gfx\c0005.png",305
loadimage "gfx\c0006.png",306
loadimage "gfx\c0007.png",307
loadimage "gfx\c0008.png",308
loadimage "gfx\c0009.png",309

loadimage "gfx\s0001.png",311
loadimage "gfx\s0002.png",312
loadimage "gfx\s0003.png",313
loadimage "gfx\s0004.png",314
loadimage "gfx\s0005.png",315
loadimage "gfx\s0006.png",316
loadimage "gfx\s0007.png",317
loadimage "gfx\s0008.png",318
loadimage "gfx\s0009.png",319

etc etc
 


could be done as


LoadImages("c", 9,301)
LoadImages("s", 9,311)

; out custom function load series of images
Function LoadImages(File$, NumberOfFrames, ImageIndex)
  for lp=1 to NumberOfFrames
     loadimage "gfx\"+file$+digits$(lp,4)+".png",ImageIndex
     inc ImageIndex
  next
EndFunction ImageIndex


    This example wraps,  loading a sequence of images into a common reusable function.  Basically we've made our own custom command.   So now we can load any sequence of frames into a series of image numbers by just calling it and passing the file name (without folder, and number/extension), the Number of frames in the sequence and the starting image number it should use.

     The benefits of this,  this that it means less code for use to write,  less code for us to debug and we can reuse this code in the next game, and the name game etc etc...  It also makes our programs easier for 3rd parties to read.. As long, we use meaningful names   :)

    Clearer Code means faster development


Quotethis program is going to take me years to learn , but as i said im pretty dum anyway , but getting some nice results out of it , never going to be a pro or nothing

      The only part of the statement I'd even come close to agreeing with, is that yes,   programming can take years to learn.    It's a lot like learning chess in a way.    Anyway,  there's absolutely nothing dumb in your achievements thus far.  With each game  there's more and more growth !  -  Moreover, i'd say that  you're a very natural programmer as you've been routinely been getting better results than many of the self proclaimed pro's ever have in PB..   Strengthening your knowledge of programming mumbo jumbo,  will help you get more of those ideas out of your head and onto peoples screens...



stevmjon

to micky4fun

i can't believe how fast you code. if i entered this competition it would take me a year to submit my entry...lol

i agree with kev, you will learn over time. i did 'spagetti code' for quite some time before i started to expand my knowledge. it is only recently i learnt about types, and i think they are great. they looked confusing to learn, so i avoided it. it was kev's advice that prompted me to read up on them.

things may look confusing or hard, but it's definetly worth experimenting and learning new things. you can only get better this way.


stevmjon

It's easy to start a program, but harder to finish it...

I think that means i am getting old and get side tracked too easy.