Jewelry Game

Talk about making games.

Jewelry Game

Postby Scorpion50o1 » Sat May 08, 2010 6:20 pm

my jewelry game is back from the dead(from old post)
I got EXE
Could yall help me with save add load on it :O
Attachments
jewelry.exe
Sorry no Save or Load yet i need help with it.
(1.81 MiB) Downloaded 93 times
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: Jewelry Game

Postby Thanx » Sat May 08, 2010 7:12 pm

I can look at it... but not now, it's the evening here, I should get sleep, because tomorrow I pack up, and the day after tomorrow I go on a 10 day journey to Italy... Won't be on the forums either... At the moment I don't see the purpose of this game, but the point would be to settle with a maximum number of objects you want, then when saving, you send activation events to all those clones, and in their activation events they should save to an array (two array for each actor type, one for their x positions, the other for their y positions) It saves into the array slot of their cloneindex. Then saves the vars (put them all in a save group, and use the saveVars function to save them.

For loading you loadVars, and you create the different actors one-by-one, and give them the appropriate xpos and ypos read out of the saved arrays... Create a loop, and the loop accesses the clones one-by-one...
sprintf(avariable, "actorname.%i", i);
getclone(avariable)->x = 4;
I think that should work for getting a specific clone's position...
Sorry if it may seem a bit foggy, but just say so. I just wrote this down, because I really wanted to help instantly... :D
http://www.youtube.com/watch?v=XyXexDJBv58
http://www.youtube.com/watch?v=Be4__gww1xQ
These are me and playing the piano (second one with a friend/fellow student)
Hope you watch and enjoy!
User avatar
Thanx
 
Posts: 314
Joined: Sat Jan 26, 2008 10:07 pm
Location: Home sweet home! :)
Score: 24 Give a positive score

Re: Jewelry Game

Postby Scorpion50o1 » Sat May 08, 2010 7:35 pm

For the game the user of it can make unlimited amount of shapes not just a maximum of say 20.
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: Jewelry Game

Postby Thanx » Sat May 08, 2010 7:41 pm

In that case you'll need what are called dynamic arrays...
Which means you have to define the variables you want to save yourself
You have to get to know malloc,realloc functions, as well as sizeof.
It'd be hard to explain the whole thing at the moment, because it's tricky coding, and though I know it, I haven't practiced it nearly enough to explain it well. I suggest looking up the functions in searches, as well as dynamic arrays... Look through examples, and then follow a similar approach as I've explained just before.
Then of course you can't save it in groups, so, you'll also need to know how to open a file for reading, writing, and you'll need to know how to save to it, and close it... That's not that easy, and I suggest doing it with text files at the moment, because it's simple. fopen, fclose, fgets, fprintf these are the more important functions to know, again I suggest looking them up, and getting to know them... That's all I can say, because I can't explain it well enough... sorry, but I hope this'll still be helpful! :)
http://www.youtube.com/watch?v=XyXexDJBv58
http://www.youtube.com/watch?v=Be4__gww1xQ
These are me and playing the piano (second one with a friend/fellow student)
Hope you watch and enjoy!
User avatar
Thanx
 
Posts: 314
Joined: Sat Jan 26, 2008 10:07 pm
Location: Home sweet home! :)
Score: 24 Give a positive score

Re: Jewelry Game

Postby Hblade » Sat May 08, 2010 8:19 pm

Scorpion, saving and loading:



This shows you how to save arrays. Using this you can save ^.^
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Jewelry Game

Postby Scorpion50o1 » Sat May 08, 2010 8:29 pm

will this work for clones?
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: Jewelry Game

Postby lcl » Sun May 09, 2010 3:59 pm

I'd like to play it, but my computer doesn't support this full screen version, so could you load here also windowed version? :D
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Jewelry Game

Postby Scorpion50o1 » Sat Jun 12, 2010 10:57 pm

so Hblade i gotta do that for all the players
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: Jewelry Game

Postby Hblade » Sun Jun 13, 2010 1:44 am

It should work for clones :D idk o.o
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Jewelry Game

Postby Scorpion50o1 » Sun Jun 13, 2010 1:46 am

havent tested yet but i am working on the game making more "gems"
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: Jewelry Game

Postby Scorpion50o1 » Sun Jun 13, 2010 2:08 am

k something is wrong when i move the gems and save and reopen it they are all in one spot instead of seperated like i had them
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: Jewelry Game

Postby Hblade » Sun Jun 13, 2010 2:22 am

Remember to use the array and use [cloneindex] in draw actor :D (I forgot what the problem was lol)
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

A cool demo :D

Postby Hblade » Sun Jun 13, 2010 2:34 am

Heres a demo I hope it helps :D The code is very simple too :3
Attachments
Demo.zip
(105.13 KiB) Downloaded 73 times
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Re: Jewelry Game

Postby Scorpion50o1 » Sun Jun 13, 2010 9:25 pm

the demo did help but when i start up the game all the things start up at one spot
OMG IM SO BORED <(^^)> (>^^)> (>^^)>
92% of teens have moved on to rap. If you are part of the 8% who still listen to real music, copy and paste this into your signature.
User avatar
Scorpion50o1
 
Posts: 246
Joined: Fri Apr 17, 2009 1:07 am
Location: TX
Score: 8 Give a positive score

Re: Jewelry Game

Postby Hblade » Sun Jun 13, 2010 10:59 pm

idk then sorry :(
Subscribe to my YouTube? - Yes| No
User avatar
Hblade
 
Posts: 4455
Joined: Fri Dec 08, 2006 11:14 pm
Score: 181 Give a positive score

Next

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest