Tag Archive for Code

That Chance That We Have No Website….

Update: Thankfully this is now redundant! 

So next week is the Qantm Student Gallery!!
(http://qantm2012.wordpress.com/)
We’re showing off our new game, Cubic Capitalist Conundrum. A new folio style website is on the way to DaijoubuGames.com which is where the games gallery page links to, but what with living in a capitalist society and all that, we need money to make that happen, which won’t be until Monday. Depending on how long it takes the universe to update, there’s a chance you’ll be popped through to here while the website goes up. So it the mean time, feel free to have a flick through the previous months work and mash F5 on DaijoubuGames.com until a website appears!

Game Tech Demo from one of our Programming Students

It makes me giggle to no end.

Holiday To-Do List

We’re done for the year at Uni! I thought it would be an idea to do a list of everything I want to accomplish (or at least try my hand at) over the break. Next week we have a hilarious meeting over some design choices (or at least that’s what they’re telling us) we made for our GTA in a Week project, the college wasn’t super thrilled that at one point you can pick up hookers in the game, but we’re almost certain that’s not what its about. We’ll see how that goes.

So in the mean time waiting for that meeting, here’s what I plan to do on the break and why.

-Read up on architectural design theory, particularly looking at commercial retailers and how they push customers around.
Why: We had a project this tri to design a level which we tried to build as an open world. We wanted to not have in any arbitrary barriers to path the player, but we had an order of how the path needed to play out, and objectives that the player needed to hit. We tried a whole bunch of interesting cool stuff, how we used lighting in the level to high light paths and then upon hitting objectives, gave the player information that would allow them to disregard the information of light paths. However, while it got the results we wanted, it wasn’t consistent or constant. For a lot of players this whole system was invisible to them. There needs to be better ways to do this.

-Learn how to build games in data, not the renderer.
Why: So much of what I’ve done this tri worked solely in the renderer with game objects. Even stuff like GTA in a Week and Portal in a Week was all about objects hitting other objects. This is a terrible system, performance impact is huge, it’s unreliable especially for a consistent results, and it’s inaccurate. I first learned this with a tower building game that relied on collisions, you needed to be able to neatly slot blocks into gaps and around each other. All it took was a slight error for the block to not slot in. Instead what needs to happen is a way of tracking these blocks inside data, the visual representation should just be UI. That way there is absolute yes or no as to whether a block is going to slot in. In something like GTA, this expands out to everything from traffic, to mission markers, pedestrians, whatever. Having a reliable system for all of that is an exciting thought.

-Prototype ‘Jump Pursuit’
Why: One thing I forever love in GTA4 is running, jumping over fences, and using the environment in interesting ways to get away from police without ever using a car. Along with that, games like Crackdown and Prototype seem to miss a huge opportunity in that (at least from memory) so much of the game play is getting to the objective point and beating the shit out everyone. I’d like to do something that uses those super hero environment navigation as part of objectives rather than just how you get to them. Police pursuit is the angle I’m tackling this from. Our GTA in a Week project has helped a lot in how we can de-link player action to reaction, in the sense of things not happening the moment player meets the conditions for the event, and instead letting things unfold in an aesthetically pleasing way.

-Make the Tower Building game from earlier this year as a proper game.
Why: The prototype itself didn’t work right but what did work proved manically fun. I’d like to do this Sim Tower meets Tetris game up in Unity, perhaps ship it. If nothing else this would link in to learning how to work in data.

-Research MDA Design
Why: Mechanics, Dynamics, Aesthetics. Wiki stuff here.  This is new-ish stuff which on the surface has made a lot of sense for me as far as how I like to design my games and what I like the gameplay outcomes to be about. I’m not going to comment beyond that because honestly at this point I don’t know enough, but often I will be trying to achieve a specific emotional aesthetic through the gameplay. Most of my favourite games are ones that, no matter how intentional or unintentional, do the same. Dead Rising is a good example, its rule set is really pretty straight forward, but it’s the dynamics that come out of it that lead to this pressure filled panicky emotional aesthetic. That’s very cool.

-Learn Some C++
Why: Mostly I’ll be in C# over the break but it’s C# in Unity, which tripped me up when going to something that wasn’t Unity, or anything for that matter. I have no idea about classes or pointers or anything like that, but I’d like to know.

 -Learn some useful design art stuff
Why: I don’t even know what this really means but I have to do a drawing subject over the break. I’m still not super interested in drawing for drawings sake, but something I’ve found quite useful is being able to quickly sketch out an idea and pass it to someone who can actually do something useful with it. I want to get better at that, what makes or breaks that sort of thing as a tool rather than an art.

Okay cool, that should fill up two months nicely. Wheee!

Portal in DarkBasic in a Week! (with Multiplayer, lol)


Dontcha just love a good gamble? This is the latest results of our rapid “prototyping” class, Valve’s Portal loosely remade in DarkBasic, totally not my choice of game engine. Prototyping is in quotes mainly because I wouldn’t really call this a game prototype, more an little adventure to see if we could pull it off, and it turns out we can!
The majority of the code work was done by Andrew Kite and myself, him working on the networked gameplay while I got together the core mechanics. Chris (from the earlier prototype FlipIt) also jumped in to throw together a proof of mechanics level, and Rhys Knight and Adem Turedi covered the art side of things.

Find below the complete source for the project. You will need to strip out code lines relating to image and audio data before it will compile. This is just to play it safe with legals and all that. I’m hoping this will come in handy for anyone needing a first person camera systems, shooting, multiplayer systems, or (funnily enough) Portals. It’s also worth saying that a lot of the core gameplay was built on the ideas that Ruccus had in his Darkbasic FPS tutorial (which despite what the post says still works pretty well). If you wanted to look into more shootery based stuff, I recommend you take a look at that.

And without further ado, source code!!

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
Rem Project: Holes
Rem Created: 11/8/2011 4:01:01 PM
Rem Project: Holes
Rem Created: 11/8/2011 1:44:06 PM

Rem ***** Main Source File *****
Sync On
Sync Rate 30
Hide Mouse
Set Display Mode 1024,768,32
Set Window Off

`Set Variables
global State_Menu = 1
global State_Multiplayer = 2
global Player1=1
global Player2=2
global Portal1=3
global Portal2=4
global PortalView1=5
global PortalView2=6
global Bullet1=7
global Bullet2=8
global Ground=500
global CamX# = 0
global CamY# = 0
global X# = 0
global Y# = 0
global Z# = 0

global Portal2X=0
global Portal2Y=-15
global Portal2Z=44
global Portal2RotationX=0
global Portal2RotationY=180
global Portal2RotationZ=0

global IsFalling = 1

global sendMessageDelay = 0

`Player Creation
Make Object box Player1,3,9,3
Color Object Player1,RGB(000,255,000)
make camera 10
position camera 10,0,0,0
Position Object Player1, 990, 1000, 1000

Make Object Box Player2,3,9,3
Color Object Player2,RGB(255,000,000)
Position Object Player2,10,0,0

`Portals
MAKE OBJECT plain Portal1,10,10
Color Object Portal1,RGB(255,0,200)
make camera 11
position camera 11,1000,5000,1000
Position Object Portal1,-1000,-1000,-1000

MAKE OBJECT plain Portal2,10,10
Color Object Portal2,RGB(255,0,200)
make camera 12
position camera 12,1000,5000,1000
Position Object Portal2,-1000,-1000,-1000

`Bullets
Make Object Sphere Bullet1,2
Position Object Bullet1,-1000,-1000,-1000
SET OBJECT EMISSIVE Bullet1, RGB(0,0,255)
ghost object on bullet1
Make Object Sphere Bullet2,2
Position Object Bullet2,-1000,-1000,-1000
SET OBJECT EMISSIVE Bullet2, RGB(255,0,0)

`1st Floor
 `ground
Make Object Box 500, 25, 5, 125
 Position Object 500, 1000, 975, 1000
 Color Object 500, rgb(255,0,0)
 `roof
 Make Object Box 624, 25, 5, 100
 Position Object 624, 1000, 995, 987.5
 Color Object 624, rgb(255,255,0)
 `front wall
 Make Object Box 1000, 25, 50, 5
 Position Object 1000, 1000, 997.5, 1065
 Color Object 1000, rgb(0,255,0)
 `back wall
 Make Object Box 1125, 25, 25, 5
 Position Object 1125, 1000, 985, 935
 Color Object 1125, rgb(0,0,255)
 `left wall
 Make Object Box 750, 5, 25, 135
 Position Object 750, 985, 985, 1000
 Color Object 750, rgb(255,255,255)
 `right wall
 Make Object Box 875, 5, 25, 135
 Position Object 875, 1015, 985, 1000
 Color Object 875, rgb(0,0,0)

`second floor
 `ground
 Make Object Box 501, 25, 5, 25
 Position Object 501, 1000, 1025, 1075
 Color Object 501, rgb(255,0,0)
 `roof
 Make Object Box 625, 25, 5, 25
 Position Object 625, 1000, 1050, 1075
 Color Object 625, rgb(255,255,0)
 `front wall
 Make Object Box 1001, 25, 30, 5
 Position Object 1001, 1000, 1037.5, 1090
 Color Object 1001, rgb(0,255,0)
 `back wall (between levels 2 & 3)
 Make Object Box 1126, 25, 75, 5
 Position Object 1126, 1000, 1035, 1035
 Color Object 1126, rgb(0,0,255)
 `left wall (tall wall)
 Make Object Box 751, 5, 110, 35
 Position Object 751, 985, 1052.5, 1050
 Color Object 751, rgb(255,255,255)
 `right wall (tall wall)
 Make Object Box 876, 5, 110, 35
 Position Object 876, 1015, 1052.5, 1050
 Color Object 876, rgb(0,0,0)
 `left wall (small wall)
 Make Object Box 752, 5, 30, 25
 Position Object 752, 985, 1037.5, 1080
 Color Object 752, rgb(255,255,255)
 `right wall (small wall)
 Make Object Box 877, 5, 30, 25
 Position Object 877, 1015, 1037.5, 1080
 Color Object 877, rgb(0,0,0)

`third floor
 `floor part1
 Make Object Box 502, 25, 5, 50
 Position Object 502, 1000, 1075, 1012.5
 Color Object 502, rgb(255,0,0)
 `roof
 Make Object Box 626, 25, 5, 80
 Position Object 626, 1000, 1105, 1027.5
 Color Object 626, rgb(255,255,0)
 `front wall
 Make Object Box 1002, 25, 50, 5
 Position Object 1002, 1000, 1077.5, 1065
 Color Object 1002, rgb(0,255,0)
 `left wall (tall wall)
 Make Object Box 753, 5, 35, 40
 Position Object 753, 985, 1090, 1012.5
 Color Object 753, rgb(255,255,255)
 `right wall (tall wall)
 Make Object Box 878, 5, 35, 40
 Position Object 878, 1015, 1090, 1012.5
 Color Object 878, rgb(0,0,0)

`play room
 `floor
Make Object Box 503, 100, 5, 100
 Position Object 503, 1000, 1075, 937.5
 Color Object 503, rgb(255,0,0)
 `roof
 Make Object Box 627, 100, 5, 80
 Position Object 627, 1000, 1150, 947.5
 Color Object 627, rgb(255,255,0)
 `roof left
 Make Object Box 628, 37.5, 5, 20
 Position Object 628, 968.75, 1150, 897.5
 Color Object 628, rgb(255,255,0)
 `roof right
 Make Object Box 629, 37.5, 5, 20
 Position Object 629, 1031.25, 1150, 897.5
 Color Object 629, rgb(255,255,0)
 `front wall (middle)
 Make Object Box 1003, 25, 45, 5
 Position Object 1003, 1000, 1130, 990
 Color Object 1003, rgb(0,255,0)
 `front wall (left side)
 Make Object Box 1004, 37.5, 80, 5
 Position Object 1004, 1031, 1112.5, 990
 Color Object 1004, rgb(0,255,0)
 `front wall (right side)
 Make Object Box 1005, 37.5, 80, 5
 Position Object 1005, 969, 1112.5, 990
 Color Object 1005, rgb(0,255,0)
 `back wall
 Make Object Box 1127, 100, 80, 5
 Position Object 1127, 1000, 1112.5, 885
 Color Object 1127, rgb(0,0,255)
 `platform top
 Make Object Box 504, 25, 2.5, 50
 Position Object 504, 1000, 1130, 912
 Color Object 504, rgb(255,0,0)
 `platform bottom
 Make Object Box 630, 25, 2.5, 50
 Position Object 630, 1000, 1127.5, 912
 Color Object 629, rgb(255,255,0)
 `platform left wall inner
 Make Object Box 754, 2.5, 21.30, 50
 Position Object 754, 986.5, 1136.90, 912.5
 Color Object 754, rgb(255,255,255)
 `platform left wall outer
 Make Object Box 879, 2.5, 21.30, 50
 Position Object 879, 983.75, 1136.90, 912.5
 Color Object 879, rgb(0,0,0)
 `platform right wall inner
 Make Object Box 880, 2.5, 21.30, 50
 Position Object 880, 1016.25, 1136.90, 912.5
 Color Object 880, rgb(0,0,0)
 `platform right wall outer
 Make Object Box 755, 2.5, 21.30, 50
 Position Object 755, 1013.75, 1136.90, 912.5
 Color Object 755, rgb(255,255,255)
 `left wall (room wall)
 Make Object Box 758, 5, 77.5, 110
 Position Object 758, 947.5, 1113.75, 937.5
 Color Object 758, rgb(255,255,255)
 `right wall (room wall)
 Make Object Box 883, 5, 77.5, 110
 Position Object 883, 1052.5, 1113.75, 937.5
 Color Object 883, rgb(0,0,0)

`pipe
 `back wall (leads to final room
 Make Object Box 1128, 25, 60, 5
 Position Object 1128, 1000, 1182.5, 885
 Color Object 1128, rgb(0,0,255)
 `front wall
 Make Object Box 1006, 25, 30, 5
 Position Object 1006, 1000, 1167.5, 910
 Color Object 1006, rgb(0,255,0)
 `left wall
 Make Object Box 756, 5, 30, 30
 Position Object 756, 985, 1167.5, 897.5
 Color Object 756, rgb(255,255,255)
 `right wall
 Make Object Box 881, 5, 30, 30
 Position Object 881, 1015, 1167.5, 897.5
 Color Object 881, rgb(0,0,0)

`final room
 `floor
Make Object Box 505, 25, 5, 50
 Position Object 505, 1000, 1185, 932.5
 Color Object 505, rgb(255,0,0)
 `roof
 Make Object Box 631, 25, 5, 75
 Position Object 631, 1000, 1215, 920
 Color Object 631, rgb(255,255,0)
 `left wall
 Make Object Box 757, 5, 35, 75
 Position Object 757, 985, 1200, 920
 Color Object 757, rgb(255,255,255)
 `right wall
 Make Object Box 882, 5, 35, 75
 Position Object 882, 1015, 1200, 920
 Color Object 882, rgb(0,0,0)

````````TEXTURECODE!``````````````
Load Image "floor.jpg",10
For LevelFloor = 500 to 505
Texture Object LevelFloor,10
Next LevelFloor

Load Image "Roof.jpg",11
For Roof = 624 to 631
Texture Object Roof,11
Next Roof

Load Image "walls.jpg",12
For LeftWall = 750 to 757
Texture Object Leftwall,12
Next Leftwall

For RightWall = 875 to 882
Texture Object Rightwall,12
Next Rightwall

Load Image "Backfrontwalls.jpg",13
For Backwall = 1125 to 1128
Texture Object Backwall,13
Next Backwall

For Frontwall = 1000 to 1006
Texture Object Frontwall,13
Next Frontwall

Load Image "fancywall.jpg",15
Texture Object 757,15
Texture Object 882,15
Texture Object 758,15
Texture Object 883,15

Load Music "Music.mp3",56789
Load Sound "Shoot.wav",1
Load Sound "Open.wav",2
Load Sound "Travel.wav",3

```Create special effects
Load Image "Effect.jpg",14
Make Particles 1,14,1,5
ghost particles on 1,50
SET PARTICLE EMISSIONS 1,1

```Create special effects
Load Image "Effect.jpg",14
Make Particles 2,14,1,5
ghost particles on 2,50
SET PARTICLE EMISSIONS 2,1

`Set State
State = State_Multiplayer

do

if State = State_Multiplayer
   if keystate(59) = 1 and net game exists() = 0 `If F1 is pressed
      Multiplayer_Connection()
   endif
	`debug()
   Mechanics()
   Multiplayer()
endif

sync
loop

Function Mechanics()
`````````````````
`MUSIC
````````````````
Loop Music 56789
POSITION PARTICLES 1, object position x(bullet1), object position y(bullet1), object position z(bullet1)
POSITION PARTICLES 2, object position x(bullet2), object position y(bullet2), object position z(bullet2)

`Portal Travel code
If Object Collision (Player1,Portal1)
      Play sound 3
      if object angle y (Portal2)=0
         Position Object Player1,Object Position X(Portal2),Object Position Y(Portal2),(Object Position Z(Portal2)+10)
         `yrotate object player1,0
      endif
      if object angle y (Portal2)=90
         Position Object Player1,(Object Position X(Portal2)+10),Object Position Y(Portal2),Object Position Z(Portal2)
         `yrotate object player1,90
      endif
      if object angle y (Portal2)=180
         Position Object Player1,(Object Position X(Portal2)-10),Object Position Y(Portal2),Object Position Z(Portal2)
         `yrotate object player1,180
      endif
      if object angle y (Portal2)=270
         Position Object Player1,Object Position X(Portal2),Object Position Y(Portal2),(Object Position Z(Portal2)-10)
         `yrotate object player1,260
      endif

         if object angle y (Portal2)=270
         Position Object Player1,Object Position X(Portal2),Object Position Y(Portal2),(Object Position Z(Portal2)-10)
         `yrotate object player1,260
      endif
EndIf

If Object Collision (Player1,Portal2)
      Play sound 3
      if object angle y (Portal1)=0
         Position Object Player1,Object Position X(Portal1),Object Position Y(Portal1),(Object Position Z(Portal1)+10)
         `yrotate object player1,0
      endif
      if object angle y (Portal1)=90
         Position Object Player1,(Object Position X(Portal1)+10),Object Position Y(Portal1),Object Position Z(Portal1)
         `yrotate object player1,90
      endif
      if object angle y (Portal1)=180
         Position Object Player1,(Object Position X(Portal1)-10),Object Position Y(Portal1),Object Position Z(Portal1)
         `yrotate object player1,180
      endif
      if object angle y (Portal1)=270
         Position Object Player1,Object Position X(Portal1),Object Position Y(Portal1),(Object Position Z(Portal1)-10)
         `yrotate object player1,260
      endif
EndIf

`Portal Visuals
SET CAMERA TO IMAGE 11,1,1024,1024,3
texture object portal2,1

SET CAMERA TO IMAGE 12,2,1024,1024,3
texture object portal1,2

`Player Move
If Scancode()=17 then move object player1,1
If Scancode()=31 then move object player1,-1
If Scancode()=30 then move object left player1,1
If Scancode()=32 then move object right player1,1

Move object down (player1),2
For LevelFloor = 500 to 505
IF Object collision (player1,LevelFloor)=1
Move object up (player1),2
ENDIF
Next LevelFloor

`left wall collisons
For LeftWall = 750 to 758
IF Object collision (player1,LeftWall)=1
position object player1,object position x(player1)+1, object position y(player1), object position z(player1)
ENDIF
Next LeftWall

`right wall collisons
For RightWall = 875 to 883
IF Object collision (player1,RightWall)=1
position object player1,object position x(player1)-1, object position y(player1), object position z(player1)
ENDIF
Next RightWall

`back wall collisons
For Backwall = 1125 to 1128
IF Object collision (player1,Backwall)=1
position object player1,object position x(player1), object position y(player1), object position z(player1)+1
ENDIF
Next Backwall

`front wall collisons
For Frontwall = 1000 to 1006
IF Object collision (player1,Frontwall)=1
position object player1,object position x(player1), object position y(player1), object position z(player1)-1
ENDIF
Next Frontwall

`Shooting and Portal Creation
Move object bullet1,2

If Mouseclick()=1
Play Sound 1
Position Object Bullet1,Object Position X(Player1),Object Position Y(Player1),Object Position Z(Player1)
yrotate object Bullet1, CAMY#
xrotate object Bullet1, CAMX#
endif

`Shooting and Portal Creation
Move object bullet2, 2

If Mouseclick()= 2 and net game exists() = 0
Play Sound 1
Position Object Bullet2,Object Position X(Player1),Object Position Y(Player1),Object Position Z(Player1)
yrotate object Bullet2, CAMY#
xrotate object Bullet2, CAMX#
endif

`Roof Portals
For Roof = 624 to 631
If Object Collision (Bullet1,Roof)
Play Sound 2
Position Object Portal1,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)
Position Object Bullet1,-1000,-1000,-1000
Position camera 11,Object Position X(Portal1),Object Position Y(Portal1),Object Position Z(Portal1)
yrotate object Portal1, 90
xrotate object Portal1, 90
zrotate object Portal1, 0
````
yrotate camera 11, 0
xrotate camera 11,90
zrotate camera 11,0
Endif
Next Roof

`Floor Portals
For LevelFloor = 500 to 505
If Object Collision (Bullet1,LevelFloor)
Play Sound 2
Position Object Portal1,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)
Position Object Bullet1,-1000,-1000,-1000
Position camera 11,Object Position X(Portal1),Object Position Y(Portal1),Object Position Z(Portal1)
yrotate object Portal1, 90
zrotate object Portal1, 90
xrotate object Portal1,0
``
yrotate camera 11,90
xrotate camera 11,0
zrotate camera 11,90
Endif
Next LevelFloor

