Author Topic: DoodleJump Discussion  (Read 95105 times)

0 Members and 2 Guests are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Projectile motion, sound, doodlejump
« Reply #30 on: December 15, 2010, 04:25:03 am »
Can't wait for the beta. ;D

I'll also move this to the projects section since it's in the wrong sub-forum.

Offline Mohammad

  • Project Author
  • LV3 Member (Next: 100)
  • ***
  • Posts: 95
  • Rating: +23/-8
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #31 on: December 15, 2010, 08:12:56 pm »
UPDATES 8):
starting small:
scoring different
1 point for each platform that you pass
points keep adding up fast when you jetpack
New UFO ship:
appears every time you pass a hundred platform.
it shoots you and if you get hit...-25 points
Shooting: Doodler shoots! but only when UFO is there
if you hit a UFO, +50 points!
shooting still very primitive, will make it much better :)

take a look: watch for when the UFO appears when score=260 and 330-ish
this is the best i can do in Wabbitemu...on calc that UFO stands no chance ;)
« Last Edit: December 15, 2010, 08:19:30 pm by Mohammad »

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #32 on: December 15, 2010, 08:30:34 pm »
Wow, looks nice. I know this has probably been mentioned before, but are you planning on adding gravity; ie more realistic jumping? Also as a side note, you should probably edit your last post instead of doubleposting if it's been less than 6 hours (limit is 1 hour for project updates) :)

Offline Mohammad

  • Project Author
  • LV3 Member (Next: 100)
  • ***
  • Posts: 95
  • Rating: +23/-8
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #33 on: December 15, 2010, 08:46:15 pm »
Make a loop that constantly adds a velocity variable to the y-position variable, and if the object is not at rest, subtracts some value from the velocity variable every iteration. To jump, set the velocity variable to a positive value.

A basic example (also attached):
Code: [Select]
.GRAVTEST
ClrDraw
[FF818181818181FF]→Pic1
56→Y
0→V
Repeat getKey(15)
!If Y-56
0→V
If getKey(54)
7→V
End
Else
V-1→V
End
Pt-Change(44,Y-V→Y,Pic1)
DispGraph
Pt-Change(44,Y,Pic1)
Pause 32
End
       Pseudocode:
Code: [Select]
Header
Clear screen
Object sprite
Initialize y position
Initialize y velocity
Until user presses clear
  If object is at rest (bottom of screen)
    Set velocity to zero
    If user presses 2nd (jump)
      Set velocity to a positive value
    End
  Else, object is not at rest
    Decrease velocity
  End
  Update y position and draw sprite
  Update screen
  Clear sprite
  Delay
End

ok ive tried a version of the code above to make pretty good gravity...but the problem is that since doodler jumps down more that 4 pixels per frame sometimes, he skips through the platforms and does not hit them! can someone please help me avoid this?
what are other ways off simulating gravity??
« Last Edit: December 16, 2010, 01:40:29 am by Mohammad »

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #34 on: December 15, 2010, 10:47:41 pm »
Wow, that looks cool!  Great job! ;D

Offline Madskillz

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 488
  • Rating: +32/-2
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #35 on: December 16, 2010, 12:29:11 am »
Looks great man, is that UFO shooting or where those doodlers bullets?

Offline Mohammad

  • Project Author
  • LV3 Member (Next: 100)
  • ***
  • Posts: 95
  • Rating: +23/-8
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #36 on: December 16, 2010, 01:23:14 am »
Looks great man, is that UFO shooting or where those doodlers bullets?
yeah UFO shoots 8)
« Last Edit: December 16, 2010, 01:23:28 am by Mohammad »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Projectile motion, sound, doodlejump
« Reply #37 on: December 16, 2010, 04:51:25 am »
WOAH! Looks even better and better! I think the jumping is currently fine for the type of game, though. I guess gravity could be a great addition but it's not fully necessary. I really can't wait to play this. What are the gray blocks though? Also is there a difficulty increase with the time besides the moving platforms being more common as you progress and the UFOs? Keep up the good work! :thumbsup:

Offline JustCause

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 810
  • Rating: +115/-5
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #38 on: December 16, 2010, 09:52:18 am »
ok ive tried a version of the code above to make pretty good gravity...but the problem is that since doodler jumps down more that 4 pixels per frame sometimes, he skips through the platforms and does not hit them! can someone please help me avoid this?
what are other ways off simulating gravity??

Ah, you've ran into the inevitable problem of platformers. The way I handled this is to split multi-pixel movement into single-pixel movement: I'd try a For loop to check every individual pixel. It's not fun (check the My First Quantum Translocator thread and you can see me whining about doing it for about four pages) but it works, and if you do it right there's no speed decrease.

I'm impressed. Keep up the good work, and (because I haven't said this yet) welcome to Omnimaga!
See you, space cowboy...

Offline Mohammad

  • Project Author
  • LV3 Member (Next: 100)
  • ***
  • Posts: 95
  • Rating: +23/-8
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #39 on: December 16, 2010, 05:58:52 pm »
i have to make a descision some time about the gravity and i tihnk >for now<...
im going to stick with the way it is because who would have time to look at how doodler jumps when you're busy fighting aliens and not falling?
if i am done with every possible thing i can do to this game, then gravity will will be my next target

as of now, the way i set up jumping is crucial to all the functions of the game...anyway
i appreciate your output. ill make a space shuttle as soon as i can, and then i'll make the menu...and maybe ill release it sooner as soon as i get a bug with the bombs taken out ;)
edit: ive thought of a way to do gravity  :o it may or may not work...wrote down for when i get around doing it....here ill explain my thinking:
ill use the technique i stated on my above post....
soo...since each platform gets put back up to the top after it hits the bottom, every platform is exactly 16 pixels apart(vertically) from another platform, so i will check (with for loops) if doodlers feet are anywhere near 16 pixels above a platform's y coord(each platform (there are four) has a x and y coordinate) and also if he is within the length of the platform...this would slow it down but i could remove my pauses ;)
« Last Edit: December 16, 2010, 06:06:10 pm by Mohammad »

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #40 on: December 16, 2010, 06:13:15 pm »
how large are the platforms? if they're three pixels in height, give doodler a maximum downwards velocity (terminal velocity) of 3 pixels. hmmm but that won't work since your  platforms aren't solid.

did you say that you have the x and y coordinates of each platform in a place? then you could just loop through each platform and see if doodler's foot is contained within it.

Code: [Select]
xPos = doodler's x position
yPos = doodler's foot position
xPlat = platform's x position
yPlat = platform's y position
height = platform's height
width = platform's width.
if(xPlat <= xPos and (xPlat + width >= xPos) and (yPlat <= yPos) and (yPlat + height >= yPos)
//doodler's foot is in a platform, so jump up.

this will probably also slow down your code a lot... but it's another suggestion.


Offline Mohammad

  • Project Author
  • LV3 Member (Next: 100)
  • ***
  • Posts: 95
  • Rating: +23/-8
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #41 on: December 16, 2010, 06:20:21 pm »
yeah i tried term velocity for downward falling but filled up platforms look really bad...
i could try the "if foot is touching platform" but what if doodler skips through the platform?

i think ive got it :): terminal velocity wil be 4, if a platform is at least 4 pixels from doodlers foot, his Y pos will change to the platforms Y pos
(so it looks like he touched it)
« Last Edit: December 16, 2010, 06:21:03 pm by Mohammad »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Projectile motion, sound, doodlejump
« Reply #42 on: December 16, 2010, 11:43:41 pm »
If it's too much hassle to change the game to have better physics, I think you should just not add the physics. I think in its current form it's very fine. It may make the game a bit more interesting but I'm sure it would still be very fun even with the current moving.

Offline Mohammad

  • Project Author
  • LV3 Member (Next: 100)
  • ***
  • Posts: 95
  • Rating: +23/-8
    • View Profile
Re: Projectile motion, sound, doodlejump
« Reply #43 on: December 17, 2010, 09:48:31 pm »
ok im sorta bored with this released first beta. check very first post ;)
wabbitemu suddenly broke down and goes to setup everytime and i dont think i can fix that...tried many times...oh well made the menu check it out ;)
« Last Edit: December 17, 2010, 09:50:28 pm by Mohammad »

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Projectile motion, sound, doodlejump
« Reply #44 on: December 17, 2010, 09:50:07 pm »
Cool to see the beta out! :D

By bored I hope you don't mean you're stopping working on this, though? D: