Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / The DB Classic Programming Challenge Thread

Author
Message
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 26th May 2010 17:21
Well, this is the last day... Has ANYONE made anything? :-|

TheComet?

TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th May 2010 20:42
Challenge Ended

Too bad no one entered...


Erm, what happens now?

TheComet

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 27th May 2010 21:15
For me, it'll probably be a couple of weeks before I can put together any program that requires time and thought. I've got too much going on at the moment. Maybe we can leave this particular challenge open for a while...

or a new one. Are there any potential participants out there?

Enjoy your day.
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 28th May 2010 05:50
I might be able to make a small program, but since I'm not too good at controlling graphics in DB, it could prove difficult for me. Challenges like the Roman Numeral one that don't require graphics are ones that I would be more likely to enter in.
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 31st May 2010 02:49
If the toy challenge is still open then weebles wobble but they don't fall down!



I really shouldn't give in to whimiscal inspiration at 11pm. It's a good job it's a bank holiday tomorrow.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 4th Jun 2010 23:39
That is one wobbly weeble!

Enjoy your day.
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 4th Jun 2010 23:49
And it'll never fall down
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 8th Jun 2010 06:26
Here's a Rubik's cube puzzle game. It doesn't use any external media, but has multi-sided textured cubes and sound. I did go against the rules and used memblocks to build my sound and mesh objects, though.

I'm posting the exe, I'm not quite ready to release the source.

It does have sound so be careful with the volume. Nothing extraordinary, just what sounds like giant sliding stone slabs (if you use your imagination)

Use W A S D to rotate the view

Use Q E to zoom in and out

Use the numeric keypad numbers (or the other numbers) to select a rotation group of cubes. They will be highlighted.

Press + or - to rotate the group.

Press 0 (zero) to deselect all groups (un-highlight the highlighted group).

This is a first draft, so to speak. The tricky part was getting the rotation to work. There is no solver, and you can't save your progress just yet, and if you do mix it up and solve it, nothing happens. It's like having the actual puzzle, except it's harder to manipulate because you can't touch it!

Enjoy your day.

Attachments

Login to view attachments
t10dimensional
15
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: Code Cave, USA
Posted: 10th Jun 2010 10:33 Edited at: 10th Jun 2010 10:33
Very cool, I made a 2d version of the Rubik's cube but it's on my other computer.

Just wondering but did you happen to have used a shortcut in the rotation of the cube. What I did was just:

if rotation(2)=1
square(side2,2,1)=square(side1,2,1)
square(side2,2,2)=square(side1,2,2)
square(side2,2,3)=square(side1,2,3)
endif


and so on. Is there a mathematical way to do this.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Jun 2010 11:16
2d? How did you do it in 2d?

Quote: "Just wondering but did you happen to have used a shortcut in the rotation of the cube. What I did was just:

if rotation(2)=1
square(side2,2,1)=square(side1,2,1)
square(side2,2,2)=square(side1,2,2)
square(side2,2,3)=square(side1,2,3)
endif"


I don't know if I used a shortcut, but I did do it mathematically. With any rotation of any one side, that's 9 individual cubes that have to be rotated. I couldn't figure out a way to do it using DBC's commands because once the cubes start being rotated on multiple axes, their orientations can all be different for the same side of the puzzle. I had to figure out a way to maintain their world angles (the angles DBC reports for objects) but change their local orientation. So, I used matrix math to recalculate each cube as it was being rotated for a particular side.

Enjoy your day.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 10th Jun 2010 21:29
@ 29 games

nice! You could extend it now so it can roll on the z axis too, that would make it even better ^^

@ Latch

That's quite cool ^^ I'm sure there is quite a lot of math behind the coordination of each cube when rotated?

I am however not too keen on the steering... What I had in mind would be to hold the RMB and move the mouse to rotate the cube, and that each side would be selectable with the LMB. Rotation of a side could be a LMB drag or something, and deselect a side by clicking in empty space. Just some thought.

Does this still count to the challenge?

TheComet

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th Jun 2010 22:32
Quote: "That's quite cool ^^ I'm sure there is quite a lot of math behind the coordination of each cube when rotated?"