`Left Wall Portlas
For LeftWall = 750 to 758
If Object Collision (Bullet1,LeftWall)
Play Sound 2
Position Object Portal1,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)
yrotate object Portal1, 90
xrotate object Portal1, 0
zrotate object Portal1, 0
Position camera 11,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)

Position Object Bullet1,-1000,-1000,-1000
```
yrotate camera 11, 90
zrotate camera 11, 0
xrotate camera 11, 0
Endif
Next LeftWall

`Right Wall Portals
For RightWall = 875 to 883
If Object Collision (Bullet1,RightWall)
Play Sound 2
Position Object Portal1,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)
yrotate object Portal1, 270
xrotate object Portal1, 0
zrotate object Portal1, 0
Position camera 11,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)
Position Object Bullet1,-1000,-1000,-1000

````
yrotate camera 11, 270
zrotate camera 11, 0
xrotate camera 11, 0
Endif
Next RightWall

`Forward Wall Portals
For Frontwall = 1000 to 1006
If Object Collision (Bullet1,FrontWall)
Play Sound 2
Position Object Portal1,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)
yrotate object Portal1, 180
xrotate object Portal1, 0
zrotate object Portal1, 0
Position camera 11,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)
````````````````````
yrotate camera 11, 180
zrotate camera 11, 0
xrotate camera 11, 0
Position Object Bullet1,-1000,-1000,-1000

