Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
2 registered members (Grant, AndrewAMD), 911 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Old snake game effect #318521
04/08/10 08:20
04/08/10 08:20
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
How to make player walk from side to side on screen, like in snake game in nokia (same way I'll be able to create portals). And how to detect when player walks out of the screen? I thought about this so much frown but my small brain not that smart to create some ideas frown


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Old snake game effect [Re: 3run] #318532
04/08/10 10:02
04/08/10 10:02
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
If you can't understand what I'm asking for in this topic, please tell me. My English is really bad frown sorry for that...


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Old snake game effect [Re: 3run] #318541
04/08/10 10:46
04/08/10 10:46
Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
Roel Offline
Senior Member
Roel  Offline
Senior Member

Joined: Jun 2006
Posts: 379
Flevoland, 5 meters under wate...
you can do this with something like the following:

if(my.x > 2000) -> out of screen right
if(my.x < -2000) -> out of screen left
if(my.y > 2000) -> out of screen up
if(my.y < -2000) -> out of screen down

when one of the if instructions is true, the player is out of the screen.
I assume here that the borders of the screen are all at 2000 quants(you can replace them with your own variables
with vec_for_screen you can look up what the screen borders are.

this is just a basic idea. the coding you will have to do for yourself! laugh


Check out the throwing game here: The throwing game
Re: Old snake game effect [Re: Roel] #318551
04/08/10 12:05
04/08/10 12:05
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
Thank you my friend, and can some one tell me, how to make player walk from side to side (up, down, right, left) on the screen, for example when player moves to the right and he when walks out of the screen he just walk in from the left. Like in old version snake game. But not just appear on the other side of screen, he need to walk in and out smoothly. Same as in snake. Can't get even idea how to realize this frown


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Old snake game effect [Re: 3run] #318580
04/08/10 15:37
04/08/10 15:37
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline
User
hopfel  Offline
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
You can make a second snake and create it at the right position on the other site of the screen and delete the first one after it's totally out of the screen. Just give the second snake the same function from the first one.

Hope, I could help ^^


Hilf mir, dir zu helfen!
Re: Old snake game effect [Re: hopfel] #318601
04/08/10 17:01
04/08/10 17:01
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
That is not a bad idea man, and it'll be easy to realize, thank you laugh but it'll be really bagy... If I'll create second snake on the other side of the screen, and then will move up and will turn back again, I'll need to create 3rd snake then, and so on... The size of the snakes woun't be the same etc... I don't really like that solution, I hope some one will have some other idea, the same way I'm going to create portals in my game. Really need some help.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Old snake game effect [Re: 3run] #318641
04/08/10 21:12
04/08/10 21:12
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
Please heed some help guys


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Old snake game effect [Re: 3run] #318707
04/09/10 10:35
04/09/10 10:35
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
No one have any ideas? frown


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Old snake game effect [Re: 3run] #318753
04/09/10 15:59
04/09/10 15:59
Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
hopfel Offline
User
hopfel  Offline
User

Joined: Dec 2008
Posts: 605
47°19'02.40" N 8°32'54.67" E...
I think, there is no other (or just more complicated) way, as creating a new snake. But it's a good solution, you just have to realize it right. (may be you must roll up your code a bit)

1. The snake must have his own function.
2. The size etc. of the snake must be saved in global variables.
3. At the start from the snake-function you must adapt it at this variables.
4. Stopp the while loop in the snake-function after the snake is out of the screen. Create a new snake with the same function. Make the old one continue crawling until it's totally over the screen, then remove the old snakemodel.

It seems easy for me.
Hope it helps,
Hopfel


Hilf mir, dir zu helfen!
Re: Old snake game effect [Re: hopfel] #318772
04/09/10 18:53
04/09/10 18:53
Joined: May 2009
Posts: 5,365
Caucasus
3run Offline OP
Senior Expert
3run  Offline OP
Senior Expert

Joined: May 2009
Posts: 5,365
Caucasus
Yep my friend, that is quite easy. But I hope that there is still an other way to figure this out, because I don't really like the way with cloning snakes grin I'm not at home now, so I'm far from my PC, as soon as I'll get home I'll roll up some parts of my script.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1