Not as much as one might think. There are three rotations. 1 around each axis, and each group is nine cubes, so a loop of nine where each cube in a group is rotated 3 times; so it ends up at the correct orientation.

Quote: "I am however not too keen on the steering... What I had in mind would be to hold the RMB and move the mouse to rotate the cube, and that each side would be selectable with the LMB. Rotation of a side could be a LMB drag or something, and deselect a side by clicking in empty space. Just some thought."

I couldn't figure out how to do it so the rotations were consistant, and alter the camera perspective and keep the dragging of the mouse consistant. It was easier for me to just choose a side with a number. But I may play around with it. Once it worked, I sort of shelved it as "done".

Quote: "Does this still count to the challenge?"

Mine isn't in souce so mine doesn't count towards winning or losing.

Enjoy your day.
t10dimensional
15
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: Code Cave, USA
Posted: 11th Jun 2010 02:31
I did it in 2d by just pasting all 6 sides of the cube on the screen. Like:

And then taking commands like f b t r l d(front, back, top, right, left, down). And that makes the "cube" "rotate" and if you want to rotate the opposite direction you just add an "i" for inverse to the end of the command.
Quote: "
I don't know if I used a shortcut, but I did do it mathematically. With any rotation of any one side,..."


Sorry I explained it badly.

I made the cube by making a array that held all the squares colors.

dim square(side(1-6),x(1-3),y(1-3))

And assigned each color a number.

1=yellow
2=red
3=blue
and so on

So when I "rotated" the square by entering commands I had to, for each command, make all of the squares effected to change to the color it would if it were 3d.

So I was just wondering if there was a better way to do a Rubik's cube.

Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 11th Jun 2010 15:10
I'm not sure if there is a challenge going on right now? Is the toy competition still happening or we just waiting for a new idea?


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 11th Jun 2010 16:49
There is one entry for the toy competition, and another program has been coded but no source released, so I think it is still open...

TheComet

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 12th Jun 2010 01:04
I guess right now, we're sort of "toying" around

@razerx
Quote: "So when I "rotated" the square by entering commands I had to, for each command, make all of the squares effected to change to the color it would if it were 3d.

So I was just wondering if there was a better way to do a Rubik's cube."

Interesting. It depends on what you mean by better. If the rotations can be done without any trig functions, then depending on how it's handled it might be a faster program. Your array reference for example, could be very fast if it's just look-up tables and assignments. Probably faster than calculating rotations.

What I had trouble with is rotating a cube in one direction, let's say, around the X axis, and then determining what directions were valid rotations from there. Take a look at this 3d axis:



Use the arrow keys to rotate around x or y . If your press the right or left key, the axis will rotate along the X-Z plane of 3d space. Now, if you press the up or down key to about 90 degrees, a Y rotation will now be along the Y-Z plane. If I always want the left and right arrow keys to rotate along the X-Z plane, I have to some how figure out what the orientation of the axis (the cube in the rubiks cube) so the rotations are consistent. Now, just imagine this with 27 cubes all possibly having different orientations.

Do you think your array system can account for the change in orientation? If it can, then prehaps controls as TheComet suggested would be easier.

Enjoy your day.
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 17th Jun 2010 00:48
@ the comet

Thanks. I'm currently having a play with getting something to roll in all directions, although I find dealing with 3D rotation in DBC to be a bit of a pain.

@ Latch

Very nice rubik's cubes.

As regards if this challenge is still open, the comet set it so I guess he gets to declare when the challenge is over (which I think he's already done). Personally, I'd give it to the end of the weekend to see if anyone else enters.
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 17th Jun 2010 16:48
Updated official challenge closing date : Sunday, 20th June 2010

Personally I think there won't be any other entries, but I do hope that 29 games can make an update for full 3D rotation, and Latch can release his source code.

TheComet

Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 18th Jun 2010 14:50
Okey doke, I am just waiting for the next challenge announcement then.


Coffee coffee coffee coffee coffee coffee cappacino, JAVA!
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 23rd Jun 2010 20:42
I'll try and have a go at the 3D weeble, there are some aspects to it that I think might be interesting.

So what happens now? Shall I declare myself winner and come up with a challenge?
TheComet
16
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 23rd Jun 2010 21:44 Edited at: 23rd Jun 2010 22:45
CHALLENGE ENDED

We have two very nice entries, Latch with his Rubik's cube, and 29 games with his weeble wobble. And my, does that weeble wobble!

Unfortunately, Latch failed to release his code, so the end results are:

Runner up



Winner



Sorry Latch

TheComet

29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 23rd Jun 2010 21:52
Hooray for me! This is the first thing I've won in years!

I have a couple of ideas but I want to check the last few challenges so I don't set anything to simillar and I think someone put in a request for some text based, so I probably do something like that.

I'll come up with something before the weekend.
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 25th Jun 2010 20:08
Ok, I have a challenge.

RPG PLAYER CHARACTER EDITOR

Write a program that allows the user to create a player character for an RGP style game.

The user should be able to: give the character a name, profession, set some base attributes (e.g. strength, charisma) and specialist skill (e.g. horse riding, tracking, computer hacking) , maybe give the character some background / history and some equipment.

I'll mainly be looking for how much depth / detail / personality can be given to the character. I'll also be looking to see if the character has balance within the context of a game (in other words, don't just have a series of input commands where the user can write anything they want and set everything to maximum).

For the interface, I'm not looking for anything too fancy, just as long as it's easy to follow so don't worry if you're no good at GUIs. Pure text based editors are welcome.

Bonus points will be given if the character is tweakable, i.e. the user doesn't have to start from scratch if they want to change something before they save the character.

Extra bonus points will be given if the character can be saved to an external file.

Random character generators are allowed but they must adhere to the rule that the character's generated are balanced and can never be all powerful.

Dealine will be Monday 19th July

I'm hoping that I'm not retreading old ground, I went through the last 3O pages of this thread.

Please feel free to ask me any questions (with regard to this challenge, I'm not a psychiatrist).

Have fun and good luck.
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 25th Jun 2010 20:17 Edited at: 26th Jun 2010 21:03
I might participate in this. When is the deadline?

EDIT: 19 of July? I'm in this.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Jun 2010 19:50
Quote: "I'm hoping that I'm not retreading old ground, I went through the last 3O pages of this thread"


An easier way would be to browse the list of challenges on my website: http://zimnox.com/dbcc


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 26th Jun 2010 22:43
Here's my code so far. I'm getting a Severe Expectation! error right after the program starts, and I'm not sure what's causing it.

jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Jun 2010 23:13
try putting in every other command like



I know it's ugly but it MIGHT let you know WHAT is choking... Adding a "wait for key" bit to keep stepping through the code might help too.

I suspect the font thing

Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 26th Jun 2010 23:19
I know that the problem is occurring in the statcount function, but it could be related to the function being called in the main loop.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 27th Jun 2010 00:36
@Sinani

You used RETURN at the end of the function instead of ENDFUNCTION. Thats whats causing it. Other things I noticed: You should set STATSTR$ to "" at the beginning of the function, otherwise you will get a string overflow (variables retain their values in functions, remember?). Also looks like there is a typo there where you put starstr$ = statstr$ + "@". I assume the first variable should be StatStr$

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 27th Jun 2010 02:16 Edited at: 27th Jun 2010 02:23
Oh, thanks. The code was originally a gosub that the FOR loop was inside. I changed it later on to a function to allow it to work on one stat at a time with the perimeter. I didn't think that variables within functions were static, so I got rid of the statstr$="" when I switched it over.

I didn't notice the typo, either. Thanks for pointing that out. I'm in my Mac right now so I can't test the new code, but I'll make the changes and test it later.

EDIT: Updated code is here: Can someone please test it?



By the way, the reason I have the code at the end with application termination is because I'm learning iPhone development and I'm trying to teach myself to release all objects when the app is closed. DB has automatic garbage collection, but not iPhone!
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 28th Jun 2010 20:38 Edited at: 28th Jun 2010 20:47
That's a really good start Sinani, it's exactly the sort of thing I was hoping for.

If I'm reading your code right, I press "s", say, to edit the strength attribute then have to press "s" again to exit so I can edit another attribute (I appreciate you've yet to add the code for actually updating the screen to show the modified attribute value).

However, when I press "s" for the second time I think program exits then re-enters the "statpick" function using the same attribute letter, in this example "s", so it essentially gets stuck on the same attribute.

I fixed the problem by adding a toggle to the end of the "statpick" function that looks for the key to be released before exiting the function:



I'm not entirely sure how much help I should be giving, seeing as I'm the judge, but I thought seeing as this is currently the only entry I'd lend a hand.

Anyway, keep up the good work and I hope we get some more entries.

@Phaelax
Yup, that would've been easier but never mind.
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 29th Jun 2010 04:16
I hadn't thought of that! My main way to get around that was to put a WAIT command at the end of the function, but checking for no characters is even better. Thanks.

I've made a lot of changes to the code, but I'm not ready to put it out yet. Do you think weapons should be able to give stat bonuses?
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 2nd Jul 2010 00:09
You're welcome.

As to whether weapons should be able to give stat bonuses, it would depend on whether you consider this part of character creation or whether it's part of the wider game mechanic.

My simple answer is yes.

However, I tend to think of such things as game mechanics and the details of how such things work within the game are too numerous to count.

I'm also going to say that I've never programmed an RPG (which is one of the reasons I set this challenge) but I have played and created numerous paper and dice RPGs, and am kind of guessing that the theory is fairly transferrable.

For this challenge, I wouldn't worry about it as I didn't intend people to get bogged down in game mechanics. I think we can all understand that the higher the stat value the better they are. Just the fact that there'll be a selection of weapons will be enough.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 3rd Jul 2010 01:24
oh crap, i just realized I did the wrong challenge! I thought this was for DBP and so I just posted it over there on their challenge thread. Crap!


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 9th Jul 2010 02:20
July 19?

This doesn't sound too hard, maybe I can come up with something.

Enjoy your day.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 10th Jul 2010 18:05 Edited at: 10th Jul 2010 18:06
I might not get to finish this but I'm doing some pixely graphics too.

Customizable beards oooooh

Attachments

Login to view attachments
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th Jul 2010 03:57 Edited at: 12th Jul 2010 22:33
I have to change of bunch of stuff to make mine work in DBC, it won't look nearly as nice.


Btw, if anyone hasn't noticed yet, I've changed the DBCC website and I'm currently in the process of integrating the DBP challenges into it. Any thoughts, opinions, suggestions let me know now while I'm in my development mood.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 16th Jul 2010 22:17
Hey, we're getting some interest. Cool.

If people need some more time we can always extend the deadline by a couple of days. This isn't a school assignment after all and I'd like to see some entries.

New dealine midnight 22nd July

I think any later than that and this could drag on.

If there are no other entries by then, I'll declare Sinani201 the winner as he is the only person with any code, so far.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th Jul 2010 00:29
I think the space invader challenge has ppl pre-occupied. The DBP challenge is just as dead this week.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Lucky 13
16
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 17th Jul 2010 14:34 Edited at: 18th Jul 2010 00:22
I had been working on an entry but it looked as if I wouldn't have enough time to finish it. The deadline may make a difference to that. Thanks.

EDIT: Just a quick question - I've had a quick read through the rules and didn't catch anything about any requirements for an entry's code to have remarks. I just wondered whether people prefer to have them or not? Cheers.
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 19th Jul 2010 02:13
I probably will not be able to finish my entry. I have been very busy this week, and it seems impossible to get the screen to update while in the statpick() function.

@Lucky 13
Remarks are useful for others to read your code. They are not required, but are very useful for others, and possibly yourself.
Lucky 13
16
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 22nd Jul 2010 00:42 Edited at: 22nd Jul 2010 00:44
Cheers, Sinani.

Here's my entry. The whole thing is based on the Sons of Anarchy series, with users able to choose a name, faction (in lieu of a class) and assign 30 stat points across 10 attributes. The program also includes an export feature for exporting to a comma separated text file (.CSV format).

It's a little long-winded as I've gone a little over the top with the remarks. However, I can't lie and say it's fully-functioning either. For some reason, there's a problem when the program is running through the export routine and whether it's because I'm too tired or just not seeing things right but I can't pinpoint why it has a problem when the export does work?




If anyone has any suggestions on fixing this, I'd welcome them.
BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 22nd Jul 2010 00:58
What is the error/problem in detail?

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Lucky 13
16
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 22nd Jul 2010 01:05 Edited at: 22nd Jul 2010 01:06
Sorry, that might have helped.

Runtime Warning at line 273. Cannot open file for writing



It highlights the second line in that snippet. After some testing, it does seem to only cause an error when you amend the stats but will export them to a CSV all the same.
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 22nd Jul 2010 02:32 Edited at: 22nd Jul 2010 02:38
Nice entry Lucky 13.

The various inputs could do with tightening up, for example it was very easy to overshoot when using the arrow keys to scroll up and down the various stats. Using a piece of code like this would sort that out.



In this example, when the player presses the down key the "stat-selected-cursor" will move down to the next stat. However, they will have to release the key and press it again in order to go to the next stat. If they keep their finger on the key then the cursor will not shoot down to the bottom of the list.


The file saving error is rather odd. I've been playing around with it but I can't quite figure it out. I'm not all that familliar with the various string commands or saving data to file but I'll try to have another look before the weekend.

Other than that a good effort.

@Sinani201
I had a play around with your previous post and I can see that when in the "statpick" function you sort of get trapped in it, for want of a better phrase.

Post whatever you have, it'll be good to see how far you got and maybe we can help you out.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Jul 2010 01:59 Edited at: 23rd Jul 2010 05:51
Sneaking this one in there:

[UPDATE]
Fixed a coding problem that based everything on a max value of 100, even if you changed the default maximum for the total of all stats to something else.



The stats are controlled by clicking on the buttons with the mouse. Pessing the space key, starts the creation of a new character. Though I included a space in the array for a picture or an object to be associated with the character, I ran out of time and couldn't include that in this demo.

The consitution and the wisdom control the hitpoints and the magic points. A percentage is calculated and then added. This is a fixed value so as the character develops, it can become important to increse the wisdom and the consitution if you want magic and life to increase at a higher rate as the character levels up.

Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Jul 2010 22:31 Edited at: 23rd Jul 2010 22:37
sorry for the double post but this is separate from my entry

@Lucky 13

I think the problem with your file saving has to do with non character byte codes being written to stat$(0).

The problem comes up with the routine that updates the character's name. Because stat$(0) is updated with a trigger from inkey$(), when a user presses any key whose scancode > 15, that character code is tagged onto the end of stat$(0). That can be the return key, function keys, arrow keys, etc. When your program is running and the user as the arrow at the update character name line, when ENTER is pressed to save the file, not only does the program jump to the save routine, but it adds a carriage return to the character name. Because CSV file data is written using the variable data$ which contains the character's name, the stat data will be written to another line as soon as it reaches the carriage return and will not match up to the headers.

Ultimately an error occurs that the file cannot be created when the filename contains control characters or non ascii characters.

I originally rewrote the save routine to eliminate any non ascii characters from the file name. And since the problem is carried over to the data$ variable, that is not the real solution. The solution is to rewrite your character name entry code. If you want to see the rewritten save file function, I'll post it. But again, the problem is in how you edit the character's name.

Also, in your endgame function, the deleting of the sprites and images is causing some kind of memory problem that eventually leads to a crash. Sprites have always been glitchy in DBC so I'd just drop that routine if I were you. It's not really necessary.

Enjoy your day.
Lucky 13
16
Years of Service
User Offline
Joined: 29th May 2007
Location:
Posted: 25th Jul 2010 00:44 Edited at: 25th Jul 2010 01:08
@29 Games:
Thanks for the advice and feedback. I'll try incorporating that into my code as soon as I get the chance.

@Latch:
Thanks for your advice too, Latch. I've amended the code for entering text so that only the letter keys and number keys will work. This seems to have stabilised the export routine. I'll post a new update once I've run a couple more tests. Thanks again.

EDIT:
Well, here's my complete entry with the cursor keys a little stickier and the export sorted. Thanks again to the both of you for your help.

Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 25th Jul 2010 06:54
Here's my code. I pulled it out of my Dropbox from my Mac so I don't know if it's working or not, but it's the latest version nonetheless. I do, however, know that it's filled with problems; I still haven't worked out how to update the screen while picking stats.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Jul 2010 00:32
Are any of the challenge threads alive anymore?


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke

Login to post a reply

Server time is: 2024-04-18 13:50:45
Your offset time is: 2024-04-18 13:50:45