Endif
Next FrontWall

`Back Wall Portals
For Backwall = 1125 to 1128
If Object Collision (Bullet1,Backwall)
Play Sound 2
Position Object Portal1,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)
yrotate object Portal1, 0
xrotate object Portal1, 0
zrotate object Portal1, 0
Position camera 11,Object Position X(Bullet1),Object Position Y(Bullet1),Object Position Z(Bullet1)

Position Object Bullet1,-1000,-1000,-1000
yrotate camera 11, 0
zrotate camera 11, 0
xrotate camera 11, 0
Endif
Next Backwall

`Roof Portals2
For Roof = 624 to 631
If Object Collision (Bullet2,Roof)
Play Sound 2
Position Object Portal2,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)
Position Object Bullet2,-1000,-1000,-1000
Position camera 12,Object Position X(Portal2),Object Position Y(Portal2),Object Position Z(Portal2)
yrotate object Portal2, 90
xrotate object Portal2, 90
zrotate object Portal2, 0
````
yrotate camera 12, 0
xrotate camera 12,90
zrotate camera 12,0
Endif
Next Roof

`Floor Portals2
For LevelFloor = 500 to 505
If Object Collision (Bullet2,LevelFloor)
Play Sound 2
Position Object Portal2,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)
Position Object Bullet2,-1000,-1000,-1000
Position camera 12,Object Position X(Portal2),Object Position Y(Portal2),Object Position Z(Portal2)
yrotate object Portal2, 90
zrotate object Portal2, 90
xrotate object Portal2,0
``
yrotate camera 12,90
xrotate camera 12,0
zrotate camera 12,90
Endif
Next LevelFloor

`Left Wall Portlas2
For LeftWall = 750 to 758
If Object Collision (Bullet2,LeftWall)
Play Sound 2
Position Object Portal2,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)
yrotate object Portal2, 90
xrotate object Portal2, 0
zrotate object Portal2, 0
Position camera 12,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)

Position Object Bullet2,-1000,-1000,-1000
```
yrotate camera 12, 90
zrotate camera 12, 0
xrotate camera 12, 0
Endif
Next LeftWall

`Right Wall Portals2
For RightWall = 875 to 883
If Object Collision (Bullet2,RightWall)
Play Sound 2
Position Object Portal2,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)
yrotate object Portal2, 270
xrotate object Portal2, 0
zrotate object Portal2, 0
Position camera 12,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)
Position Object Bullet2,-1000,-1000,-1000

````
yrotate camera 12, 270
zrotate camera 12, 0
xrotate camera 12, 0
Endif
Next RightWall

`Forward Wall Portals2
For Frontwall = 1000 to 1006
If Object Collision (Bullet2,FrontWall)
Play Sound 2
Position Object Portal2,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)
yrotate object Portal2, 180
xrotate object Portal2, 0
zrotate object Portal2, 0
Position camera 12,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)
````````````````````
yrotate camera 12, 180
zrotate camera 12, 0
xrotate camera 12, 0
Position Object Bullet2,-1000,-1000-,1000

Endif
Next FrontWall

`Back Wall Portals2
For Backwall = 1125 to 1128
If Object Collision (Bullet2,Backwall)
Play Sound 2
Position Object Portal2,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)
yrotate object Portal2, 0
xrotate object Portal2, 0
zrotate object Portal2, 0
Position camera 12,Object Position X(Bullet2),Object Position Y(Bullet2),Object Position Z(Bullet2)

Position Object Bullet2,-1000,-1000,-1000
yrotate camera 12, 0
zrotate camera 12, 0
xrotate camera 12, 0
Endif
Next Backwall

`FPS Camera!!
Position Camera 10,Object Position X(Player1),Object Position Y(Player1),Object Position Z(Player1)
`Mouselook
CAMY#=CAMY#+MouseMoveX()*.1
CAMX#=CAMX#+MouseMoveY()*.1
If CAMX#>90 and CAMX#<135 then CAMX#=90
If CAMX#>270 and CAMX#<225 then CAMX#=90
yrotate camera 10,CAMY#
xrotate camera 10,CAMX#
yrotate object player1,CAMY#
`xrotate object player1,CAMX#

`HUD
Circle Screen Width()/2,Screen Height()/2,5

EndFunction

Function Multiplayer_Connection()

`Retrieve the TCP/IP Connection Number
tcpip_num AS INTEGER
perform checklist for net connections

for i = 1 to checklist quantity()
    if left$(checklist string$(i),15) = "Internet TCP/IP"
        tcpip_num = i
    endif
next i

`Find out if our user is a host or a client
userType AS STRING
clientIP AS STRING

print " "
print " "
print " "
print "Would you like to Create (Press 'c') or Join (Press 'j') a game?"
print " "
print "---NOTE---"
print " Firewall on both computers must be disabled in order to play online!"
sync
repeat
    if lower$(inkey$()) = "j"
        userType = "client"

        print "What IP address are you connecting to? (Press any key to continue)"
        print " "
        print " "
        print " ---How to find and input IP Address of game creator---"
        print " "
        print "To obtain IP address of computer creating the game"
        print "1. Press Windows Start button on game creators computer"
        print "2. Type 'cmd' in search"
        print "3. In cmd, type 'ipconfig'"
        print "4. Search for IPv4 Address"
        print "5. Input IPv4 Address into gamscreen"
        print " "
        print "(Press any Key to Continue and enter IP Address)"
        sync
        wait key
        cls
        input clientIP
        cls
    endif
    if lower$(inkey$()) = "c"
        userType = "host"
    endif
until userType <> ""

`Setup Connection
if userType = "host"
    set net connection tcpip_num, " "
else
    if userType = "client"
        set net connection tcpip_num, clientIP
    else
        exit prompt "User type not specified","Multiplayer Error"
        end
    endif
endif

`Prompt the user for a name
playerName AS STRING

print "What would you like to call yourself? (Press any key to continue and input Name)"
sync
wait key
cls
repeat
    input playerName
    sync
until playerName <> ""

`Host: Create new game
if userType = "host"
    create net game "Game", playerName, 2
    mptype = 1
endif

`Find session
sessionID AS INTEGER

perform checklist for net sessions

join net game 2, playerName

endfunction

Function Multiplayer()

   if memblock exist(1)
      delete memblock 1
   endif

`sets variables for message
   X# as Dword
   X# = int(object position x(Player1))
   Y# as Dword
   Y# = int(object position y(Player1))
   Z# as Dword
   Z# = int(object position z(Player1))
   BulletX# as Dword
   BulletX# = int(object position x(Bullet1))
   BulletY# as Dword
   BulletY# = int(object position y(Bullet1))
   BulletZ# as Dword
   BulletZ# = int(object position z(Bullet1))
   AngleX# as Dword
   AngleX# = int(object angle x(bullet1))
   AngleY# as Dword
   AngleY# = int(object angle y(bullet1))
   AngleZ# as Dword
   AngleZ# = int(object angle z(bullet1))

   make memblock 1, 36
      write memblock Dword 1, 0, X#
      write memblock Dword 1, 4, Y#
      write memblock Dword 1, 8, Z#
      write memblock Dword 1, 12, BulletX#
      write memblock Dword 1, 16, BulletY#
      write memblock Dword 1, 20, BulletZ#
      write memblock Dword 1, 24, AngleX#
      write memblock Dword 1, 28, AngleY#
      write memblock Dword 1, 32, AngleZ#

   `inc sendMessageDelay
   `if sendMessageDelay >= 100
		`send player coordinates when movement keys are pressed
		If Scancode()=17
			send net message Memblock 0, 1, 1
		endif
		If Scancode()=31
			send net message Memblock 0, 1, 1
		endif
		If Scancode()=30
			send net message Memblock 0, 1, 1
		endif
		If Scancode()=32
			send net message Memblock 0, 1, 1
		endif
   `endif

   if mouseclick() = 1
   	send net message Memblock 0, 1, 1
   endif

   `resets delay for message send
   `sendMessageDelay = 0

   `checks to see if there are any waiting messages
   get net message
   if net message exists() = 1
   `checks the type of message. Checks for 'Memblock' msgs
      if net message type() = 4

         net message Memblock 1
         position object Player2, memblock Dword (1, 0), memblock Dword (1, 4), memblock Dword (1, 8)
         xrotate object Bullet2, memblock Dword (1, 24)
         yrotate object Bullet2, memblock Dword (1, 28)
         zrotate object Bullet2, memblock Dword (1, 32)
		 position object Bullet2, memblock Dword (1, 12), memblock Dword (1, 16), memblock Dword (1, 20)	

      endif
   endif

`Checks for players in game session and displays them on screen when tab is pressed
if keystate(15) = 1
Perform Checklist For Net Players
   If Checklist Quantity() > 0
     Name$ = ""
     For N = 1 To Checklist Quantity()
       Name$ = Name$ + Checklist string$(N)+"  "
     Next p
      Text 10, 350, "--Current Players-- "
      Text 10, 380, Name$
   Endif
endif
endfunction

function debug()

text 1,1, "bullet rotation X:" + str$(object angle x(bullet2))
text 1,20, "bullet rotation y:" + str$(object angle y(bullet2))
text 1,40, "bullet rotation z:" + str$(object angle z(bullet2))
endfunction
Rem ***** Main Source File *****

Hunters and Collectors Part 4 – Competition Release

The more HD-y more real time-y more particle-y release of Hunters and Collectors is out now and available for play as a desktop app. Check it out with these following earls!
PC http://heyitsdaijoubu.com/WebBuild/HCPC.zip
Mac http://heyitsdaijoubu.com/WebBuild/HCMac.zip

H+C now plays in real time. That means even while the game is closed, you’re starving to death. This has lead to testers demonstrating a very different approach to the game and I’d love to hear what your experience is like!! There’s a bunch of other changes to, some obvious, some not!

The feedback form for this particular build is at https://docs.google.com/a/robtotmedia.com/spreadsheet/viewform?formkey=dF81MTZiRVhkUnYwUWpIbEF0UDZWNmc6MQ

 

 

 

 

 

Hunters and Collectors Part 3

Hey ya’ll! Totally super happy/insanely nervous to put up a very limited build of my game, Hunters and Collectors, that I’ve been working on for Project NoneTheLess. The reason I’m pushing this version out today is because I’ve reached a stage where I can’t balance the pacing any better without some comments from players, so I’ve hacked off all the stuff that doesn’t work and uploaded it for play. There’s still some debug info displayed (play with the slider if you wanna feel like you’re in the true man show dome) but beyond that this should be more or less a stable test.
You can find the game here: http://heyitsdaijoubu.com/WebBuild2/WebBuild2.html
Feedback form here: https://docs.google.com/a/robtotmedia.com/spreadsheet/viewform?formkey=dDFVOFp5d2hDUTlxUkJYelFMQjZyQ0E6MQ
Please be honest! Hate it, love it, I don’t care, I just wanna know :D

tl;dr play game fill out form lol

ImAMoron@TheBottomOfTheOcean.com

This is a quick crash course through cheap effective domained email, web hosting, file storage, and collab tools for those doing it on the cheap. This is not an in-depth look at why this is the best option, do your research if you really want to, but from my experience this is the best.
With this you can avoid looking like a dumb ass emailing people with professional requests while using emails like the above or hotmails,gmails,yomammamails, and so on.

Step 1 – Get a HostGator Account

http://www.hostgator.com/

These guys are cheap, have a good up time and the response rate on their servers is good. They also have one click installs for tons of apps, provide webdav and ftp support, and all that good stuff like apache, php, mysql and so on. If this means nothing to you don’t worry, you don’t need to know.

Get the Hatchling plan for 2 years, input coupon code DESTRUCTOID (go watch their show to keep the universe in balance), pick a domain name, and input your credit card, and BAM all your indie hosting sorted for two years, for around $120. Epic, moving on!

Step 2 – Get a site happening

WordPress all the way, it’s what this site is. Once you’ve set up your Hostgator account, you’ll be able to access quick installs from the control panel. WordPress is effective blogging tools which can be bent in all sorts of ways (DA style portfolio, e-commerce, whatever) through templates and plugins, and it’s all backed up by a kick ass community. Go them!!

If you want to be a little more daring have a look at Joomla, it’s the sort of thing you’d use for an IGN style content site, or anything with a lot of updates. For a single stream though, like a company site, WordPress is just fine. Also free!

Step 3 – Get email and collaborative document editing for up to 10 people!

http://www.google.com/apps/intl/en/group/index.html
Take your freshly registered Hostgator domain, ditch their webmail and plug the domain into Google’s free app suite. That’s domained email, document collaboration and a bunch of other stuff for nothing. This is probably the most technical part of the journey and requires buggering with your domain settings at a fiddly technical level, but you’ll be fine! Also free!

Step 4 – Get a workspace and project management!

Mediawiki is really geared to public used sites rather than secure space, but I still think its decent for scratch space and you can get a password on it if you so desire. Dump all your ramblings, documents, whatever here. It doesn’t support file uploads though, so you’ll need to do that through FTP before linking in here.
Joomla can also serve well here, both are quick installs on Hostgator.

If you need to really run a project though, two options are JIRA (cheap for up to 10 users, painfully expensive afterwards) or the free open source quick installable DotProject. Jira is probably the better software here, but more painful to install, but with a low learning curve. DotProject on the otherhand is pretty rough when it comes to UI. Pick either, or don’t use any, this is really about what your project needs!

Step 5 – Plug everything together, spam social media

Hootsuite yo! This is a webapp that can take your hosted site RSS and auto pipe it to Twitter/FB/whatever along with providing a central hub for campaign management on social networks. This includes posting, tracking, all that sort of fun stuff. Used by a lot of big players (no doubt you’ve seen ‘Sent from HootSuite’ on Facebook at least once), and it’s totally portable with iPhone/iPad apps.

