Game level creators wanted, Run Sodier Dude game testers wanted!
-
Sunday, August 05, 2012 4:01 PM
Import ZXR595
I've been working on this for quite a while with more to go. Stuff like the end game screens and some fine tuning on the graphic images.
Who would like to take on the challenge of creating the play fields for the different levels. Here is an example of the routine that creates the whole playfield (variables pf1, pf2, pf3, pf4, pf5).
Will be showing the author name with the level screen later on to give credit where credit is due! Thanks in advance.
Sub LoadLevel1 pfx = 14 'Playfield position pfy1 = 128 'Playfield line 1 Y position pfy2 = 256 'Playfield line 2 Y position pfy3 = 384 'Playfield line 3 Y position pfy4 = 512 'Playfield line 4 Y position pfy5 = 640 'Playfield line 5 Y position, the ground pfw = 100 'Playfield width -- not used yet '-----------------------------------------------------------------------------------------------Platforms Array '--------------------------These arrays correspond with 5 different levels of platforms and objects on the play field -- pf1 = "18=1", pf1 is the top row of platforms '--------------------------The first number represents the position from the left on the playfield -- pf1 = "18=1", 18 is the playfield position '--------------------------The second number represents the object on that position -- pf1 = "18=1", 1 is the brown bricks '--------------------------These are all 5 blocks wide These are 1 block wide These are 2 blocks wide '--------------------------bricks[1-9] are brown bricks star[51-59] are blue stars icon[101] is the sign pointing right '--------------------------bricks[11-19] are blue bricks star[61-69] are red stars icon[102] is the sign pointing left '--------------------------bricks[21-29] are green bricks spike[81-89] are green spikes '--------------------------bricks[31-39] are red bricks spike[91-99] are red spikes '--------------------------ground[41-49] are ground images icon[119] door to next level '--------------------------The screen will show 25 blocks of the playfield and calculate 30 to push objects off the screen '--------------------------Issues: do not let the same object show up twice on the screen it will blink, that's why there are 9 images, to avoid repeats '--------------------------I chose this method of defining the whole array in one statement versus defining a whole lot of individual variables of the same array pf1 = "6=5;18=1;20=65;21=71;23=2;25=66;28=3;30=67;31=72;33=4;35=68;48=11;53=12;75=8;76=71;77=72;78=73;90=9" pf2 = "2=33;38=31;39=61;40=62;41=63;42=64;43=32;75=18;76=57;77=58;78=59;85=19;86=97;87=98;88=99" pf3 = "6=23;28=21;30=82;31=83;32=84;33=22;73=28;84=29;85=68;86=79;87=69" pf4 = "2=11;18=18;19=55;20=56;23=19;25=57;26=58;27=59;79=39" pf5 = "0=41;1=101;5=42;10=43;15=44;20=45;21=91;22=92;23=93;24=94;25=46;30=47;35=48;40=41;45=42;50=43;55=44;56=51;57=52;58=53;59=54;60=45;65=46;70=47;75=48;85=43;90=44;91=119;95=45;100=46;102=102" EndSub
All Replies
-
Sunday, August 05, 2012 11:32 PMAnswereri gonna need a better explanation.
Zock77
-
Monday, August 06, 2012 12:57 AM
Let's see if this makes sense;
The playfield is created from these 5 arrays; pf1, pf2, pf3, pf4, and pf5. These arrays hold the positions of the brick platforms, stars, hearts, and spikes. pf1 is displayed across the top row of platforms on the playfield, pf2 for the second row, pf3 for the third row, pf4 for the forth row, and pf5 for the bottom row (the ground).
In each of the arrays we get to define things like this pf1 = "position=graphic;position=graphic;ect;ect...". The position is a number from the left of the playfield and the graphic is a set of bricks, stars, spikes, hearts.
The arrays will start at position 0 and go up to position 100 right now but should go to 400 or 500 for longer levels. As the game is played the display will show a portion of the arrays 25 positions wide at a time. When your level starts the screen shows positions 0 - 25 and pfx=14 sets the man a little after the beginning and scrolls left or right, allways showing a 25 position window of the array.
There are multiple copies of the graphics so a bunch can be shown on the screen without blinking. Do not position the same graphic within 30 positions of themselves to avoid the blinking. If you do notice a graphic blinking then try to change to a different graphic number of that bunch.
So you can set up bricks in 5 position gaps to make a long platform, or set the bricks 9 positions apart for a jump the Solidier Dude can barely make, then set stars, hearts, and spikes on the 4 positions after the brick and it will appear on top of that brick platform.
In the code you will see the Sub LoadLevel1 on line 377, this is where you can alter these arrays and see how it looks when you play level 1.
Don't hesitate to ask more, I could use the help on this to come up with something that is challenging to the player.
- Edited by JKrueg Monday, August 06, 2012 1:00 AM
- Edited by JKrueg Monday, August 06, 2012 1:07 AM
- Edited by JKrueg Monday, August 06, 2012 1:08 AM
- Edited by JKrueg Monday, August 06, 2012 1:53 AM
- Edited by JKrueg Monday, August 06, 2012 3:11 AM
- Edited by JKrueg Monday, August 06, 2012 3:12 AM
- Edited by JKrueg Monday, August 06, 2012 3:15 AM
- Edited by JKrueg Monday, August 06, 2012 3:16 AM
- Edited by JKrueg Monday, August 06, 2012 3:18 AM
- Edited by JKrueg Monday, August 06, 2012 3:19 AM
-
Monday, August 06, 2012 4:55 PMAnswererI'll try and make a level creator to make it simpler.
Zock77
-
Monday, August 06, 2012 11:29 PMIs the position the X coordinate?
-
Monday, August 06, 2012 11:31 PMAnswererSorry, wrong account.
Zock77
- Edited by Zock77Editor Tuesday, August 07, 2012 12:46 AM
-
Tuesday, August 07, 2012 12:48 AMAnswerer
Why does this not work??
pf2 = "5=40;10=40;15=40;20=40;30=40;40=40;7=50;8=60;9=70"
Zock77
-
Tuesday, August 07, 2012 1:48 AM
Three things to consider. 1-Keep the positions in order for the array to be read correctly. 2-Don't repeat the same graphic number within 30 positions of each other, it causes blinking when one graphic is trying to be drawn at two places on the screen at the same time. 3-Don't use graphic numbers ending in zero, check out the comments just above these arrays, it shows what's available.
try something like this
pf2 = "5=31;10=32;15=33;20=34;30=35;40=36;45=21;50=31"
I did not define any graphics ending in zero just to make it easier to code. It's easier to see it in my head for all the if then statements. i.e.
If pf2[5] > 30 and pf2[5]< 40 Then
draw a red brick platform ''''''''''''''''at position 5
EndIf
If pf2[45] > 20 and pf2[45]< 30 Then
draw a green brick platform ''''''''''''''''at position 45
EndIf
This puts a star at position 7
pf2 = "5=31;7=51;10=32;15=33;20=34;30=35;40=36;45=21;50=31"
how about a green spike on position 12
pf2 = "5=31;7=51;10=32;12=81;15=33;20=34;30=35;40=36;45=21;50=31"
-
Tuesday, August 07, 2012 1:54 AM
I'll try and make a level creator to make it simpler.
Zock77
A level creator would be awesome! I havn't figured out how to pick the multiple graphics, then drag to the playfield, then scroll back and forth, it's making my brain crash. I'm gonna try to finish the game first. Let me know how it goes! -
Tuesday, August 07, 2012 1:05 PM
Here is a newer version with a health bar, lives graphic, I set up the levels a little different so I could jam though them for testing the game over stuff, still needs work. Added sounds but the piano notes from Sound.PlayMusic is all that seems to work fast enough. Let me know if it's too much!
Import SCJ386
Hope you like it!
-
Tuesday, August 07, 2012 2:57 PMAnswererI love It!! I'm getting close with the level creator. I'll keep updates posted here.
Zock77
-
Tuesday, August 07, 2012 5:06 PMAnswererPhooey. the computer just ate my level creator so it may rake a bit longer.
Zock77
-
Tuesday, August 07, 2012 8:57 PMAnswerer
import here is My starting. TRZ734
It works pretty well.
Zock77
-
Wednesday, August 08, 2012 11:19 PMAnswererStill there?
Zock77
-
Wednesday, August 08, 2012 11:28 PMAnswererCheck this out. wlm527
Zock77
-
Thursday, August 09, 2012 12:55 PMI'm still here, been way to busy! Haven't had a chance to check out the code but look forward to it. Right now I gotta get to work, will try to check it out tonight.
-
Thursday, August 09, 2012 5:14 PMHi, JKrueg! I just played your game, and I love it! I am not amazing at small basic, but if there is any way I can help please let me know. :)
-
Thursday, August 09, 2012 7:15 PMAnswerer
Would you mind helping me with my level creator?
GraphicsWindow.BrushColor = "Black"
GraphicsWindow.Width = 800
GraphicsWindow.Height = 672
GraphicsWindow.Top = 5
GraphicsWindow.Left = 20
GraphicsWindow.DrawText(370,50,"Right click to save")
GraphicsWindow.MouseMove = MouseMove
GraphicsWindow.MouseDown = MouseDown
GraphicsWindow.Title = "Level Creator For ''RUN little Soldier Dude, RUN!'' By Krueg. Made By Zock77."
Controls.ButtonClicked = ButtonClicked
path = "http://krueg.com/sb/soldier/"
img1 = ImageList.LoadImage(path + "5brickred.png")
img2 = ImageList.LoadImage(path + "5ground.png")
img3 = ImageList.LoadImage(path + "signright.png")
img4 = ImageList.LoadImage(path + "arch.png")
img5 = ImageList.LoadImage(path + "starblue.png")
img6 = ImageList.LoadImage(path + "signleft.png")
BrickRed = Controls.AddButton("Add Red Brick",10,10)
BrickRedCount = 31
GroundBrick = Controls.AddButton("Add Ground Brick",120,10)
GroundBrickCount = 41
Rightarrow = Controls.AddButton("Add Right Arrow",250,10)
Arrowcount = 101
Nextlevdoor = Controls.AddButton("Add Door",375,10)
doorcount = 119
StarBlue = Controls.AddButton("Add Blue star",460,10)
BlueStarCount = 51
LeftArrow = Controls.AddButton("Add Left Arrow",570,10)
ArrowcountLeft = 102
'--------------------------bricks[1-9] are brown bricks star[51-59] are blue stars icon[101] is the sign pointing right
'--------------------------bricks[11-19] are blue bricks star[61-69] are red stars icon[102] is the sign pointing left
'--------------------------bricks[21-29] are green bricks spike[81-89] are green spikes
'--------------------------bricks[31-39] are red bricks spike[91-99] are red spikes icon[118] 1up icon
'--------------------------ground[41-49] are ground images icon[119] door to next level
Sub ButtonClicked
If Controls.LastClickedButton = BrickRed Then
If BrickRedCount <= 39 Then
Count = BrickRedCount
BrickRedCount = BrickRedCount + 1
Objectmove = Shapes.AddImage(img1)
Type = "Brick"
EndIf
EndIf
If Controls.LastClickedButton = GroundBrick Then
If GroundBrickCount <= 49 Then
Count = GroundBrickCount
GroundBrickCount = GroundBrickCount + 1
Objectmove = Shapes.AddImage(img2)
Type = "Brick"
EndIf
EndIf
If Controls.LastClickedButton = Rightarrow Then
If Arrowcount = 101 Then
Objectmove = Shapes.AddImage(img3)
Type = "Object"
Count = Arrowcount
Arrowcount = Arrowcount + 1
EndIf
EndIf
If Controls.LastClickedButton = Nextlevdoor Then
If Doorcount = 119 Then
Objectmove = Shapes.AddImage(img4)
Type = "Door"
Count = Doorcount
Doorcount = Doorcount + 1
EndIf
EndIf
If Controls.LastClickedButton = StarBlue Then
If BlueStarCount <= 59 Then
Objectmove = Shapes.AddImage(img5)
Type = "Object"
Count = BlueStarCount
BlueStarCount = BlueStarCount + 1
EndIf
EndIf
If Controls.LastClickedButton = Leftarrow Then
If ArrowcountLeft = 102 Then
Objectmove = Shapes.AddImage(img6)
Type = "Object"
Count = ArrowcountLeft
ArrowcountLeft = ArrowcountLeft + 1
EndIf
EndIf
EndSub
Sub MouseMove
If Type = "Brick" Then
MouseXRounded = Math.Round(GraphicsWindow.MouseX / 5) * 5
MouseYRounded = (Math.Round(GraphicsWindow.MouseY / 134.4) * 134.4) - 32
ElseIf Type = "Object" Then
MouseXRounded = Math.Round(GraphicsWindow.MouseX / 5) * 5
MouseYRounded = (Math.Round(GraphicsWindow.MouseY / 134.4) * 134.4) - 64
EndIf
If Type = "Door" Then
MouseXRounded = Math.Round(GraphicsWindow.MouseX / 5) * 5
MouseYRounded = (Math.Round(GraphicsWindow.MouseY / 134.4) * 134.4) - 130
EndIf
Shapes.Move(Objectmove,MouseXRounded,MouseYRounded)
EndSub
Sub MouseDown
Objectmove = ""
LevelX = Math.Round(Math.Round(GraphicsWindow.MouseX / 5) / 6.4)
Level = Math.Ceiling(MouseYRounded / 134.4)
If Level = 1 Then
pf1 = pf1 + LevelX + "=" + Count + ";"
EndIf
If Level = 2 Then
pf2 = pf2 + LevelX + "=" + Count + ";"
EndIf
If Level = 3 Then
pf3 = pf3 + LevelX + "=" + Count + ";"
EndIf
If Level = 4 Then
pf4 = pf4 + LevelX + "=" + Count + ";"
EndIf
If Level = 5 Then
pf5 = pf5 + LevelX + "=" + Count + ";"
EndIf
If Mouse.IsRightButtonDown = "True" Then
TextWindow.WriteLine("pf1 = " + pf1)
TextWindow.WriteLine("pf2 = " + pf2)
TextWindow.WriteLine("pf3 = " + pf3)
TextWindow.WriteLine("pf4 = " + pf4)
TextWindow.WriteLine("pf5 = " + pf5)
ask:
TextWindow.Write("Enter Your save Directory: ")
Directory = TextWindow.Read()
' The following line could be harmful and has been automatically commented.
File.CreateDirectory(Directory)
' The following line could be harmful and has been automatically commented.
Files = File.GetFiles(Directory)
If Files = "" Then
TextWindow.WriteLine("There are no .txt files in this directory, Please try again")
Goto ask
EndIf
TextWindow.WriteLine("These are the files in this directory.")
TextWindow.WriteLine(" -- ")
TextWindow.WriteLine(Files)
TextWindow.WriteLine(" -- ")
TextWindow.WriteLine("Enter your txt name")
Name = TextWindow.Read()
' The following line could be harmful and has been automatically commented.
File.WriteLine(Directory + "/" + Name,1,"pf1 = " + pf1)
' The following line could be harmful and has been automatically commented.
File.WriteLine(Directory + "/" + Name,2,"pf2 = " + pf2)
' The following line could be harmful and has been automatically commented.
File.WriteLine(Directory + "/" + Name,3"pf3 = " + pf3)
' The following line could be harmful and has been automatically commented.
File.WriteLine(Directory + "/" + Name,4,"Pf4 = " + pf4)
' The following line could be harmful and has been automatically commented.
File.WriteLine(Directory + "/" + Name,5,"pf5 = " + pf5)
For ii = 1 To 3
Loading = "Loading"
For ii = 1 To 3
Program.Delay(200)
Loading = Loading + "."
TextWindow.Clear()
TextWindow.WriteLine(Loading)
EndFor
EndFor
TextWindow.WriteLine("Done")
EndIf
EndSub
Zock77
-
Thursday, August 09, 2012 11:33 PMWhat is it you need help with... I haven't used arrays much. :(
-
Friday, August 10, 2012 1:05 AM
Hi Noah, I'm looking for help in creating challenging levels.
If you have imported SCJ386 then take a look at line 437.
pf4 = "2=11;18=18;19=55;20=56;23=19;25=57;26=58;27=59;79=39"
This is the whole array for pf4, this defines the objects for the first line above the ground as your playing the game. I describe the position and graphic relationship up above in this thread. So here position 2=11 (blue bricks); 18=18 (blue bricks); 19=55 (blue star); ect, ect...
Play with the numbers here, comments on lines 421-433 show the graphics available, then run the game to see the changes you've made.
pf5 is the ground, I have provided the ground on all the levels just to get started. I would play with pf1, pf2, pf3, and pf4 just to get the hang of it. If you like what you have done be sure to save you progress and publish a copy so we can play!
-
Friday, August 10, 2012 1:31 AM
Hey Zock, had to check this out as soon as I got home. It is a very cool start, I would load up the background just for a nicer look.
In your placing of the graphics, it looks like it rounds to every 5 pixels, change this to 32. The layout of the playfield is like a grid of 5 lines top to bottom of the screen (the 5 arrays pf1-pf5) with 32 pixel wide blocks, left to right. The positioning in the array assumes this 32 pixel width when processed in the game. A little side note, when playing, this playfield scrolls 2 pixels at a time while the objects from the playfield array are still 32 pixel wide blocks.
That's the easy stuff, it gets harder to figure a way to scroll down the playfield keeping track of the position while adding objects. This positioning has to be saved in order, for the array to work properly. We also need to load all the objects and place them so they don't blink when played later. I might add more graphics as well, I have a "1up" I added to the latest version, it loads but not used in the game yet.
It's a lot to do, so do one step at a time and get it right before moving on, it makes my brain slow way down trying to think of it all. Take it a piece at a time and...
Thanks for the effort, this is gonna be sweet!
- Edited by JKrueg Friday, August 10, 2012 1:34 AM
-
Friday, August 10, 2012 1:39 AMAnswererOK I will try.
Zock77
-
Friday, August 10, 2012 3:12 PMOK... I finally got the hang of how the arrays work. What "Makes a Challenging Level"?
-
Friday, August 10, 2012 6:02 PMI ran into a bug in the game that after level 1 you spawn right at the door. Easy fix?
-
Friday, August 10, 2012 11:47 PMNot a bug, I was testing to make the game go through the levels quickly so I can work on the game over sequence, still in progress. You can specify the start location on the playfield with the variable pfx = at the begining of each of the levels subroutine. You could move the door also and run through the playfield backwards. Make pfx = 13 to start half a screen from the left of the playfield.
-
Saturday, August 11, 2012 2:56 AMGotcha. I still have to find some time to create some levels... Attempting to learn C# for fun. :)
- Edited by Noah Buscher Saturday, August 11, 2012 2:57 AM
-
Saturday, August 11, 2012 4:30 AM
Worked out the 1up icon placement in the game and made graphics to take up to 5 lives.
Import NKN803
It's not much but if your gonna make a level...
-
Saturday, August 11, 2012 4:31 AM
Gotcha. I still have to find some time to create some levels... Attempting to learn C# for fun. :)
Let me know if you find a good tutorial for C#.
- Edited by JKrueg Saturday, August 11, 2012 4:31 AM
-
Saturday, August 11, 2012 3:30 PMAnswerer
Here is the updated version of the level creator. I still don't have all the objects in. GXX169
You can change sections by clicking the button. (only ver. .01)
Zock77
- Edited by Zock77Editor Saturday, August 11, 2012 3:33 PM
-
Saturday, August 11, 2012 5:26 PM
I am just using the small tutorial that takes you through the process of creating a newbie picture viewing program in Visual C#.
Do you have any suggestions? I really want to make some extentions.
#learningc
-
Saturday, August 11, 2012 5:26 PMHey, I know this thread is for Soldier Dude, but do you have any pointers on my Picnic Level Creator?
-
Saturday, August 11, 2012 6:07 PMAnswererIs there any way you can upload the txt so we can play it?
Zock77
-
Saturday, August 11, 2012 6:13 PMAnswerer
Hey Kjrueg.
what is the number code for hearts? it is not commented. Also, you should make bots that walk around so you have to stomp them.
Zock77
- Edited by Zock77Editor Saturday, August 11, 2012 6:15 PM
-
Saturday, August 11, 2012 8:39 PMSorry for the late reply, the download is in the "Improving a Picnic..." thread. :)
-
Saturday, August 11, 2012 9:41 PM
Hey Kjrueg.
what is the number code for hearts? it is not commented. Also, you should make bots that walk around so you have to stomp them.
Zock77
Oops, hearts are 71-79, here's the updated code FGJ739.
I thought of enemies of some kind but will wait to see if longer levels arrays slows things down first. I don't think I can add too much more without effecting the game speed.
-
Saturday, August 11, 2012 9:57 PM
I am just using the small tutorial that takes you through the process of creating a newbie picture viewing program in Visual C#.
Do you have any suggestions? I really want to make some extentions.
#learningc
I don't have any extentions loaded, I don't know any other languages either. I am interested in java just because it is cross platform and can compile to android devices but I haven't been able to put enough time into learning another language. Sorry no suggestions.
My experience if from 25 years ago on a radio shack color computer I picked up at a garage sale. All it did was basic and I made a few games back then. There was no internet, you dialed up to bulletin board services on a 300 baud modem. There was no mp3 or png, no sprites, not even windows was out back then, no mouse. It was all text based operating systems. Have had computers ever since but no time coding.
For me small basic is a massive improvement from what I know and was very easy to learn. I wish I had more time to learn everything.
- Edited by JKrueg Saturday, August 11, 2012 10:01 PM
-
Saturday, August 11, 2012 11:46 PMAnswererI'm almost done.
Zock77
-
Sunday, August 12, 2012 1:30 AMAnswererRGW412 Here is ver .02 (uncomment the file.)
Zock77
-
Sunday, August 12, 2012 2:28 AMAnswerer
I found some glitches.
#1. you can not get a star (Or get hit by a spike) while its in the air. is there a remedy?
#2. you can't put a door or arrows on anything but the bottom level.
Also, I was wondering if you would make a easy way to change the background per level.
Thanks!
Zock77
- Edited by Zock77Editor Sunday, August 12, 2012 2:30 AM
-
Sunday, August 12, 2012 2:55 AM
I found some glitches.
#1. you can not get a star (Or get hit by a spike) while its in the air. is there a remedy?
#2. you can't put a door or arrows on anything but the bottom level.
Also, I was wondering if you would make a easy way to change the background per level.
Thanks!
Zock77
Yea, that's part of the coding to keep things as fast as possible. The program only checks against obstacles after he lands.
Arrows, doors, ground, and 1up only on the bottom level