So there we go, with that slap dash overview, you should now have all the keywords you need to get web ready as an indie dev or budding job seeker! Whee!

 

SPACE MINBADERS! Code for DarkBasic

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
REMSTART
-----------------------
SPACE MINBADERS!
This version is feature incomplete but plays to the minimuim requirements of
the assessment.
Code by Matt Kelly with references from Andrew Le
This code has been made freely avaliable at http://www.heyitsdaijoubu.com/ for viewing
by public and other students.
-----------------------
REMEND

REM USEFUL INFORMATION 66,66,66 is your holding area, its totally off screen
REM Variables
enemySpeed as float = 0.03
REM Keeps track of how many killed for win conditions
DeathCounter = 0
REM Keeps the score
Score = 0
sync on
sync rate 60
autocam off
backdrop on
REM things go a bit funky if the backdrop is turned off

REM We'll call all our set up functions here
SetUpEnvironment()
GameStart()
CreateInvaders()

do

REM Create the text on screen that displays score text
REM Referenced from Andrew Le
center text screen width()/4, 10, "Q to Quit --- Score: " + str$(score)

REM These are the constant functions that control the game
PlayerMovementControls()
PlayerShooting()
BulletRemove()
REM Q to Quit
      if keystate(16) = 1
         end
      endif
REM This is controlling all the enemy movement, some of the code below is not
REM sitting in a function because it caused issues, and the rest is
REM sitting here for completion
REM Referenced from Andrew Le
for x = 10 to 64
      move object left x, enemySpeed
next x

   for x = 10 to 64
      if object collision (x, 3)
         enemySpeed = -0.03
         REM The down move is in a seperate function
         moveDown()
      endif
      REM and now back the other way
      if object collision (x, 2)
         enemySpeed = 0.03
         moveDown()
      endif
   next x

REM If Deathcounter its 55, active the winner function
if DeathCounter = 55
   Win()
endif

REM This is the player bullet collision code, it checks collision, hides enemies,
REM turns off their collisions, and hide/moves the bullet to out of gameplay.
REM The hiding of the bullet is very important, because we'll use that
REM to check if we can fire later in the code.

for x = 10 to 64
      if object collision (x, 6)
      set object collision off x
      hide object x
      hide object 6
      position object 6,66,66,66
      REM Add scores and death counts to variables
      DeathCounter=DeathCounter+1
      score=score+7
         endif
   next x

sync
loop

function SetUpEnvironment()
Rem This is everything except the invaders. First camera and player.
   position camera 0,0, -25
   point camera 0,0,0
   `Player
   make object plain 1,1,1
   position object 1,66,66,66
   REM We'll build some barriers in the game now, these  will become invisable during play. They provide collision detection for play boundries
   make object box 2,1,40,2
   position object 2,20,0,0
   make object box 3,.1,40,2
   position object 3,-20,0,0
   make object box 4,40,.5,2
   position object 4,0,-15,0
   make object box 5,40,.5,2
   position object 5,0,15,0
   hide object 2
   hide object 3
   hide object 4
   hide object 5
   REM Now for awesome weapons, this will be a plain like the player so its easy to map a sprite to, then it'll go to the holding area
   make object box 6,.1,1,.3
   position object 6,66,66,66
   hide object 6
   endfunction

function CreateInvaders()

REM Referenced from Andrew Le
REM This is gonna creates all of them in one go
   for x = 10 to 64
       make object box x, 1, 1, 0
   next x

REM And this lays them out in a grid collumn by collumn, take note of the offsetting
REM required each time. This is calcuated based on scale and will vary based on design.
   for x = 10 to 20
      position object x, -20 + (x*1.6), 13, 0
   next x

   for x = 21 to 31

      position object x, -37.6 + (x*1.6), 11, 0
   next x

   for x = 32 to 42
      position object x, -55.2 + (x*1.6), 9, 0
   next x

   for x = 43 to 53
      position object x, -72.8 + (x*1.6), 7, 0
   next x

   for x = 54 to 64
      position object x, -90.4 + (x*1.6), 5, 0
   next x

endfunction

function GameStart()
REM Moves player to game start position
   position object 1,0,-13,0
endfunction

function PlayerMovementControls()
REM This is using DBs functions that allow object movement reletive to the camera.
REM For some reason I need this reversed at the moment, but that might change depending
REM on platform deployment.
   if rightkey() = 1
      move object left 1,.5
      endif
   if leftkey() =  1
      move object right 1,.5
      endif
   if object collision (1,2)
      position object 1,19,-13,0
   endif
   if object collision (1,3)
      position object 1,-19,-13,0
   endif
endfunction

function PlayerShooting()
   if spacekey()=1 and object visible(6)= 0
   REM this doesn't explicitely stop spam but it does by operation of the hide command
      show object 6
      REM move bullet to the player
      position object 6, object position x(1), object position y(1), object position z(1)
      endif
      REM The bullet is always moving even when you can't see it
   move object up 6,.3

endfunction

function moveDown()
REM Referenced from Andrew Le, this moves enemies down a step when called
   for x = 10 to 64
      move object down x, .2
   next x

endFunction

Function BulletRemove()
REM If you miss completely, this will reset the bullet to its holding area once it hits the top barrier

      if object collision (5, 6)
      hide object 6
      position object 6,66,66,66
         endif
   endfunction

Function Win
REM The win function, the gold
cls

center text screen width()/4, 10, "Like Charlie Sheen, you are biwinning"

endfunction